XPC connection interrupted in Xcode 7 for iOS 9

iOShepherd picture iOShepherd · Sep 20, 2015 · Viewed 65k times · Source

I recently updated to Xcode 7 and upgraded my iPhone to iOS 9. I have developed and released an iOS app that had worked perfectly fine on the latest version of iOS 8 and Xcode 6.

Upon trying to go through the process of updated the app for iOS 9 support, I am getting the most ridiculously strange error that has left me baffled.

I have done all the syntax corrections automatically through Xcode, and now my app builds properly. It even runs fine at first.

I have a button that segues to a view controller with a WebView. This view controller loads a link that will display either an image, website, or video from youtube. The content is loaded perfectly fine as always. However, the program will crash and reboot the simulator (and my iPhone) and send me to the lock screen when I click the Back button (I am on a navigation stack).

In Xcode, I get the following messages:

XPC Connection Interrupted. Terminating since there is no system app.

I have Flurry analytics integrated in my app by the way, not sure if thats an issue.

How can I fix this issue? My searches for XPC connections do not seem to return problems similar to mine. I do not even have a clue what an XPC connection is, so why is this in my app anyway?

EDIT: I have found a workaround for the issue. I cannot really say it is a fix.

The crashing was occurring during the use of the method self.navigationController?.popViewControllerAnimated, when set to true. I happened to set this to false, and the crashing stops (now the transition looks awful).

I do not know why this works, and just adds to my confusion.

Answer

Chase Roberts picture Chase Roberts · Dec 7, 2015

The problem lied in the storyboard for me as well. I created a new project and laid out the views and everything seemed to be working fine. I found these couple lines in the storyboard source (right click on storyboard and select view as -> source code) which weren't common between the working version and the broken version:

<keyCommands>
    <keyCommand/>
</keyCommands>

I have no idea what those lines are supposed to do, or how they crept into my storyboard file, but they were what was crashing the app so hard that the phone had to restart. I removed those lines from my main project and everything worked again.