简体   繁体   English

当UIApplicationExitsOnSuspend = Yes时,iOS 8崩溃重新启动

[英]iOS 8 Crash on relaunch when UIApplicationExitsOnSuspend = Yes

When setting UIApplicationExitsOnSuspend = Yes in the info.list file ("Application does not run in background") the app will terminate when it is suspended. 在info.list文件中设置UIApplicationExitsOnSuspend = Yes时(“应用程序不在后台运行”),应用程序将在挂起时终止。

On iOS7, when suspending an app with that setting by tapping on the home button, then after 1 second tapping the app icon again to relaunch it, it will shortly show the Default screen and launch OK. 在iOS7上,当通过点击主页按钮暂停具有该设置的应用程序时,再次点击应用程序图标1秒后重新启动它,它将很快显示默认屏幕并启动确定。

On iOS8 however, tapping the icon to re-launch after a suspend will lead to a black screen and crash of the app, even before reaching application:(UIApplication *)application didFinishLaunchingWithOptions: . 然而,在iOS8上,点击暂停后重新启动的图标将导致黑屏和应用程序崩溃,甚至在到达application:(UIApplication *)application didFinishLaunchingWithOptions:之前application:(UIApplication *)application didFinishLaunchingWithOptions: .

Can anyone confirm this, and/or have a solution? 任何人都可以证实这一点,和/或有解决方案吗?

A work-around is to set UIApplicationExitsOnSuspend = No but that is not the app behaviour that I desire. 解决方法是设置UIApplicationExitsOnSuspend = No但这不是我想要的应用行为。

We have the same issue. 我们有同样的问题。 We fixed it by putting an exit(0) in the appDelegate in either: 我们通过在appDelegate中放置一个exit(0)来修复它:

applicationWillResignActive

or 要么

applicationDidEnterBackground

We see no crash log on the device when the app crashes. 当应用程序崩溃时,我们在设备上看不到崩溃日志。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 UIApplicationExitsOnSuspend 是否有 iOS 8 的等效项? - UIApplicationExitsOnSuspend is there an equivalent for iOS 8? 替代 iOS 已弃用的 UIApplicationExitsOnSuspend - Alternative to iOS's deprecated UIApplicationExitsOnSuspend iOS-编码/解码枚举-重新启动后在访问时崩溃 - iOS - encoding/decoding enums - crash on accessing after relaunch 苹果是否会在 Plist 中拒绝带有 Key UIApplicationExitsOnSuspend 的 App 设置为 YES - Will Apple Rejects App with Key UIApplicationExitsOnSuspend in Plist is set to YES 在Safari中将应用程序切换到Facebook时,阻止IOS重新启动应用程序 - Prevent IOS to relaunch an app when I switch app to Facebook in safari iOS CoreData Array仅在我重新启动应用程序时显示 - iOS CoreData Array only displaying when I relaunch the application 自动重新启动iOS应用 - Automatic relaunch an iOS App 在后台应用时重新启动iOS应用程序而无需用户界面? - Relaunch iOS app without user interface when application in background? 为何“ self.canDisplayBannerAds = YES;”使应用程序在iOS 8上崩溃? - How come “self.canDisplayBannerAds = YES;” makes app crash on iOS 8? iOS-[self.navigationController setToolbarHidden:YES动画:NO]崩溃 - iOS - Crash on [self.navigationController setToolbarHidden:YES animated:NO] Deallocated error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM