iPhone UIApplicationExitsOnSuspend ineffective

落爺英雄遲暮 提交于 2019-12-10 09:55:02

问题


UIApplicationExitsOnSuspend does not force my app to exit. I have cleaned the target, removed the app, rebuilt, and reinstalled many times.

I really need my app to exit.


回答1:


Did you link against SDK 4? This key is only effective in this case.




回答2:


Are you sure your application is still active ?

You will always see your application when double tapping the home button : this is a list of the recently used apps, not a list of currently running apps

Put a breakpoint in the applicationWillTerminate: method of your app delegate, if it stops in this method it means your is killed.

Hope this helps, Vincent




回答3:


Sometimes when people type "set it to true in the plist file" what they really mean is:

  1. Add "UIApplicationExitsOnSuspend" as a key in the info.plist file
  2. right-click on UIApplicationExitsOnSuspend and set "type" to boolean
  3. click the checkbox that then appears

TRUE or YES in a string format does NOT work in the info.plist file.

BOOLEAN is the only flag that enables it.




回答4:


Try this it helps you

in info.plist, add "Application does not run in background" = "YES".

thats it.now you open second time same application.It open with start page.

Thanks



来源:https://stackoverflow.com/questions/3594963/iphone-uiapplicationexitsonsuspend-ineffective

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