NSTimer behavior in background (addTimer:, beginBackgroundTaskWithExpirationHandler:)

六眼飞鱼酱① 提交于 2019-12-06 01:33:58

Yes, running the app through the debugger will keep it alive when it otherwise would be terminated after 3 minutes. So, you obviously cannot rely upon that feature in a production app.

No, attempts to keep the app alive beyond this period of time are not legitimate (unless you have requested proper background operation because your app has legitimate and compelling need for background operation, e.g. it is a music player, VOIP, a navigation app, etc.). Apple is likely to reject any such app that is not in conformance with section 2.16 of the App Store Review Guidelines.

See the Background Execution chapter of the App Programming Guide for iOS for a fuller discussion of valid background operation.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!