且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

当用户更改联系人访问权限时,应用在iOS 6中崩溃

更新时间:2022-12-27 12:33:31

我在我自己的应用程序中看到了这个。我已经看到别人报告这一点。我很确定这是故意的行为。操作系统会杀死对隐私权限更改做出反应的任何后台应用。苹果似乎对此采取了大锤方法。这不是一个崩溃(虽然它可能会出现,所以当运行在调试器)。应用程式因各种其他原因终止。将此添加到原因列表。这可以让我们更好地在应用完全重启后恢复应用状态。

I've seen this in my own app. And I've seen others report this as well. I'm pretty sure this is deliberate behavior. The OS kills any background apps that react to changes in privacy permissions. Apple appears to have taken a sledgehammer approach to this. It's not a crash (though it may appear so when running in the debugger). Apps get terminated for various other reasons. Add this to the list of reasons. This gives us more reason to do a good job restoring app state upon a full restart of our apps.

请注意,此行为适用于所有隐私设置,例如联系人,照片,麦克风,日历和相机。

Note that this behavior applies to all of the various privacy settings such as contacts, photos, microphone, calendar, and camera.