← All repositories

reportage

A life-logging app for iPhone

git clone https://code.inqk.net/reportage.git


commit 0a61267f5ec7670a76023a95e82f1e1ffe27168b
parent e5fbb7611e980c5ff112f8154828cfda180bb6b7
Author: Michael Camilleri <[email protected]>
Date:   Wed, 21 Oct 2026 20:02:52 +0900

Clarify notification settings don't sync

Diffstat

MNotes/Design.md | 11+++++++----
MReportage/Services/Prompts/PromptSettings.swift | 4++--

2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/Notes/Design.md b/Notes/Design.md

@@ -534,8 +534,10 @@ Settings (`PromptSettings`): prompts on or off, prompts per day `n` (default
 4), a waking window (default 9:00 to 22:00, optionally different on weekends,
 and able to run past midnight), a minimum gap between prompts (default 30
 minutes) and the snooze length (default 15 minutes). Prompts are off until the
-user turns them on in Settings. The settings live in `UserDefaults`; with
-sync they move into the `Config` zone.
+user turns them on in Settings. The settings live in `UserDefaults` and
+don't sync: only the iPhone that schedules prompts uses them, and a second
+phone is set up on purpose rather than doubling the prompts. Exports leave
+them out too.
 
 Times are **stratified random** (`PromptSchedule`). The waking window is split
 into `n` equal slots with one time drawn uniformly in each. Unlike drawing `n`
@@ -820,8 +822,9 @@ Battery from `UIDevice`, connectivity from `NWPathMonitor`.
 
 Private CloudKit database via `CKSyncEngine`, with two custom zones:
 
-- `Config`: `Question` records and synced settings: the schedule, the waking
-  window, and which questions are asked when.
+- `Config`: `Question` records, including which surveys ask each one. No
+  settings sync: the prompt settings and the rest of `UserDefaults` are
+  per device.
 - `Reports`: one `Report` record per report. Responses and context are
   encoded into the record rather than stored as separate records. A report
   is the unit of editing, so coarse records keep record counts and

diff --git a/Reportage/Services/Prompts/PromptSettings.swift b/Reportage/Services/Prompts/PromptSettings.swift

@@ -3,8 +3,8 @@ import Foundation
 /// When random prompts come: how many a day, within which hours, and how far
 /// apart.
 ///
-/// Kept in `UserDefaults` for now. The Sync phase moves it into the `Config` zone so
-/// it syncs; the per-install secret stays local.
+/// Kept in `UserDefaults` on each device and never synced: only the iPhone
+/// that schedules prompts uses it.
 struct PromptSettings: Codable, Equatable, Sendable {
     /// Prompts are off until the user turns them on, which is when
     /// notifications (and the upgrade to 'Always' location) are asked for.