UIApplicationExitsOnSuspend 我还缺少什么吗?
所以我知道这已经被打死了,但我仍然想不出解决办法。
我在 Info.plist 中将 UIApplicationExitsOnSuspend 设置为
,但在模拟器和 iPhone 4 设备上仍然如此,应用程序进入待机状态而不是终止?
还有什么想法可以让它终止吗?也许我需要从应用程序委托中删除一些方法?有什么想法吗?
So I know this has been beaten to death but I still can't figure out a solution.
I have my UIApplicationExitsOnSuspend set to <true/>
in the Info.plist and still both in the simulator as well as on an iPhone 4 device, the app goes into standby instead of terminating?
Any ideas of what else could one do to get it to terminate? Perhaps are there methods that I need to remove from the app delegate? Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
您是否进行了全新构建,从模拟器和设备中删除了应用程序,然后重新安装?这是影响它的唯一关键。另外,请确保您使用设置为 iOS 4.0 的基本 SDK 进行构建。
Did you do a clean build, delete the app from both the simulator and the device, and re-install? That's the only key that affects it. Also, make sure you are building with base SDK set to iOS 4.0.
我遇到了 Cyril 指出的同样问题:我粘贴了“YES”作为值,但这使得键默认为 String 而不是“Boolean”。因此,右键单击该键并确保其类型为布尔值。
I had the same problem that Cyril identifies: I pasted "YES" in as the value, but that made the key default to String instead of "Boolean". So right-click the key and make sure its type is Boolean.
将 YES 设置为 UIApplicationExitsOnSuspend ,从第一次开始对我来说效果很好,但我没有意识到,因为双击时显示了我的应用程序。
“双击主页按钮将始终显示您的应用程序,因为它是最近使用的应用程序的列表。
(参考:http://www.apple.com/iphone/features/multitasking.html< /a> ) "
如果 applicationWillTerminate 委托方法被调用,那么你就完成了..
(添加断点或 NSLog 来检查)
只是一个提示。
希望这对像我这样的人有帮助..;)
Setting YES to UIApplicationExitsOnSuspend , worked well for me from the first time,But i didn realize,as my app was shown when double-clicking.
"double-clicking on the home button will always show your app , as it is a list of recently used apps.
( Ref: http://www.apple.com/iphone/features/multitasking.html ) "
If applicationWillTerminate delegate method is called, then you are done with that..
(Add a break point or NSLog to check )
Just a tip.
Hope this helps some one like me..;)
我遇到了同样的问题,当您添加键 UIApplicationExitsOnSuspend 时,请确保右键单击它并选择值类型>布尔值。否则 Xcode 将忽略它。希望有帮助
I had the same problem, when you add the key UIApplicationExitsOnSuspend, make sure you right click on it and select value type > Boolean. Otherwise Xcode will ignore it. Hope it helps
这似乎在 Xcode4 / iOS 4.3 中发生了变化(变得更好)。布尔值现在是“应用程序不在后台运行”,而且 - 好吧 - 它对我有用。
This appears to have changed (for the better) in Xcode4 / iOS 4.3. The boolean is now "Application does not run in background", and - well - it works for me.
值得注意的是,即使您的 UIApplicationExitsOnSuspend 被标记为(布尔值)“YES”,您的 AppDelegate 的“applicationDidEnterBackground”和“applicationWilLTerminate”方法都会被调用(按该顺序)。
It's important to note that your AppDelegate's "applicationDidEnterBackground" and "applicationWilLTerminate" methods are both called (in that order), even if your UIApplicationExitsOnSuspend is marked as (boolean) "YES".