XPC connection aborted in Xcode 7 for iOS 9

I recently upgraded to Xcode 7 and upgraded my iPhone to iOS 9. I developed and released an iOS app that did a great job with the latest version of iOS 8 and Xcode 6.

When I try to go through the process of updating the application to support iOS 9, I get the most ridiculous strange error that left me puzzled.

I automatically performed all the syntax corrections using Xcode, and now my application is building correctly. At first it works fine.

I have a button that goes to the view controller using WebView. This view controller downloads a link that will display an image, website or YouTube video. Content loads fine, as always. However, the program will crash and restart the simulator (and my iPhone) and send me to the lock screen when I press the back button (I’m in the navigation stack).

In Xcode, I get the following messages:

XPC connection aborted. Completion as there is no system application.

I have Flurry analytics built into my application, by the way, not sure if this is a problem.

How can I fix this problem? My searches for XPC connections do not seem to return problems like mine. I don’t even know what an XPC connection is, so why is it in my application?

EDIT: I found a workaround for this problem. I can’t say this is a fix.

A crash occurred while using the self.navigationController? .PopViewControllerAnimated method when set to true. I had to set this value to false, and the failure stops (now the transition looks awful).

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

+55
iphone ios9 xcode7 xpc
Sep 20 '15 at 20:48
source share
8 answers

The problem lied in the storyboard for me. I created a new project and set out my views, and everything seemed to work just fine. I found these lines in the source of the storyboard (right click on the storyboard and select the view as β†’ source code) that were not distributed between the working version and the broken version:

<keyCommands> <keyCommand/> </keyCommands> 

I have no idea what these lines should do, or how they crept into my storyboard file, but this is what distorted the application so much that the phone had to restart. I removed these lines from my main project and everything worked again.

+13
Dec 07 '15 at 17:51 on
source share

This error may be caused by repeating the loop. In my case, it was a "for" loop in which I reset the counting variable. As soon as I added NSLog in the loop, that was obvious.

+5
Dec 25 '17 at 23:13
source share

I ran into the same problem. I don't know if this will help you, but I also think this comes from the storyboard:

In my case, the problem comes from a UITextView. Whenever I try to change the default text inside it, I have this error. If I allow the default text or leave it blank, the application works fine. Creating an IBOutlet and changing the text programmatically also works.

I tried with other user interface elements, but only the UITextView seems to have this problem.

+2
Oct 30 '15 at 21:37
source share

I struggled with the same error. Through the process of liquidation, I have found that this has nothing to do with any class, but is related to the storyboard. Fortunately, I have regular backups, and I tried to compare the storyboards to establish what I did, but couldn't find anything obvious. The backup worked fine, and I was able to copy my controller classes (from the erroneous copy with the changes) to the backup, and they worked fine.

I think there is a mistake in the storyboards.

+1
Oct 07 '15 at 15:35
source share

I have the same error message when I put a subview in the -layoutSubviews method:

 -(void)layoutSubviews { [super layoutSubviews]; [self populateByImageViews]; } 

This leads to an endless loop of the build process and application crashes. Do not place cellars in this place!

+1
Jul 30 '16 at 10:40
source share

Removing a UITextView from one of the views in Storybord removes the error in my case.

0
Nov 24 '15 at 12:27
source share

When using QLPreviewController, I ran into this problem. The error messages below are

 XPC connection interrupted _BSMachError: (os/kern) invalid capability (20) _BSMachError: (os/kern) invalid name (15) 

Since XPC means interprocess communication between OS X, so I think this can solve the problem,

 dispatch_async(dispatch_get_main_queue(), ^{ // do what you want to do. }); 
0
Dec 02 '15 at 4:46
source share

In the valueChanged: method of UIControl, I had the same problem so I made the code inside valueChanged: to run in the main thread, and it solved the problem.

 @IBAction func valueChanged(sender: AnyObject) { dispatch_async(dispatch_get_main_queue(), { //code } } 
0
Jan 27 '16 at 11:26
source share



All Articles