error-handling - iOS9 Storyboard 什么是未处理的 Action (handleNonLaunchSpecificActions)?

标签 error-handling uistoryboard ios9 xcode7 transition-coordinator

我注意到在使用 Storyboard 在 iOS 9 上运行我的应用程序时,控制台中会弹出以下错误。我正在使用 xCode7。这是我需要关心的事情吗?

-[UIApplication _handleNonLaunchSpecificActions:forScene:withTransitionContext:completion:] ** unhandled action -> <FBSSceneSnapshotAction: 0x176bfb20> {
    handler = remote;
    info = <BSSettings: 0x176a5d90> {
        (1) = 5;
    };
}

最佳答案

你的代码没有任何问题。这是 Apple 内部的日志消息,您应该对此进行雷达归档。

有两个提示表明这可能是Apple的代码:

  1. 方法名称前导的下划线_handleNonLaunchSpecificActions:forScene:withTransitionContext:completion是一种约定,表明该方法是声明它的类的私有(private)/内部方法。(参见 this comment .)

  2. 有理由猜测,FBSSceneSnapshotAction 中的两个字母前缀是 FrontBoard 的简写,根据 Rene Ritchie 在“iOS 9 wish-list: Guest Mode"”中的说法,FrontBoard 是与启动相关的整个软件系列的一部分应用程序:

With iOS 8, Apple refactored its system manager, SpringBoard, into several smaller, more focused components. In addition to BackBoard, which was already spun off to handle background tasks, they added Frontboard for foreground tasks. They also added PreBoard to handle the Lock screen under secure, encrypted conditions. [...]

我不知道 BSSettings 中的 BS 前缀是做什么用的,但是

BSBackBoard Settings 的简写,对此日志消息的分析将表明这不是您所做的任何事情,您应该提交一个包含重现步骤的雷达日志消息。

如果你想尝试获取堆栈跟踪,你可以实现 the category linked to here 。有些人会认为覆盖私有(private) API 是一个坏主意,但在这种情况下,临时注入(inject)来获取堆栈跟踪不会太有害。

编辑:

但是,我们仍然想知道这个 Action 是什么。因此,我在 -[UIApplication _handleNonLaunchSpecificActions:forScene:withTransitionContext:completion] 上放置了一个断点,并开始打印寄存器值,并找到了一个名为 FBSceneImpl 的类,其中包含大量信息关于我的申请:

Scene

我们能够找出接下来调用的是哪个私有(private)方法(存储在程序计数器,指令指针,寄存器15中。)

Program Counter

我尝试查找日志中引用的未处理的FBSceneSnapshotAction,但没有找到。然后,我对 UIApplication 进行了子类化,并覆盖了 _handleNonLaunchSpecificActions:forScene:withTransitionContext:completion。现在我可以直接了解该 Action ,但我们仍然不知道它是什么。

然后,我再次查看了 FBSceneSnapshotAction。结果它有一个名为 BSAction 的父类(super class)。

然后我写了a tool类似于 RuntimeBrowser并查找 BSAction 的所有子类。事实证明,它们的列表相当多:

Action List

我们拥有的两个方法名称(一个来自日志,一个来自设备上的程序计数器)表明这些操作在幕后用于在系统中传递操作。

某些操作可能会发送到应用程序委托(delegate)的回调,而其他操作则在内部处理。

这里发生的情况是,有一个操作未正确处理,并且系统正在注意到它。显然我们不应该看到它。

关于error-handling - iOS9 Storyboard 什么是未处理的 Action (handleNonLaunchSpecificActions)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32658037/

相关文章:

perl - 路径::Class::Unicode and error handling

swift - 调用中的参数标签不正确?

javascript - JWPlayer .onError 页面刷新时触发

ios - Branch.io - 链接打开应用程序但未获取其中的数据

ios - CGContextSaveGState : invalid context 0x0 at App Launch

ios - NSFileManager:无法在某些设备上创建目录

php - 将 PDO 异常记录到 error_reporting 和 error_log

ios - 如何让多个元素能够受到 View Controller 的影响

iphone - 了解坐标, View , subview 和方向更改

objective-c - 创建一个不附加到任何 UI 元素的 Storyboard segue?