【发布时间】:2014-09-26 17:25:39
【问题描述】:
我继承了一个代码库,只是注意到当我关闭应用程序(点击主页按钮)然后尝试使用任务切换器(双击主页按钮)切换到该应用程序时,我的应用程序出现在任务切换器中一个完全黑色的图像,而不是我正在查看的最后一页的预期屏幕截图。
这是否发生在其他人身上?关于可能导致它的任何想法?正如我所说,我继承了这个代码库,所以我不知道是什么原因造成的。
Matt 在接受的答案中弄清楚了下面发生了什么,但我想我会在这里添加一些日志,以防其他人遇到这种情况:
// Logs showing a correct shutdown
Sep 26 16:48:14 iPod-touch iap2d[2096] <Warning>: process HTTPLeakTester is now running in the background
Sep 26 16:48:15 iPod-touch iap2d[2096] <Warning>: process HTTPLeakTester is now suspending
// Logs Showing my killed app's shutdown
Sep 26 16:47:19 iPod-touch iap2d[2096] <Warning>: process ***** is now running in the background
Sep 26 16:47:19 iPod-touch SpringBoard[42] <Warning>: BSXPCMessage received error for message: Connection interrupted
Sep 26 16:47:19 iPod-touch SpringBoard[42] <Warning>: Application 'UIKitApplication:*****[0x5d54]' exited voluntarily.
Sep 26 16:47:19 iPod-touch assertiond[56] <Error>: assertion failed: 12A365: assertiond + 62335 [032107D4-DB2B-36DD-AC98-6060D8C62F73]: 0x3
Sep 26 16:47:19 iPod-touch assertiond[56] <Warning>: pid_suspend failed for <BKNewProcess: 0x16614640; *****; pid: 2386>: Unknown error: -1, Unknown error: -1
Sep 26 16:47:19 iPod-touch Unknown[56] <Error>:
Sep 26 16:47:19 iPod-touch assertiond[56] <Warning>: Could not set priority of <BKNewProcess: 0x16614640; *****; pid: 2386> to 2, priority: No such process
Sep 26 16:47:19 iPod-touch assertiond[56] <Warning>: Could not set priority of <BKNewProcess: 0x16614640; *****; pid: 2386> to 4096, priority: No such process
Sep 26 16:47:19 iPod-touch assertiond[56] <Error>: assertion failed: 12A365: assertiond + 62335 [032107D4-DB2B-36DD-AC98-6060D8C62F73]: 0x3
Sep 26 16:47:19 iPod-touch UserEventAgent[17] <Warning>: id=***** pid=2386, state=0
Sep 26 16:47:19 iPod-touch iap2d[2096] <Warning>: process ***** is now switching to other state
Sep 26 16:47:19 iPod-touch iap2d[2096] <Warning>: process ***** is now terminated
【问题讨论】:
-
搜索
ignoreSnapshotOnNextApplicationLaunch。 -
谢谢马特,我在谷歌搜索这个问题后已经这样做了。它不在此代码库中。
-
您能否追踪应用程序
willResignActive和didEnterBackground中可能发生的其他情况? (搜索这些短语。) -
两者都没有实现。不幸的是,如果它这么简单,我就不需要问了。
-
我担心你会这么说。 :( 我对自己的应用程序执行此操作有一个模糊的记忆,我正在尝试重建原因。该应用程序实际上是否已针对最新系统重新编译?我的模糊记忆是在那之前我遇到了这个问题;例如 iOS 6 应用程序在 iOS 7 上运行可能会像这样。