Swift: XPC connection interrupted and app freezes? - ios

Ok, have no idea what is going on here but from what I understand from other questions
(XPC connection interrupted in Xcode 7 for iOS 9) , XPC connection interrupted means theres a storyboard problem. Per a similar answer I opened the storyboard as source code and looked for repeated
<keycommand>
tags, but there aren't any. I had to copy and paste a storyboard from another project since something changed, and I believe this caused it. What are my options here? What could be causing this freeze since there aren't any weird tags that I can see?

Same problem, getting the XPC error when tapping in a (SwiftUI) Text Field. Different solution:
Simulator > Device > Erase All Content and Settings
As described here,
The problem came from the keyboard that wasn't showing up. And I am not really sure why, I probably pressed a command that disables it.
To get it to work I have restarted the simulator. In the simulator menu, Hardware > Erase All Content And Settings
Now when I tap in a UITextField, the keyboard shows up and I don't get the "XPC connection interrupted" error anymore. Everything works fine.
This error was incredibly frustrating because there is no crash report, just a one-line "XPC connection interrupted" and the app freezes. And, to complicate things, it's apparently possible to get this error from some wildly differing causes -- various discussions have cases of VPN's, Bluetooth, and threading generating this. And of course -- Murphy's law -- I started getting the error after having implemented something utterly unrelated, but which has me troubleshooting threading & Core Data issues, all to no avail.
Hopefully this can help somebody else with the quick fix.

The problem for me was that there are two storyboards, the main storyboard and the launchScreen storyboard. If you go to the top left of Xcode and click on the Xcode file, it will bring you to a screen about the file. You then scroll to deployment info and switch the main interface to whichever storyboard you use. I think that since you copied and pasted the code is not linked up to the storyboard.

Related

Xcode crash on opening storyboard

I am developing an app for iOS with Xamarin. Lately, I haven't been able to access my storyboard file in Xcode or compile my app anymore because Xcode crashes right away when opening the .storyboard file.
The error message is the following:
ASSERTION FAILURE <br>
Details: Creating an out of band arbitration unit with a view (<IBUITableViewCell: 0x7fa88d13a5d0>) as the root under another view (<IBUITableView: 0x7fa88cf000e0>) is not yet implemented.<br>The view would need to be in two arbitration units, the one above for positioning constraints, and the root of the one below for sizing constraints. <br>But then that means that subviews cannot have constraints that affect the size of the view, so the view must have ibExternalTranslatesAutoresizingMaskIntoConstraints set to YES.
<br>Object: <IBUITableViewCell: 0x7fa88d13a5d0>
<br>Method: -ibArbitrationUnitWasCreatedWithReceiverAsRootUnderParent:
I tried rebasing my storyboard to the last version that worked (the one the app was submitted to the app store) and weirdly, even that version didn't work.
My plan was to manually remove and every view controller and add them one by one to figure out where the error is.
However I don't understand why XCode crashes when opening the storyboard and not just shows me exactly where the error in my xml is.
So if anyone has encountered this problem before and has a better way to fix it than to manually do it, I would really appreciate any help.
ibExternalTranslatesAutoresizingMaskIntoConstraints needs to be YES
Sounds like the Storyboard was created with an older Xamarin.iOS that introduce this issue.
The fastest solution is to open the storyboard in vi (or Xcode / View As Source, or another text editor of your choice, and replace all translatesAutoresizingMaskIntoConstraints="NO" with "".
Save the file, re-open it in the Storyboard editor and fix your contraints.

I got 'BSXPCMessage received error for message: Connection interrupted' in iOS 9

I've developed a social media app.
After iOS 9 launched, I've got a message
BSXPCMessage received error for message: Connection interrupted
XPC connection interrupted
Terminating since there is no system app.
and the simulator reboots by itself. and a real iPhone too.
when I touched UITextView on UIToolbar in CommentViewController. it's like text input UI of Message App, the base iOS app.
SIGKILL always occurs at any of lines in textViewDidBeginEditing: of UITextView's delegate methods, but not happen in textViewShouldBeginEditing:
But still works well in iOS 8.
THChatInput, SlackTextViewController, JSQMessagesViewController
, etc, I used many libraries, but all of those show me same crash.
I've already read a few of articles about this bug here, but their problem were caused by using CoreImage. unfortunately, I don't use anything about CoreImage
I appreciate in advance for helping me. Thank you.
I've found what causes this problem.
I've used a library called 'SWRevealViewController' for drawer menu in my project.
this is a wrapper class of view controller, so it includes some of view controllers and make a hierarchy.
In previous iOS9, it doesn't cause any problem.
In iOS9, its hierarchy of view controllers cause a problem, when popping up keyboard. it doesn't appear in other ordinary iOS9 project.
I don't say that some library I use have bugs, but some problems may be occured in iOS9.

My app crashes with no error message how can I find out where this comes from?

Hi I am working on an app witch worked great yesterday and when I re opened the project today and launched it on the simulator, my app crashed with no error message, how could I find out where the problem comes from? I added a screenshot of when my app craches. Please note that I have seen some similar questions on here that did not solve my problem
Two suggestions to try and track down the source of the crash:
Add an Exception Breakpoint on "All Exceptions"
Enable Zombie Objects in your project's Debug Scheme to see if you're sending a message to a de-allocated object
Try the two debugging steps separately (first enable Exception Breakpoint then enable Zombie Objects.)
Have you also tried cleaning the project and deleting/re-installing app from Simulator?
Make sure that the action handlers are properly linked up to your objects in MainStoryboard. e.i. if you look at your ViewController and find your object definition
#IBOutlet weak var sampleTextBox: UILabel!
It should have a circle to the left of this line of code. These circles should be filled in if everything is properly connected. If you see empty circles then these lines are not connected to objects properly. You will need to reconnect these lines to the Objects in the Storyboard by right clicking on the circle and dragging to the object in question.
Ok so after doing some research I realized that the "signal SIGABRT" was a connection problem so I went to the main storyboard, and to the connections inspector and I had some connections with a "!" so I deleted them and the app works great again ! I suspect it was because of some connections I deleted by error and reconnected either way if your having this issue be sure to check the connections inspector and delete all connections with a "!"

Multiple UIImageViews with same image gives Inconsistency error

I add 3 UIImageView objects to a MainViewController.
For each of them add the same image "test.png".
The images display correctly for each of the controls.
Close the MainViewController and reopen it.
You get an error displayed saying "The MainViewControllre" has 3 internal inconsistencies that were found and repaired.
The details for the message indicates that there are resources with the same name.
Although the images still display correctly and the program executes in the simulator I would like to solve this message.
This seems to be something that was introduced in XCode 5.
Sounds like you might be using StoryBoards for setting these images? I remember hearing about this issue a few months ago. Check out this SO post:
Storyboard Internal Inconsistencies
Seems like it may have been a bug in an early release of Xcode 5. The correctly marked answer here states updating to Mavericks and Xcode 5.0.1 fixed the issue. Also, if this in fact the problem, and you can not update for what ever reason, removing the storyboard references to the images and adding the image to the image view programmatically may solve your issue. Trivial example, but just in case you (or anyone else reading this) doesn't know:
[imageView setImage:[UIImage imageNamed:#"imagename.png"]];

App pausing but not getting an error after running a clean

I have no idea what is after going wrong but I'll state the events that happened before the error occurred
1: App was running fine as I was adding functionality.
2: I noticed that one of the view controllers was not showing the correct version but an older one. (I had added in a segmented control and it wasn't showing up)
3: I tried to uninstall the from my phone and build it again but it was still showing the old controller
4: I tried cleaning the project to recompile everything, after this step the application started to give me this problem
http://i.imgur.com/105yDr8.png
Some extra information:
1: This error occurs on the black screen before any view controllers load
2: The view controller I was working on was not the first view controller (so I do not think that it is the problem)
3: The main view controller has not been changed in days and was working perfectly since it was finished
I have absolutely no idea what is going wrong, and help would be greatly appreciated
UPDATE 1
New error message
http://i.imgur.com/5XVJWHT.png
UPDATE 2
Screenshot of storyboard and a finder window that opened when I clicked "show in finder on the storyboard". This would lead me to believe that it does know where the file is
http://i.imgur.com/Ybas1Yx.png
You've (probably accidentally) set a breakpoint at the return UIApp...-line.
You can identify a breakpoint by it's blue color at the left of a line. If it's activated, it's dark blue, else it's light blue. You can just drag it either to the trash can or somewhere else in your window to completely delete the breakpoint.
your app is getting crashed due to exception check the pannel objc_exception_throw
add exception breakpoint and you'll get the line of code where your app is crashing
It sounds like something is broken, and throws an exception. You're just seeing the exception being caught.
The way to investigate what is throwing is to add an exception breakpoint. Go to the breakpoints list and hit +, choose exception breakpoint and leave it at all. This should give you a breakpoing at the point where the except is being thrown.
As to what is happening. You had an app that ran with an old VC, you deleted the app and re-installed and now it crashes, so best guess is that your old version had the VC, but new one doesn't. Sounds like a missing xib or storyboard. It clearly isn't missing from the project, as you'd see that immediately, but check for target membership, changed name or localization problems.
I fixed the problem by renaming the storyboard to MainStoryboard1 and changing the target in
project > target > summary > iphone/ipod deployment

Resources