programmatically prevent app from running in background iOS

后端 未结 4 1632
伪装坚强ぢ
伪装坚强ぢ 2020-12-16 09:01

I have an app that will run in the background but there is one case where I do not want that to happen, can I achieve this programmatically?

I know I can opt out by

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-16 09:43

    You can close the app by calling exit(0) in applicationDidEnterBackground.

提交回复
热议问题