Skip to content

Enable Critical Alerts (override Silent/Focus)#37

Draft
Sjoerd-Bo3 wants to merge 2 commits into
Build-Experimentfrom
feat/critical-alerts
Draft

Enable Critical Alerts (override Silent/Focus)#37
Sjoerd-Bo3 wants to merge 2 commits into
Build-Experimentfrom
feat/critical-alerts

Conversation

@Sjoerd-Bo3

Copy link
Copy Markdown
Owner

Enables iOS Critical Alerts for Trio — the "Kritieke meldingen" toggle that lets alarms break through Silent mode and Focus, the same as Dexcom G7.

The alert refactor (PR nightscout#1203) already wired all the code (DeviceAlertSeverity.criticalUNNotificationInterruptionLevel.critical, CriticalAlertAudioPlayer, the critical audio alarm.caf). The only missing pieces were the entitlement and the authorization request — without them iOS silently downgrades .critical notifications and never shows the toggle.

Commits

  1. cbd5f5aa — Request critical-alert authorization (build-safe)
    Adds .criticalAlert to requestAuthorization(options:) in UserNotificationsManager. Harmless without the entitlement (iOS just won't grant it).
  2. 6cb1d374 — Add Critical Alerts entitlement (⚠️ gated)
    Adds com.apple.developer.usernotifications.critical-alerts to Trio.entitlements.

⚠️ Do not build/merge commit 2 until Apple grants the entitlement

Critical Alerts is a special-request entitlement (unlike Time-Sensitive, you can't self-enable it):

  1. Request it from Apple: developer.apple.com → Support → "Request Critical Alerts entitlement", with a health/safety justification (DIY automated insulin delivery; glucose/pump alarms must override Silent & Focus).
  2. Apple grants it to your Team ID and attaches it to the provisioning profile.
  3. Enable the capability on the App ID, regenerate profiles, then build.

If commit 2 is built before the grant, managed/automatic signing will fail (no profile can carry an ungranted entitlement) — the same failure class as the time-sensitive issue, but unfixable until the grant exists. Until then, commit 1 alone is safe to ship.

🤖 Generated with Claude Code


Generated by Claude Code

Add .criticalAlert to the notification authorization request so iOS surfaces
the Critical Alerts permission. Build-safe on its own: without the matching
entitlement, iOS simply won't grant critical-alert authorization.
Adds com.apple.developer.usernotifications.critical-alerts. This is a
special-request entitlement: it must be granted to the developer account by
Apple before it can be provisioned, otherwise managed/automatic signing fails.
Do NOT build/merge this commit until Apple has granted the entitlement to the
Team ID.
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