Xcode signal SIGABRT - xcode

I received this warning from Xcode, though I have not changed a single character in the appdelegates (I´m new to Xcode). Nothing seems to work.
Here is the line it breaks:
return UIApplicationMain(argc, argv, nil, NSStringFromClass([Tre01AppDelegate class]));
I´ve changed the document version, restarted Xcode, the iOS simulator and the computer.
The problem I was working on while this error popped up, was embedding a webView, which I embedded in a new view controller (then I added the .h and .m-files for this controller, and set up the code for loading a website...). It all looked good and connected then the above came up.
Why is the appdelegate important to my web view, which is located in another viewcontroller? Do I have to initialize the new viewcontroller in the app delegate?
Many thanks, I know – I´m not very specific in adressing the problem, but I´m quite new to Xcode...

Related

Xamarin iOs Build failed : Storyboards

It has been a month that I can't build my Xamarin iOs project. This seemed to have started after I updated to the new Xcode for the free provisioning. Since then, I tried finding a solution to this problem, but I haven't seem to find one.
When building the application, Xamarin Studio prompt me with an error that only indicates the name of my storyboard without any description. (The build action used for my storyboard is InterfaceDefinition which is the default one I guess)
Xamarin Studio also opens the Storyboard when the build failed.
I tried to open the storyboard in Xcode and everything went fine. So I really don't understand what is happening with my storyboards.
I even tried to open it with Visual Studio and the build failed but with no error.
Any help would be welcomed !
Thank you in advance :)
I got the same error.
I found the problem. In my storyboard, I added a tableview with static cell. => this caused the error.
Static table views are only valid when embedded in UITableViewController instances
Just changed my tableview to dynamic Prototype and it worked.
One of the cause can be using same storyboard identifier for two view controllers. I faced this error and was able to detect it by opening storyboard file in Xcode.
Having the same StoryBoard.Id property set on different UIViewControllers is another cause.

Xcode 7.1 missing class template methods on El Capitan

MacBook Pro (Retina, 15-inch, Mid 2015)
El Capitan 10.11.1
Xcode 7.1 (7B91b)
When I do File > New > File, Subclass of: UICollectionViewController, I get an implementation file containing only:
#import "CVCTest.h"
#implementation CVCTest
#end
So, there are none of the UICollectionViewDataSource and UICollectionViewDelegate method stubs I expect. This is true for new UITableViewController and UIViewController subclass files as well.
This seems to be a suddenly new phenomenon; I created a UICollectionViewController subclass in a project last week which came with the stubbed methods. Xcode seems to have lost the class file templates.
After deleting the Xcode app and the ~/Library/Developer/Xcode directory, rebooting, and installing Xcode 7.1 from Mac AppStore, the behavior is the same.
I checked with on colleague whose Xcode behaves this way and then with another whose Xcode behaves as expected.
Anyone else experiencing this? Any clue what might be causing this?
Ok. A critical piece of information I left out of my question is that I was subclassing a controller class for an iOS project. The "o.m.g" answer is that somehow
OS X source
was selected at the bottom of the left pane of the source type selection view, instead of
iOS source
With iOS source selected, I get the class template file with the expected stubbed methods.
wow.

iOS 8 - Swift - Xcode 6 Beta - working without interface builder (no nibs and no storyboard)

I have been searching a lot in the inter webs and Stackoverflow. Unfortunately there doesn't seem to be much info around the new Xcode version, iOS 8 specifically with Swift and working without the Interface Builder.
The Templates to choose from as a starting point now does not have the option to start with an empty application. The least setup you have is to take the single view application, which already gives you the ViewController and a basic Storyboard.
I hate storyboards and I hate nibs. I want to do everything in code. I tried to delete the storyboard file, instantiate the window, set the rootViewController and make it visible just like in the good old days. the ViewController initializes without nib and bundle.
The result is this a SIGABRT with this error:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named 'Main' in bundle NSBundle </Users/[username]/Library/Developer/CoreSimulator/Devices/BC38B690-D30E-44FB-93B1-AB861D03B414/data/Containers/Bundle/Application/B6C160C8-67E1-4A74-9F81-55D097262050/blabla.app> (loaded)'
I sure hope that I will still be able to do UI without Interface Builder. Anyone has an idea on how to progress? I remember I was able to use an empty application with the previous Beta versions of Xcode 6.
In my opinion storyBoards are awesome. They make the development cycle easy and quick. But if you do not want them you can create a Single View Application template.
Delete the storyBoard and Follow these steps
1) Go to Your Target
2) Deployment Info
3) Main Interface -> Delete Main and keep field empty
It will not load a storyboard or any view. Now it's your responsibility to load Window and create rootViewControllers and views programmatically
The method outlined by codester is a good solution, but (in Xcode 6.0.1) the final step - deleting "Main" from the Main Interface section - would not work for me; I would delete the string, but as soon as I navigated away from that page or tried to run the app, the field would be repopulated with "Main". I ended up having to manually delete the "UIMainStoryboardFile" key/value entry in the applications Info.plist.

Main window doesn't run properly on Snow Leopard

My app developed in Xcode 4.5 on Mountain Lion runs flawlessly on Lion and ML.
My Snow Leopard tester reports that when the app starts, it is disabled. By that he means none of the controls are active and the red, yellow, green 'traffic light' is greyed out. If another app is opened that covers my app, when the covering app is moved, any control, or part of a control it covered is not there.
The menu bar is responsive, and my preferences panel works. The app can be shut down from the menu, I don't know if it can be shut from the keyboard.
Another app that uses the same serial code works fine.
I need help with putting together a plan to solve it. I don't know how to trace this.
Fundamentally, the problem is that you're expecting data to be in NSUserDefaults. On first launch, NSUserDefaults returns nil for the keys you access, and passing this nil result through later code causes exceptions to be thrown. The solution is to register defaults with NSUserDefaults upon application startup:
#implementation AppController
+ (void)initialize
{
NSDictionary *defaultValues = #{#"SomeKey" : #"DefaultValue"};
[[NSUserDefaults standardUserDefaults] registerDefaults:defaultValues];
}
#end

ibtool failed when compiling storyboard

I just downloaded a project from a git repository on two different Macbooks. On the first, it runs without problem.
On the second Macbook shows me the following message:
Command /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool
failed with exit code 255
When trying to compile the file MainStoryboard.storyboard.
When I click the MainStoryboard.storyboard on XCode, it crashes and doesn't open it.
On the other computer, everything works fine.
I tried the following things to fix this problem, without success:
1) Upgraded XCode from 4.5 to 4.5.2
2) Removed the project directory and cloned the repository again.
3) Deleted the contents of my project on ~/Library/Developer/Xcode/DerivedData
4) purge
Any ideas on how to fix this problem?
Found this issue using XCode 5.
I've solved the issue, but it required a hard reset.
Some said it was because I installed XCode outside of the App Store, or because the simluator was buggy, or because XCode was pointing at the wrong version of the Simulator, or a resoruce was missing a target membership, or whatever. I tried all of that.
I downloaded XCode from the App Store, re-installed the Simulators, and still no luck. So I just rolled back my repository to an earlier date, and lost some work in the process. Not much though, because I always commit little and often.
Since ever starting to use storyboards back in 2011, I have always committed little AND OFTEN. Storyboards are fragile.
EDIT
After adding the new components back in, the problem re-surfaced.
I noticed that I put a static table view, within a UIViewController. I was doing this before.
I was using a subclass of UITableViewController in code, but the storyboard scene, was a UIViewController. I dragged out a UITableViewController instead, and moved the table view cells into that, and it solved the issue.
All thanks to missing error messages. Where have they all gone since XCode 5?
Do a
which ibtool
At the command line on both Macs. Chances are they are different.
Before Xcode was bundled in a single .app bundle it would install command line tools in folders like /usr/local.
I would recommend you remove those local copies to avoid interference with Xcode's built in version, i.e. that it uses the old version. If you still want to be able to use ibtool from the command line, here's an explanation about xcrun: http://www.cocoanetics.com/2012/07/you-dont-need-the-xcode-command-line-tools/
Almost half year later I finally succeeded to discover what was causing this problem and fixed the bug.
Now, with XCode 4.6.3 it gives me another clue about the problem:
2013-06-28 18:15:32.606 Interface Builder Cocoa Touch Tool[7894:f07] CFPreferences: user home directory at file://localhost/Users/[myusername]/Library/Application%20Support/iPhone%20Simulator/User/ is unavailable. User domains will be volatile.Command /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool failed with exit code 255
After receiving this new message, I searched for this User folder inside "iPhone Simulator" and there were no folder named "User".
I created the "User" folder, did a clean and after this I was able to build the project again!
the fix for me in Xcode 6.4 was to ... restart my computer. sad, but true.
I was getting the same error. It turned out I had miswired some of the outlets in the tableview cell.
I don't know if someone is still struggling with this error but today was my turn to confront it. I just solved it. This is the context:
I had a UITableViewCell with half of it cover by a simple UIVIEW. Inside this UIVIEW i had many other view (UILables, UITextField, etc etc)
Just where the UIVIEW ended (Again it covered the middle of the entire UITableViewCell) i placed an UIImageView. Half of the UIImageView covered the UIView and the other half was on the UITableView itself. In the Hierarchy the UIImageView was on the UITableVIewCell and not inside the UIView.
The problem was when i was applying autolayout i put a constraint between a view inside the UIView and the UIImageView that was outside of the UIVIEW.
When i run the app, the error came up. After half an hour deleting views and stuff i realized that the error was caused by that constraint. After deleting that constraint, the error was gone.
So bottom line, check your constraints! only "Connect" views with others that are inside the same superView.
Good luck!
Try completely reinstalling Xcode. Seems like there's something wrong with ibtool that a reinstall is probably able to fix.

Resources