Question

I've just finished off an app for the iPhone which, until today, ran fine on the iPhone simulator and actual devices.

I tried changing the xib which is loaded in the applicationDidFinishLaunching method in my application delegate class - all I did was change the string in initWithNibName.

When I launch the app on the simulator, the Default.png image is shown, then the app crashes with an uncaught exception. When running on a device, the Default.png image is shown for about 10 seconds, the UI is never loaded and I get 'GDB: Program received signal: "SIGABRT".' on the Xcode status bar. Debugging shows that applicationDidFinishLaunching is never actually reached before the app crashes.

Setting the starting xib back to the original solves the issue, but now I've made a change and saved it in the Interface Builder and the app shows the same issues as above - I've made no code changes at all.

Is this a memory issue, or a known issue of a common mistake?

NOTE: I've made no code changes whatsoever, and the only changes I've made to the xib are cosmetic, the IBOutlets are all intact.

Was it helpful?

Solution 2

Sorry guys, my fault - it appears I deleted the MainWindow.xib file, so the delegate wasn't called on startup after I made changes. I've recreated it and linked it to the app delegate and UIApplication so now everything works.

OTHER TIPS

You probably changed an IBOutlet's name in code without changing it in the xib.

You probably had IBOutlets connected from a xib back into your code, and those connections are broken.

You'll have to give us a little more detail on how the nibname string was changed. Did you rename your xib file?

I renamed some classes and Xibs and got SIGABRT into main.m

the Class name in Identity Inspector may be pointing to non existant class name

its because in the initWithNibName you are not giving the correct xib name so it will crash

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top