When adding iPhone nib file SIGBRT error occurs - ios

I have developed a Web Browser app called iBrowse for iPad. Now when I try to add iPhone support with a xib file I get a SIGBRT error in the Simulator.
The app uses xib files as the main page and I have had the iPad xib file since I created the app and it works fine. Because I want iPhone support I added a new iPhone xib file (with .h and .m files). When I make the Application Type Universal and select the xib file from the dropdown I get the following error when I launch the app for iPhone.
2014-01-07 14:03:35.262 iBrowse[2207:907] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIApplication 0x753e440> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.'
*** First throw call stack:
(0x1c95012 0x10d2e7e 0x1d1dfb1 0xb7ee41 0xb005f8 0xb000e7 0xb2ab58 0x234019 0x10e6663 0x1c9045a 0x232b1c 0x2348da 0x1668b 0x169a2 0x15876 0x26cb5 0x27beb 0x19698 0x1bf0df9 0x1bf0ad0 0x1c0abf5 0x1c0a962 0x1c3bbb6 0x1c3af44 0x1c3ae1b 0x1517a 0x16ffc 0x2395 0x22d5)
libc++abi.dylib: terminate called throwing an exception
(lldb)
as well as a Thread 1: SIGBRT error
The files only include the default content and I have not added anything to them. I have also had this error when declaring the xib file to use for iPad so I let it chose the only xib file that existed. Now with a separate one for iPhone I have to explicitly declare the xib file to use otherwise it uses the iPad one which does not fit on the screen.

Right Click on the xib file to see referencing Outlets. Turned-out some of the control that still referencing and older name and causing this error to happen.

Related

How to identify crash from XIB

I don't have any code implemented in view controller to set the font or attributedLabel. But I'm seeing crash with below reason.
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: -[_SwiftValue pointSize]: unrecognized selector sent to instance 0x610001040ba0
There is another way of debugging issue. When app is crashed, check left panel and you will observe threads stack. In that find out Obj_exception_throw select that and use your logging area to run command po $arg1. This may give you the correct reason for crashing.
Or else, you can try using Application Unit tests for verifying all your IBOutlets and objects, loaded from NIBs.
You can select that xib and open it as source code.
Or search tho whole project to find that.

Storyboard error with Target Membership(GREYED OUT)

I recently renamed my project and a variety of errors came up relating to the paths that Xcode was trying to use to access my files.
This was most likely due to an ill attempt at renaming the project so I retracted my efforts and decided I would just change the name of the App the customers see. Anyways a peculiar error has risen up because of this.
When I build the app it crashes with a THREAD 1 SIGABRT error. Here is the output of the console.
Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: 'Could not find a storyboard
named 'Main' in bundle NSBundle
(loaded)'
*** First throw call stack: (0x18b2341c0 0x189c6c55c 0x191835bd0 0x191306b48 0x1910ef0a8 0x1913057c0 0x19131a080 0x1913028c4
0x18cdd58bc 0x18cdd5728 0x18cdd5ad0 0x18b1e2278 0x18b1e1bc0
0x18b1df7c0 0x18b10e048 0x1910e85dc 0x1910e3360 0x100037bb8
0x18a0f05b8) libc++abi.dylib: terminating with uncaught exception of
type NSException
I have cleaned my project several times as well as doubled check the plist to ensure the string was correct. Here is a link to a similar question whose answer I tried.
Could not find a storyboard named 'Main' in bundle
I found my problem but still am not sure how to fix it. In my main storyboard under The File Inspector my TARGET MEMBERSHIP for the App is GREYED OUT but the Test and UITest version of it are not.
I have tried a variety of build with different checks as well as deleted the app off of my physical device and cleaned the project and tried again. I even deleted the reference to the Main.storyboard and re-added by dragging from a pane like in one of the answers on the link provided and it lets me select all the Target Membership's but when I open the File inspector only the tests are selected on not the main top option. Can anyone help me out on this?
It would be greatly appreciated, I have been at it for hours and I am sure it is something small I am missing.
have you tried to verify the your info.plist?
you can also create a new storyboard (copy all viewController in Main.storyboard) and then in "Main storyboard file base name" key of your plist set the value of your new storyboard name.
Or check this Build Settings:
check also the target associated it.

Application working fine in iOS 8 device but crashing in iOS 7 devices

I have developed application using Xcode 6 which is using auto layout and size classes . It is working fine in iOS 8 devices but there is problem while running application on iOS 7 devices. In one view controller the application is crashing with the following exception :
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIView 0x7916a9c0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key keyPath.'
I have checked all the connection in connection inspector ,those all are clean. Please suggest some solution to overcome this problem .
This is normally related to a deleted IBOutlet. Check your Storyboard/Nibs outlets and see if there anything marked with an "!": it means the corresponding outlet was removed.

App can't start after I deleted localization and renamed uibutton

I made simple app with 2 languages. When it was done I've decided to delete one language (and did so): I deleted language from project-info-localizations.
After that I've tested app on the device (iPhone) and found that app still has additional (deleted) language. Then I've deleted the app from the iPhone and run project again - it had no sense to my changes. I don't understand the reason... However, later I've found mistake (grammar) in the name of the button and renamed it. That action completely killed my app - it can't be run on the iPhone from that very moment.
Error is: 2013-01-25 11:46:34.087 timeLimiter[13649:907] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key startAlerButton.'
It mentions "startAlerButton" which was renamed (I've checked all relations in .h, .m, storyboad).
Please check if there is still some connection to outlet startAlerButton in the xib files.

IOS5 - Could not load NIB in bundle

I have an app in the appstore which works fine on any iOS < 5.0.
But in iOS5 my app won't launch, the error I get is:
Terminating app due to uncaught exception 'NSInternalInconsistencyException',
reason: 'Could not load NIB in bundle: 'NSBundle
</var/mobile/Applications/****/***.app> (loaded)' with name 'MainWindow''
Does anyone know how to solve this error?
Update
The app seems to work on the iPad 2 but not on the iPad 1
(now I am even more confused)
The problem is probably that "MainWindow.nib" does not exist in the builded app. Either your xib is not named "MainWindow.xib" or your xib is not included into your project. YOu can check this by looking into the .app-directory on your phone or simulator.
I've got the same error yesterday and the problem was that I had a xib-file which was accidentally assigned a localization to. So maybe you have also added a localization to it then just remove it or provide a default one.

Resources