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.
Related
Xcode still cause apps using UITextView to crash even after installing "Xcode Version 11.2.1 (11B500)" from app store.
Actually I faced this issue when I run the app on device after installing "Xcode 11.2.1 (11B500)". I got below error response.
Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named _UITextLayoutView because no class named _UITextLayoutView was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target)'
To fix the above problem:
I had to clear the derived data folder, go to path:
~/Library/Developer/Xcode/DerivedData.
And I did clean build folder using menu: Product -> Clean Build Folder(Shift + Command + K).
Now the app won't be crashed due to UITextView issue.
When I make an error in Xcode's playground feature, the whole app will close, with the problem report including the error; for example,
UNCAUGHT EXCEPTION (NSInvalidArgumentException): -[DSAFastToken copyWithZone:]: unrecognized selector sent to instance.
I am running Xcode 6.1.1 on OS X Yosemite.
I've just upgraded to XCode 6 (iOS 8 SDK) and I am getting the following warning and error in the console that did not occur in XCode 5 (iOS 7 SDK):
2014-06-08 08:58:57.266 ColorChaos[3250:138871] SetAppThreadPriority: setpriority failed with error 45
2014-06-08 08:59:27.303 ColorChaos[3250:138871] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSSetM addObject:]: object cannot be nil'
The SetAppThreadPriority seems to be just a warning because the app continues to run, but a few seconds/touches in it crashes with the NSInvalidArgumentException error.
Has anyone else experienced anything similar after updating? The error is not occurring in my code (I don't think), it highlights the line in main.m with Thread 1: signal SIGABRT.
Thanks in advance.
EDIT: I should note I've just realised XCode 5 is still installed along side XCode 6 and I can still compile and run my code in that so it's not really an issue any more but it would still be nice to know if it can be fixed.
I was running into a similar problem. If you're running off an iOS simulator make sure it's set to iPhone 5 or above. Swift code won't run on iOS 4 which, I believe, is the default emulator device for XCode 6.
I'm using KeychainItemWrapper for my application using the following line of code
KeychainItemWrapper *currentUser = [[KeychainItemWrapper alloc] initWithIdentifier:#"com.example" accessGroup:nil];
[currentUser setObject:accountString forKey:CFBridgingRelease(kSecAttrAccount)];
accountString is a string containing my user information.
The code works perfectly fine with iOS7 but crashes with iOS8.
I'm not sure what i'm doing wrong., can someone please help!! I'm running the application on a simulator.
update:
Here is the crash
* Assertion failure in -[KeychainItemWrapper writeToKeychain]
* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Couldn't add the Keychain Item.'
Looks like the first BETA version doesn't support Keychain Access developer APIs on the simulator. Hopefully this is brought in soon.
Update: looks like issue is fixed in Beta 2
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.