I was trying to rename an app like I regularly do. I go to the project title at the top left, double tap, and rename the app.
It usually works. However, this time, I have come across a Signal Sigabrt. I tried renaming the project only, but that doesn't work. All of the connections seem to be correct. Here is my error.
This is the first time I have come across a Signal Sigabrt for this reason. Could someone show me what I am doing wrong? Thanks.
Update
When I keep the name of the project the same as the original one, the app runs fine. If I change it to the new one, the app crashes. What should I do?
The screenshot you posted indicates problem in one of your Interface Builder files. Most likely the outlet connections defined there are not correct anymore.
This is a long shot suggestion, but have you been adding and removing objects to the view, or creating and renaming your Outlets? Sometimes this can result in outlets in the xib file which no longer exist in the header or implementation files (I can't explain why this is, although I'm sure there's a reasonable explanation.)
In any case, with the Interface Builder open check the Connections Inspector, which is the button all the way to the right in the Utilities panel. Make sure there are no lingering outlets or actions over there which are not linked to any objects. You may need to cycle through the objects in your view,even the view itself, to make sure you aren't missing any. If there are any of them listed, delete them and try to run the app again.
Related
I'm working on the code in a project when I suddenly notice the ViewController in Storyboards is greyed out with the name of the VC in the center.
Here's a screenshot..
I was only editing some code on the right and I'm not sure exactly when, but my eyes adjusted and noticed this VC completely greyed out in Storyboards.
I tried deleting Derived Data, cleaning, quitting Xcode, building again, etc.
Nothing seems to work... ANy help with this would be super appreciated. I'm also very new to programming in general.
Well it turns out if you ever run into this problem, it's because you're not paying close attention and haven't realized you've somehow magically deleted your entire view inside the ViewController.
I did this once before by hitting something randomly on my keyboard (don't know what it was) but that time I saw it happen and just hit "undo".
This time I was passed the point of simply hitting "undo" and had to add a view again and rebuild and reconnect all the components in the view. That was basically it. Problem solved...
For quite some time now, the Xcode project for our iOS App has been making problems when viewing the "Main" storyboard.
Whenever we enter the "Main" storyboard, it builds the views like it should and lets us work on the layout. However when we then try to exit that storyboard and try to display any other file in Xcode (no matter the file type), Xcode becomes unresponsive. Looking into the "Activity Monitor" app on our Mac, it displays the following process:
Manually stopping that process makes Xcode responsive again. Now the following is displayed in the Issue Navigator:
The ViewControllers it mentions are completely white, but the project becomes usable again and building and running our app results in the correct interface being displayed.
I've looked into similar questions but can't seem to find someone with this exact problem. This IB Designable Error question doesn't seem to apply, since our project stops responding upon exiting the storyboard and doesn't just automatically throw a non-blocking error.
The accepted answer for this question also doesn't help us, since there are no actual crash logs left behind - the process doesn't crash, it hangs and needs to be manually stopped. There are no crash reports generated in the mentioned folder.
Our app currently has three storyboards, but this only happens with the "Main" storyboard, so the error might relate to a certain element in that file. We are using several IBDesignable Elements, however all of them import either none or both init statements, as described in this question.
Is there any way to look into what makes the IBDesignablesAgentCocoaTouch process use this much CPU and ultimately makes Xcode unresponsive?
In the image see the highlighted portion .swift(Interface), When I get this it makes me unable to drag and connect from storyboard to viewcontroller class.
I have searched but not getting any clue that what is the issue behind this.
Can anyone help regarding this?
I have tried, clearing cache, cleaning the build, restarting the MBP etc but nothing helped.
I am unable to solve it out.
Rather than choosing "manual" and selecting the interface, you might use "automatic" and when you select the control in IB, you should see the actual .swift file (not the interface) in the assistant editor, and you should be able to control-drag at that point.
And you didn't mention it, but if you ever have troubles hooking up outlets, double check that the base class has been properly set in IB before you try hooking up outlets.
This is a Xcode bug, update to 8.3.2 to see if it fixes your problem (it doesn't show up on the app store update sometimes, so manually download it)
My Xcode project using a storyboard entered in a very weird state recently: Xcode keeps building the whole project and notably the storyboard after each keypress. I found no reason for this behavior neither in my project diffing all interesting files (storyboard and project) neither a setting in Xcode (maybe I just could not find it?) Needless to say that this "feature" makes working on my project nearly impossible since the CPU is constantly occupying with rebuilding the storyboard when I type new code. Anybody seen this?
It is caused by the IB_DESIGNABLE definitions in the source header files. Probably it makes problem only if the header file containing IB_DESIGNABLE is included (even implicitly) to the source file you are currently editing.
I did not find a definitive solution how to disable IB_DESIGNABLE and thus compiling the storyboard and the source files continuously. I would appreciate an Xcode flag to disable this temporarily. I tried also surrounding the IB_DESIGNABLE with #ifdef macros but they are considered even if the #ifdef evaluates to false. Commenting out one by one the IB_DESIGNABLE helps but it is not a feasible solution with many IB_DESIGNABLEs.
Update
I finally found a quick way to avoid this annoying behavior. Having the storyboard opened in the active window, disable "Automatically Refresh Views" from the Editor menu. This will stop updating the views in the storyboard editor that use your custom code and thus speed up your development significantly. When you need again the just-in-time compiling to have a visual preview of your custom code, enable this option again (it seems you also have to re-open your storyboard to make it working again).
You may wish to add a key binding to the command, such as command-option-control-A, to easily toggle the behavior on/off. To add a key binding in Xcode, touch command-comma for preferences, choose the Key Bindings tab, use the search bar to find the command, then double-click on the right area to add your desired keystroke.
"Leave it off" approach
Alternately turn "Automatically Refresh Views" off, and never turn it on.
Make a convenient keystroke for "Refresh all views", say command-option-shift-R
As you work, just touch command-option-shift-R from time to time, or as needed. It's generally only necessary to touch command-option-shift-R as you work on the storyboard.
I had this problem and the accepted answer did not work for me.
The problem I had was that I always keep the storyboard open in it's own tab within XCode so that I can access it quickly.
The only way I could fix it was to either close that tab or select a different file (like a normal code file) and then close and reopen XCode. Thereafter it was no longer rebuilding on each keystroke.
Be warned however if you need to open the storyboard to make changes then this problem can sometimes reappear and I will have to repeat the above process.
Can't wait till Apple fixes this as it is very frustrating indeed!
(ノಠ益ಠ)ノ彡┻━┻
I have a project in xCode 6 using Swift (my very first experience developing iOS Apps).
I was having problems with gestures (they are alive even after removing them from storyboard) and decide to delete the ViewController I was having problem. The program compiled as it still exists. Then I decide to delete and remove reference to file main.storyboard and everything works just as before.
I believe that is related to source control
Where are those view controllers and even the storyboard stored?
By using the storyboard, sometimes you are creating some link between your elements and/or some part of your code.
These links will still be, even after deleting the element unless you delete the link itself.
In order to perform good deletion, you should first right click on the element you want to delete and suppress all its links. Then you can safely delete your element: