improve(ios): manage notifications from Privacy#102733
Merged
Merged
Conversation
Co-authored-by: Sahil Satralkar <[email protected]>
Contributor
Author
|
Land-ready proof for exact head
The final shape keeps ownership inside the iOS app: Privacy owns one default-on serving preference, UIKit owns unregister/re-register, and every iOS-owned notification publication/delivery path honors the same preference. It deliberately avoids a new Gateway method and changes to the legacy APNs JSON store. Proof gap: no physical-device APNs delivery run was performed. |
Contributor
Author
|
Merged via squash.
|
This was referenced Jul 9, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 10, 2026
* improve(ios): manage notifications from privacy Co-authored-by: Sahil Satralkar <[email protected]> * fix(ios): make notification status returns explicit --------- Co-authored-by: Sahil Satralkar <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #99201
Supersedes #99202 with contributor credit preserved; that fork branch does not allow maintainer edits.
What Problem This Solves
Resolves a problem where iOS users had to leave Privacy for a separate Notifications screen with a large action button, and could not express an OpenClaw-level notification opt-out separately from iOS system authorization.
Why This Change Was Made
Notifications now appears as the first native section in Settings > Privacy with a visible toggle. A default-on app preference gates APNs registration/publication, node-triggered local notifications, chat pushes, and mirrored Watch alerts; turning it off uses UIKit's documented remote-notification unregister path, while turning it back on re-registers and republishes the current token.
The existing
UIApplication.openNotificationSettingsURLStringrecovery path remains because Apple documents it as the direct link to this app's notification settings. This rewrite intentionally excludes the original PR's new Gateway unregister protocol and APNs JSON-store identity changes: device delivery can be stopped at the iOS owner boundary without expanding core protocol or legacy storage state.User Impact
Users can manage OpenClaw notification delivery beside other Privacy controls. System permission remains authoritative, hosted-relay disclosure remains required where applicable, and the legacy Notifications route still renders the same section for existing approval-guidance navigation.
Evidence
tbx_01kx35rs5ramy75wvs0jn0v4kt:native:i18n:checkandapple:i18n:checkpassed.unregisterForRemoteNotifications()for explicit in-app opt-out and allows later re-registration: https://developer.apple.com/documentation/uikit/uiapplication/unregisterforremotenotifications%28%29openNotificationSettingsURLStringas the app-specific notification-settings deep link: https://developer.apple.com/documentation/uikit/uiapplication/opennotificationsettingsurlstringThanks @sahilsatralkar for the product direction, simulator/device investigation, and original implementation. The maintainer commit includes Sahil's
Co-authored-bytrailer.