Repository navigation
fix: reset privacy permissions when clearing an app on ios simulator - #486
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: mobile-next/mobilecli/.coderabbit.yaml Review profile: CHILL Plan: Essentials Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 5 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughClearing a simulator app now also resets its privacy permissions. Test helpers grant permissions and inspect the simulator’s TCC database, and an ChangesSimulator app clearing
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change resets simulator privacy permissions when clearing an app and reports reset failures. No actionable merge-blocking risk remains; merge after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
On Android,
apps clear(pm clear) also resets an app's runtime permissions, so it asks for them again. On an iOS simulator,ClearApponly emptied the data container, and granted or denied permissions stayed.ClearAppon the simulator now also runsxcrun simctl privacy <udid> reset all <bundle>, soapps clearbehaves the same on both platforms. This is useful for repeatable permission-prompt tests in mobilewright (device.clearAppData()).Notification permission is not covered by
simctl privacyand still only resets on reinstall. The README and openrpc docs mention the permission reset.Test plan
apps cleartest intest/simulator.spec.ts: grants camera + microphone, runsapps clear, checks the app has no rows left in the simulator's TCC database (read withnode:sqlite)simulator.goand passes with this change (iPhone 17 Pro, iOS 26.5)apps clear, Playground shows camera and location as "Not Determined" againgo test ./devicesSummary by CodeRabbit