Xamarin - After updating Xcode and reinstalling Xamarin, I get several NSUnknownKeyException errors

I am developing with Xamarin 4.0.13 and since upgrading from an earlier version of Xcode to Xcode 4.6.3. Now I get errors when I try to build either a device or an iOS simulator. I had to reinstall Xamarin.iOS after updating Xcode because Xamarin said iOS was not installed.

The errors are related to binding to a single xib file, which I believe. An error occurs referring to the code below inside Main.cs

UIApplication.Main (args, null, "AppDelegate");

It states:

"Objective-C exception. Name: NSUnknownKeyException Reason: [setValue: forUndefinedKey:]: this class is not the key to encode the login key to LoginBtn."

I looked at the same error log from the links below, but I think that I have a different problem, because if I delete LoginBtn from the xib file, it will change the complaint to usernameTextInput Outlet and so on until the outputs are left. After deleting everything from The xib of the file so that it is completely empty (except for the parent object of the view), it has the same error log, but instead of LoginBtn it complains about the "view". I tried to relink the link from the View object to the file owner, but didn't change anything.

Similar answers to the error log that did not solve it: this class is not the key for encoding the key for the authView key , What does this mean? "NSUnknownKeyException", reason: ... this class is not a key value that is compatible with the encoding for key X "

I cleared everything from the Xamarin Build drop-down box at the top and I don’t even know how to get a blank page from my document after deleting everything in the view.

This is a one-page application without any other xib files and is at a very early stage.

Any light you can shed on this will be greatly appreciated.

Thanks, Jason.

+7
ios xcode xamarin
source share
2 answers

I ran into a similar problem a few days ago when I added a new exit to UIView. I removed the outlet and cleaned everything, and then plugged in the outlet again. Finally, a day later, I noticed that the outlet also posted the release in the dealloc method in Objective-C. Looking at my other views, I noticed that dealloc methods were not called. As soon as I deleted it and made a clean build, the error disappeared from Xamarin Studio.

+1
source share

This happens when you delete an object that has been connected as an output. The best way to fix this is to open the storyboard with the Source Editor, find the error output (e.g. LoginBtn), and then remove the node connection. This works for me.

0
source share

All Articles