Repository navigation
Grant app permissions on open and add simulator data steps - #175
Merged
bitomule merged 1 commit intoDec 3, 2026
Merged
Conversation
open --permissions (and open: { permissions: ... } in a flow) grants app
permissions after install and before the fixture and launch, so a flow
never meets their prompts. simctl privacy sets the services it covers;
notifications and camera, which simctl has no service for, go through
idb approve/revoke. The whole set is routed before anything runs, so a
request that needs a missing idb fails up front instead of half-granted.
New sim.* steps and mav sim commands cover the keychain, the media
library, push payloads and memory warnings. Each is routed by
capability: simctl serves keychain reset, addmedia and push, with idb
as the fallback, and idb is the only driver for the memory warning.
doctor reports the driver for each surface.
Closes #152. Closes #160.
bitomule
force-pushed
the
setup-installs-every-driver
branch
from
December 3, 2026 00:13
3a3264d to
ffcdc72
Compare
bitomule
force-pushed
the
open-permissions-and-sim-steps
branch
from
December 3, 2026 00:13
477b961 to
9c92d28
Compare
bitomule
added a commit
that referenced
this pull request
Dec 3, 2026
open --permissions (and open: { permissions: ... } in a flow) grants app
permissions after install and before the fixture and launch, so a flow
never meets their prompts. simctl privacy sets the services it covers;
notifications and camera, which simctl has no service for, go through
idb approve/revoke. The whole set is routed before anything runs, so a
request that needs a missing idb fails up front instead of half-granted.
New sim.* steps and mav sim commands cover the keychain, the media
library, push payloads and memory warnings. Each is routed by
capability: simctl serves keychain reset, addmedia and push, with idb
as the fallback, and idb is the only driver for the memory warning.
doctor reports the driver for each surface.
Closes #152. Closes #160.
bitomule
added a commit
that referenced
this pull request
Dec 3, 2026
…driver (#172) * Install every simulator driver with setup deps and drop preferred_ui_driver mav setup --install deps now installs AXe 2, baguette and idb. After each install it checks the tool with the driver's own probe, runs an explicit brew upgrade for one left below mav's floor, and fails with the floor and the next command when the upgrade does not reach it. idb setup fails when pipx is missing instead of installing the companion alone. preferred_ui_driver was written by setup but never read by the router. It is no longer asked or written; a config that still carries it loads, and doctor reports it as config_deprecated. Part of #160. * Grant app permissions on open and add simulator data steps (#175) open --permissions (and open: { permissions: ... } in a flow) grants app permissions after install and before the fixture and launch, so a flow never meets their prompts. simctl privacy sets the services it covers; notifications and camera, which simctl has no service for, go through idb approve/revoke. The whole set is routed before anything runs, so a request that needs a missing idb fails up front instead of half-granted. New sim.* steps and mav sim commands cover the keychain, the media library, push payloads and memory warnings. Each is routed by capability: simctl serves keychain reset, addmedia and push, with idb as the fallback, and idb is the only driver for the memory warning. doctor reports the driver for each surface. Closes #152. Closes #160.
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 #152. Closes #160.
Stacked on #172 (setup installs every simulator driver). Review only the top commit here; once #172 lands this PR's base moves to
main.Permissions on
open(#152)clearStatereinstall would wipe them) and before the fixture and the launch (simctl privacy terminates a running app, and a prompt already shown is too late).xcrun simctl privacysets calendar, contacts (allow|limited), location (always|inuse), media-library, microphone, motion, photos (allow|add), reminders and siri, each withallow|deny|unset. It has no notifications or camera service, so those two go through idb:idb approveforallow,idb revokeforunset.deny. On an iOS 26.4 simulatoridb revokeput both back to notDetermined (the app asks again), not to denied, and no other tool can store a refusal for them. Adenyis refused at lint time and on the command line instead of being reported as applied.all=simctl privacy grant all+idb approve notification camera.notifications=allowfails withpermissions_driver_missing service=notifications next="mav setup --install idb"before anything is installed, granted or launched. Other refusals:permissions_invalid,permissions_unsupported_on_device|macos, and--no-relaunchcannot be combined with--permissions.permissions=<canonical spec>andpermissions_drivers=camera:idb,location:simctl,...; each driver call goes to the run's command trail.Simulator data steps (#160)
sim.keychain.clear/mav sim keychain clearsimctl keychain resetidb clear-keychainsim.media.add { files }/mav sim media addsimctl addmediaidb add-mediasim.push { payload, bundle? }/mav sim pushsimctl pushidb notification sendsim.memoryWarning/mav sim memory-warningidb simulate-memory-warningThe issue listed some of these as idb-only, but simctl already covers keychain reset,
addmedia(photos, videos, vCard contacts) and push. So they follow the router: simctl is canonical and idb is the fallback. idb is routed only the surfaces it alone covers (notifications, camera, memory warning), and AXe 2 stays the driver for the tree, taps, typing and gestures. Paths in steps are relative to the flow file. Each step record names its driver. The steps use thesim.*prefix like the existing simulator-only steps.New capabilities are declared in
drivers/simdata.goand implemented insimctl/simdata.goandidb/simdata.go, on simulator targets only.mav doctorreportssim_permissions_driver,sim_notification_permission_driver,sim_camera_permission_driver,sim_keychain_driver,sim_media_driver,sim_push_driverandsim_memory_warning_driver(ormissingandsim_data_next). The CLI logic lives in new files (permissions.go,sim_data.go);cli.goandlaunch.goonly gain dispatch, help and one hook in the launch recipe.Validation
make checkpasses (gofmt,go test ./..., build).Ablations: each fix was reverted, its tests went red, and went green again once restored:
On a dedicated iOS 26.4 simulator (iPhone 17 Pro, idb_companion 1.7.x), with a probe app that shows its own authorization status:
notifications=0 camera=0 microphone=0 photos=0 location=0.--permissions notifications=allow,camera=allow,microphone=allow,photos=allow,location=alwaysissues:notifications=2 camera=3 microphone=3 location=3(authorized / always). For photos, TCC.db holdskTCCServicePhotos = 2for the app; the ad-hoc-signed probe still readnotDeterminedfrom PhotoKit, which is simctl/iOS behaviour and not mav's.idb revoke notification cameraand simctlrevoke:notifications=0 camera=0(back to undecided) andmicrophone=2 location=2(denied). That measurement is why notifications and camera takeunsetand notdeny.mav sim keychain clear|media add|push|memory-warningand amav runof a flow with the foursim.*steps all returned ok (driver=simctl for the first three, idb for the memory warning), in 0.5 s for the flow.