You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
iOS simulator: set notification permission, which simctl privacy refuses #4668
On an iOS simulator, settings permission grant|deny|reset notifications has no effect: simctl privacy refuses notifications on current runtimes. On iOS 27.2:
$ xcrun simctl privacy <udid> grant notifications <bundle-id>
Failed to create TCC authorization record
Operation not permitted
So a test can't avoid the "Would Like to Send You Notifications" prompt, and grant all skips notifications (#4667 reports the skip as a warning).
What a prototype shows
Notification permission isn't a TCC service. SpringBoard keeps it in data/Library/BulletinBoard/VersionedSectionInfo.plist: one NSKeyedArchiver-encoded BBSectionInfo per bundle id, written when a user answers the prompt. A prototype writes that same record and restarts SpringBoard and usernotificationsd:
Tested on an iPhone 17 Pro simulator running iOS 27.2, with a probe app that reads getNotificationSettings and then calls requestAuthorization:
Step
The app shows
reset
the system prompt
grant
before=authorized granted=true after=authorized, no prompt
deny
before=denied granted=false after=denied, no prompt
uninstall, reinstall, grant before the first launch
authorized, no prompt
Proposed behavior
settings permission grant|deny|reset notifications --app <id> on an iOS simulator writes, or removes, the app's BBSectionInfo, then restarts the two services.
It returns { permission: 'notifications' } like the other targets.
grant all and deny all include notifications instead of warning that they were skipped.
If the plist is missing, or its sectionInfo isn't the expected shape, the command fails with UNSUPPORTED_OPERATION, as it does today, rather than guessing.
Trade-offs to decide
The archive format is private, so a future runtime can change it.
Restarting SpringBoard returns the simulator to the home screen, in about 10 seconds. So this fits before open, not while an app is running.
Wix's applesimutils edits the same file for its notifications permission, so the approach has prior art.
Would you accept this behind the existing notifications target, or would you rather keep it out of core?
To answer the question here: core will keep this out. Notification permission on iOS simulators is not a simctl privacy service, and the SpringBoard settings-file approach works only on a simulator whose files are local to the daemon. It also depends on a private archive layout and needs a SpringBoard restart. The supported path is to answer the prompt with alert accept or alert dismiss. That works on local simulators, physical devices and Limrun. The notifications refusal will point there, and the docs will say so. The prototype stays a good reference for anyone who needs this on a local simulator. Closing as not planned.
Activity
thymikee commentedon Nov 24, 2026
To answer the question here: core will keep this out. Notification permission on iOS simulators is not a
simctl privacyservice, and the SpringBoard settings-file approach works only on a simulator whose files are local to the daemon. It also depends on a private archive layout and needs a SpringBoard restart. The supported path is to answer the prompt withalert acceptoralert dismiss. That works on local simulators, physical devices and Limrun. Thenotificationsrefusal will point there, and the docs will say so. The prototype stays a good reference for anyone who needs this on a local simulator. Closing as not planned.