I'm using Xamarin and trying to run one of my apps in the iOS simulator but I am getting this error:
2015-10-07 12:38:02.715 MolinaCoding1iOS[1550:54337] Unhandled managed exception:
Could not initialize an instance of the type 'UIKit.UIImage': the native 'initWithContentsOfFile:' method returned nil.
It is possible to ignore this condition by setting MonoTouch.ObjCRuntime.Class.ThrowOnInitFailure to false. (System.Exception)
How do I actually ignore this condition? If I should not ignore this...then what should I do?
Thanks
I got this problem solved by running "Clean" on my project (using Visual Studio). Right Click your project and select "Clean". Run the application afterwards.
You can ignore by adding the below statement just before you use that class/ method.
ObjCRuntime.Class.ThrowOnInitFailure = false;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With