如何解决iOS 应用程序卡在启动屏幕上,而控制台显示:正在尝试为已有的场景句柄创建面包屑操作?
1.从TestFlight下载我的应用程序后点击它,或者直接从Xcode运行,应用程序卡在启动屏幕上,无法继续。
2.连接macOS后,在Console中可以看到SpringBoard进程中可能出现的相关错误:
Attempting to create a breadcrumb action for a scene handle which already has one (sceneID:#myAppName#-default). Are you trying to active an app that's already active?
...
[Main] dispatch event:
<SBMainTransitionSwitcherModifierEvent: 0x2837d7dc0; type: MainTransition; transitionID: xxx; phase: Complete; animated: YES; fromAppLayout: 0x0; toAppLayout: <SBAppLayout: 0x281500e80; primary: #myAppName#; environment: main>; fromEnvironmentMode: home-screen; toEnvironmentMode: application; pendingTermination: {(
)}>
app可以正常启动时,不会出现此日志中的“pendingTermination: {()}”。 现在我们在我的应用进程中看不到任何日志。
3.然后当我锁屏和解锁时,iPhone 只显示黑色背景,我不能像往常一样使用我的 iPhone。这是控制台中的日志:
3.1 锁屏:
[sceneID:#myAppName#-default] Setting deactivation reasons to: 'appSwitcher,systemAnimation' for reason: updateAllScenesForBand - Assertion added.
[sceneID:#myAppName#-default] Setting deactivation reasons to: 'appSwitcher' for reason: updateAllScenesForBand - Assertion removed.
Invalidating assertion 32-60-106090 (target:[application<#myAppName#>:7754](UIScene:com.apple.frontboard.systemappservices::sceneID%3A#myAppName#-default)) from originator [daemon<com.apple.SpringBoard>:60]
Calculated state for application<#myAppName#>: none (role: UserInteractiveNonFocal)
3.2 解锁屏幕:
Acquiring assertion targeting [application<#myAppName#>:7754](UIScene:com.apple.frontboard.systemappservices::sceneID%3A#myAppName#-default) from originator [daemon<com.apple.SpringBoard>:60] with description <RBSAssertionDescriptor| "injecting inherited from "UIScene:com.apple.frontboard.systemappservices::com.apple.springboard" to 7754<UIScene:com.apple.frontboard.systemappservices::sceneID%3A#myAppName#-default>" ID:32-60-106093 target:7754<UIScene:com.apple.frontboard.systemappservices::sceneID%3A#myAppName#-default> attributes:[
<RBSHereditaryGrant| endowmentNamespace:com.apple.boardservices.endpoint-injection UIScene:com.apple.frontboard.systemappservices::com.apple.springboard>,<RBSHereditaryGrant| endowmentNamespace:com.apple.frontboard.visibility UIScene:com.apple.frontboard.systemappservices::com.apple.springboard>
]>
Assertion 32-60-106093 (target:[application<#myAppName#>:7754](UIScene:com.apple.frontboard.systemappservices::sceneID%3A#myAppName#-default)) will be created as active
Calculated state for application<#myAppName#>: none (role: UserInteractiveNonFocal)
Finished acquiring assertion 32-60-106093 (target:[application<#myAppName#>:7754](UIScene:com.apple.frontboard.systemappservices::sceneID%3A#myAppName#-default))
[sceneID:#myAppName#-default] Setting deactivation reasons to: 'appSwitcher,systemAnimation' for reason: updateAllScenesForBand - Assertion added.
[sceneID:#myAppName#-default] Setting deactivation reasons to: 'appSwitcher' for reason: updateAllScenesForBand - Assertion removed.
4.重启我的iPhone后,一切又恢复正常了。
这个bug最近出现好几次了,但我以前没有遇到过这种问题。
这是 SpringBoard 中的错误吗?或者它是我的应用程序中的一个错误,我可以做些什么来修复它?
谢谢。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。