Skip to content

feat(alarm): add iOS 26 phone wake alarm - #2702

Closed
rodrigosa7 wants to merge 4 commits into
ryanbr:mainfrom
rodrigosa7:feat/ios-alarmkit-wake-window
Closed

rodrigosa7 wants to merge 4 commits into
ryanbr:mainfrom
rodrigosa7:feat/ios-alarmkit-wake-window

Conversation

@rodrigosa7

Copy link
Copy Markdown

What this PR does

Adds an opt-in iOS 26+ phone wake alarm using AlarmKit. It reads the shared wake schedule from #2700: the usual time, selected weekdays, and per-day overrides. The phone alarm is independent of the strap buzz and wind-down nudge. AlarmKit authorization is requested when the user turns it on; denied or failed changes are shown in the alarm screen. Schedule replacements retain the previous alarm until the new weekly alarms are installed, and the app reconciles them on foreground. When the phone alarm is current, NOOP removes the strap alarm's duplicate ordinary backup notification; that backup remains available if the phone schedule is missing or cannot be updated.

The screen now keeps weekday selection in the shared schedule even when the strap switch is off, and it only exposes per-day time editors for selected days. New copy is localized in the existing string catalog. Earlier iOS versions retain the existing alarm UI and behavior.

This is the scheduled wake portion of #1613. It does not add light-sleep detection or move the alarm earlier from live heart rate; dependable overnight background BLE and the cross-platform detector remain separate work. Analysis migration required: no — this changes UI and system alarm scheduling, not derived analysis values.

This branch is based on the still-open #2700 and its three shared-schedule commits. The draft PR therefore includes those commits until #2700 merges; its new feature commit is feat(alarm): add iOS 26 phone wake alarm.

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Documentation
  • CI / tooling

How it was tested

  • xcodegen generate completed.
  • xcodebuild -project Strand.xcodeproj -scheme NOOPiOS -destination 'generic/platform=iOS Simulator' ... build passed.
  • xcodebuild -project Strand.xcodeproj -scheme Strand -destination 'platform=macOS' ... build passed.
  • git diff --check, plist lint, and string-catalog JSON validation passed.
  • Physical iOS 26 alarm delivery is not yet verified. Before this is ready, check permission granted/denied, Focus and silent mode, app termination, reboot, weekday/time edits, and time-zone/DST changes on a signed device. No BLE or analytics code changed.

Checklist

  • Swift package tests pass for any package I touched (swift test in Packages/<name>) — no package touched
  • Android unit tests pass if I touched android/ (./gradlew testFullDebugUnitTest) — Android unchanged
  • No new build warnings introduced
  • UI changes use only StrandDesign tokens — no hardcoded colors, fonts, or spacing
  • No hardcoded hex frame bytes; protocol facts live in the schema / decoders
  • Follows the conventions in docs/CONTRIBUTING.md
  • I did not commit generated output (Strand.xcodeproj/) or any secrets/keystores

Related issues

Refs #2701. Depends on #2700. Related: #1613.

Apple references: AlarmKit scheduling, NSAlarmKitUsageDescription, and AlarmManager.

@rodrigosa7 rodrigosa7 closed this Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant