My application is crashing on iOS 5 when I call presentModalViewController on a new view with the error:
Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named NSLayoutConstraint'
I know that this error should be fixed by unchecking auto layout, but it isn't. I unchecked it in all my nibs.
The very puzzling part is that using a view I created one month ago, there is no crash, but using one that I created today, it crashes.
Is there another setting that I should know about?
I'm using XCode 4.5.2, with SDK 6.0, and deployment target 5.0.
I guess you would have solved the problem by now.
But for others who would stumble into this post, please check this post: https://stackoverflow.com/a/13201690/942966
Related
I have an issue with an iOS app I'm working on (https://github.com/nodoid/WeatherApp). It builds and deploys fine but when you hit any UI element that isn't a label, it crashes with an error such as
ViewController btnGetWeather unrecognised selector sent to instance
Error: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: ViewController btnGetWeather unrecognised selector sent to instance
It's been a long time since I've done anything with iOS native (I was still using xibs!). It looks like everything is correct on the storyboard but I'm at a loss as to why this is happening given everything builds.
I've done the usual trick of deleting the obj folder in the iOS project, but still get this issue.
I downloaded your code to try it out. When I click the button, the error message :Name: NSInvalidArgumentException Reason: Application tried to present modal view controller on itself. Presenting controller is <UIAlertController: 0x7fb648008a00>.
I found the reason for this problem: In the ShowError method of your ViewController.cs, you use the alert.PresentViewController() method, you need to change the alert of this line of code to "this.PresentViewController()".
Im having an issue with Xcode where its crashing on references to old variables which I have deleted, the error message is
*** Terminating app due to uncaught exception 'NSUnknownKeyException',
reason: '[<mydoncaster.OptionsView 0x11fd94eb0> setValue:forUndefinedKey:]:
this class is not key value coding-compliant for the key restaurantLabel.'
I don't know why its moaning about restaurantLabel when that no longer exist in the specific view controller, I can delete everything out of the view controller and from the storyboard and build it all again and it still brings up the error, I've also tried building and cleaning my code but it still happens, is this a saving issue or something else.
Search for "restaurantLabel" in your storyboard.
There should be an outlet somewhere in "Referencing outlets" section, which you've forgotten to delete.
I have made a Windows Phone application with Xamarin and Mvvmcross. When debugging the application it works perfectly. So the application was uploaded to the app store. but when the application got downloaded and run from the store it shut down immidiately after the icon gets clicked. So now i found out that the application does not work when running it on a device in release mode. (on a emulator it works fine).
First i got this exception
Error 1 Error : DEP6810 : MdilXapCompile.exe failed with error code 1004. See log file '~project.WinPhone\obj\Release\MDIL\MDILXapCompileLog.txt' for more details.
in this file there was an error
Compile filter argument specified non-existent file: ~project.WinPhone\obj\Release\MSIL\nl-NL\project.resources.dll
Invalid argument
This error made it unable to deploy the application to the device in release mode. I still have no idea why i got this error and how i am supposed to solve it. But i found a form of workaround by creating a 'nl-NL' map in the MSIL and adding the resource.dll to it. This made it able to deploy the application.
But when deploying the application in this state it crashed immediately. with the native debugger i could get it to break. it gave me this exception
Unhandled exception at 0x775E062F (COMBASE.DLL) in project.WinPhone.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x04F80AB8, 0x00000006).
Clicking on the Disassembly it had it's pointer on this line
77808534 bl SignalStartWerSvc (777FED78h)
It probably has something to do with my localizedresources, where i define some .resx files for filling the app with text. I did find out that this is causing me some problem with WP but i am not sure what i could do against it, i cannot use .resw files as have been suggested.
Has anyone ever had this sort of issue before and does anyone know how to solve it? It is keeping me from placing a working application on the app store, which is really frustrating.
Thank you in advance
I have a project which incorporated mapbox-ios-sdk sometime ago. Mapbox-ios-sdk has undergone some changes but I've also hacked some code into it. So I try to merge the Mapbox-ios-sdk from origin into my branch, and after some struggle finally it has compiled. However, I've run into this error:
2012-10-16 19:09:26.466 OfflineSpotty[81420:11f03] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unable to find LoadingTile.png (copy from framework 'Resources' folder)'
The images are properly added in the left pane. Why is it not finding it?
EDIT:
The line it fails is: RMRequireAsset(#"LoadingTile.png")
I see that it actually fails on an NSAssert:
#define RMRequireAsset(asset) NSAssert([[NSBundle mainBundle] pathForResource:[asset stringByReplacingOccurrencesOfString:[#"." stringByAppendingString:[asset pathExtension]] withString:#""] ofType:[asset pathExtension]], #"Unable to find %# (copy from framework 'Resources' folder)", asset);
And the more complete message
`* Assertion failure in -[RMLoadingTileView initWithFrame:], /Users/t2wu/Documents/Xcode_projects/Open_source/mapbox-ios-sdk/MapView/Map/RMLoadingTileView.m:24
2012-10-16 20:24:58.456 OfflineSpotty[17713:11f03] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unable to find LoadingTile.png (copy from framework 'Resources' folder)''
I faced that same problem and finally found a solution for it.
There is a file called MapBox.bundle inside the mapbox ios sdk project, as seen in the following image:
All I had to do was to add in my main project target (I guess you'll have to add it to OfflineSpotty target) that MapBox.bundle (I just used drag and drop).
After that, the project builds and runs ok.
I get this error message when connecting two UISwipeGestureRecognizers to a single view in my project inside of a XIB file (though not in a new project, curiously). Anybody know what this error means? It is a compile error, not a runtime error. I'm using Xcode 4.4 (this error doesn't happen on Xcode 4.5 actually). This is an error from inside interface builder.
Assertion failure in -[IBCocoaTouchToolObjectPackage connectionsByProcessingConnections:], /SourceCache/IBSimulatorComponents/IBSimulatorComponents-223/IBCocoaTouchTool/IBCocoaTouchToolObjectPackage.m:1132012-08-03 16:52:01.428 Interface Builder Cocoa Touch Tool[5646:11903] Exception producing nib: Mismatched addsContentToExistingCollection value for the coalescing outlet connection & one of its fragments.
I suspect this occurs because Interface Builder allows your outlets to get into an inconsistent state. It's a logic bug in Interface Builder that manifests as a run-time exception in the ibtool compiler. I was able to work around it by disconnecting the outlets and outlet collections I had recently created, and then rewiring them.
I was actually able to get rid of the error by deleting the entire Panel in the XIB, and then just undoing the delete. Clean + Build and the error was gone. Not sure if that will work for others as well.