Force iphone app to restart programmatically?

前端 未结 7 974
北荒
北荒 2020-11-27 03:28

I am trying to get my iPhone app to restart programmatically when the Logout button is pressed.

Has anyone got a code sample to share? I\'ve read that it is possible

7条回答
  •  余生分开走
    2020-11-27 03:51

    First of all, although it is possible to force kill your app, this is not allowed by Apple and will rejected. Even if it wasn't rejected, there is no way to restart your app once it's killed. You just need to find some way to reset your app through your code, as Jason Coco said. It might be more work, but it's worth it to not get rejected by Apple.

提交回复
热议问题