Error: _handleNonLaunchSpecificActions in iOS9

IosObjective CXcodeIos9

Ios Problem Overview


I am getting the following error on iOS 9:

    -[UIApplication_handleNonLaunchSpecificActions:
      forScene:
      withTransitionContext:
      completion:] unhandled action -> 
      <FBSSceneSnapshotAction: 0x150b2aef0> 
       {
            handler          = remote;
            info = <BSSettings: 0x15333f650> 
            {
                (1) = 5;
            };
        }

Has anyone else come across this error or it's implications? What is wrong?

Ios Solutions


Solution 1 - Ios

There is nothing wrong with your code. This is a logging message internal to Apple, and you should file a radar about it.

There are two hints that show that this is probably Apple's code:

  1. The underscore leading the method name _handleNonLaunchSpecificActions:forScene:withTransitionContext:completion is a convention indicating that the method is private/internal to the class that it's declared in. (See this comment.)

  2. It's reasonable to guess that the two letter prefix in FBSSceneSnapshotAction is shorthand for FrontBoard, which according to Rene Ritchie in "iOS 9 wish-list: Guest Mode" is part of the whole family of software related to launching apps:

> 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. [...]

I have no idea what the BS prefix in BSSettings is for, but an analysis of this log message would indicate that it's not anything you did, and you should file a radar with steps to reproduce the logging message.

If you want to try and grab a stack trace, you can implement the category linked to here. Some would argue that overriding private API is a bad idea, but in this case a temporary injection to grab a stack trace can't be too harmful.

EDIT:

But, we still want to know what this action is. So I put a breakpoint on -[UIApplication _handleNonLaunchSpecificActions:forScene:withTransitionContext:completion] and started printing out register values and found a class called FBSceneImpl which had a whole bunch of information about my application:

Scene

We are able to find out which private method is called next (stored in the program counter, register 15.)

Program Counter

I tried finding the un-handled FBSceneSnapshotAction referenced in the log, but no dice. Then, I subclassed UIApplication, and overrode _handleNonLaunchSpecificActions:forScene:withTransitionContext:completion. Now I was able to get at the action directly, but still, we don't know what it is.

Then, I looked at the FBSceneSnapshotAction again. Turns out it has a superclass called BSAction.

Then I wrote a tool similar to RuntimeBrowser and looked up all of the subclasses of BSAction. It turns out that there's quite a list of them:

Action List

The two method names we have (one from the log and one from the program counter on the devices) indicate that these actions are used under the hood for passing actions around the system.

Some actions are probably sent up to the app delegate's callbacks, while others are handled internally.

What's happening here is that there is an action that wasn't handled correctly and the system is noting it. We weren't supposed to see it, apparently.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionRoddyView Question on Stackoverflow
Solution 1 - IosMosheView Answer on Stackoverflow