Search code examples
iosswiftpermissionswatchkitwatchos

Watch App get killed while allowing/disallowing camera permission on iPhone App


I developed an iOS app along with the Watch OS app. We are using an iPhone camera for capturing video. To capture video iPhone app needs permission from the app user.

When iPhone displays a permission dialog and the user allows/disallows permission respective Watch App gets killed with debugger signal 9.

If I remove camera permission then the Watch app works fine.


Solution

  • Your app is not crashing its just forced to restart by WatchOS with new privacy settings. So when you change the any permission in iPhone then it means privacy policy changed, so app will be killed if its attached to debugger else it will relaunch. its happing on both Apple Watch and iPhone. if you change the permission in Apple Watch iOS app will restart. if you change the permission in iOS app Apple Watch app will be restart.

    Also, Not only camera permission If the user at some point changes the Address Book, Calendars, Reminders, Camera, or Photos permissions, WatchOS app will SIGKILL the app when change App permission in iPhone. (it's default behaviour of iOS and WatchOS)

    Please refer the below links

    App killed by SIGKILL when changing privacy settings , https://developer.apple.com/forums/thread/64740, App crashes in background while changing permission - swift, App crashed in iOS 6 when user changes Contacts access permissions