I downloaded xcode 3.2 and the iphone sdk 4.1, which has been working wonderfully, until a few days ago. For some reason whenever I open interface builder by clicking on a xib file all the pictures in the buttons and imageviews display a big blue question mark, and then interface builder gives me this:
Assertion Message: An uncaught exception was raised.
Exception Name: NSInvalidArgumentException
Reason: * -[NSCFDictionary setObject:forKey:]: attempt to insert nil value (key: ../goldnquartz.jpg)
User Info: (null)
And asks if I want to crash or continue. If I continue, I cannot do anything useful in IB. I also made a new blank .xib file and tried to open that file with IB, but I got the same message.
How do I fix this?
I had the same problem today. It was a broken image file.
Related
I am running my Xcode project (Xcode 11) on an iPhone 4S running iOS 9 and I am getting the following error:
Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named _UIScrollViewLayoutGuide'
I have tried looking up solutions to this error but could not find any. My code has installed all constraints and am suspecting it is because I am using the Interface Builder to create the scroll view.
What is odd is that other scroll views in the app are working fine, but this one keeps giving me this error… Any way to solve it?
It seems that I have found an answer! I am unsure why Xcode did not flag the error in the first place. With the new Xcode support for iOS 13, ScrollView Content Layout Guides are automatically enabled. In iOS versions below iOS 11, there is no Content Layout Guide attribute.
I disabled the Content Layout Guides by selecting the Scroll View, going to the Size Inspector and deselecting 'Content Layout Guides' at the bottom of the first section.
This fixed my issue!
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.
I'm working with the source code for BonjourWeb using iOS 6 and Xcode 4.5.
BonjourWeb Source code for Xcode
In BonjourWebAppDelegate.m, the setting for showCancelButton:YES in the "applicationDidFinishLaunching: application:" method causes the program to crash when the Cancel button is clicked in the app's browser with the error: 2012-10-27 13:07:45.309 BonjourWeb[1762:c07] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* +[NSNetService dictionaryFromTXTRecordData:]: cannot convert nil to a dictionary.'
How can I rectify this to work properly?
Thank you.
Don
Resolved. The call to the method causing the problem is not needed.
I am building a RSS feed on a tableview. When i run the app, on my iPhone could run smoothly while in ipad, it crashed and showed "Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named UIRefreshControl'"
I tried to run the app on my ipad simulator, it also could run smoothly. May I know what is the problem for that?
Thanks
UIRefreshControl only exists on iOS 6. So if your iPad is running 5.1.1, you won't be able to use UIRefreshControl, because UIRefreshControl did not exist in iOS 5.1.1. So when the nib decoding happens, the decoder finds "UIRefreshControl", it doesn't know what to do with it, and it crashes.
In your storyboard, click on the tableview and go to the Attribute Inspector. Under the section "TableView Controller" there is a selection window for "Refreshing" that can be set to disabled. When I built for my iPad-1, running iOS 5.1 I got an empty tableView instead of the error, 'Could not instantiate class named UIRefreshControl'. This was to be expected since I haven't populated the device with files to select, yet.
Whenever I add an object (specifically a UIButton or UILabel) to my Storyboard view, Xcode crashes. I've tried rebooting and reinstalling Xcode. I've also tried to recreate my view in a new project. It doesn't crash at first, but it does once I add a few more buttons to the Storyboard.
When I right click on MainStoryboard.storyboard in the Navigator and select "Open As: Property List", I get an error: "The data couldn't be read because it has been corrupted." In fact, this error appears when I try to open my .h and .m files in the same manner.
I'm running the newest version of Xcode (4.5) on Mountain Lion. Below is part of a crash log. Please let me know if I need to include more of it.
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
ProductBuildVersion: 4G182
ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilderCocoaTouch/IDEInterfaceBuilderCocoaTouch-1926/IBPlugin/Utilities/IBObjectMarshalling.m:651
Details: Failed to arbitrate IBNSLayoutConstraint, IBUIButton, IBUILabel, IBUIView, and IBUIViewController.
Interface Builder encountered an error communicating with the iOS Simulator. If you choose to file a crash report or radar for this issue, please check Console.app for crash reports for "Interface Builder Cocoa Touch Tool" and include their content in your crash report.
Exception name: IBAssertionFailure
Exception reason: ASSERTION FAILURE:
Reason: All views needing candidate constraints have already had constraints generated. This most likely indicates a bug involving layout of the following views:
Layout engine frame ({{169, 392}, {64, 43}}) of > does not match canvas frame ({{168, 392}, {64, 43}})
UPDATE:
Apparently I didn't research well enough. I found someone with the exact same problem:
Xcode Interface Builder crashes when I edit storyboard
Right click on Storyboard in the navigator -> Show File Inspector -> Uncheck "Use Autolayout"
Problem solved!