Xamarin.Forms iOS UIKit.UIImage错误

我一直在使用Xamarin.Forms制作移动应用程序。 我有一切工作在Android上,但是当我尝试在iOS上启动时,我得到的错误:

System.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. .... 

有谁知道如何解决这个问题?

编辑:这是它给我的错误的代码,但我有感觉别的是导致它:

 using System; using System.Collections.Generic; using System.Linq; using Foundation; using UIKit; namespace CloudClubv1._2_.iOS { public class Application { // This is the main entry point of the application. static void Main(string[] args) { // if you want to use a different Application Delegate class from "AppDelegate" // you can specify it here. UIApplication.Main(args, null, "AppDelegate"); } } } 

所以事实certificate,错误是由试图给一个标签视图的图标造成的。 这工作正常的android,但显然在ios上它不被支持,所以要解决的错误,我只是注释掉了设置标签视图的图标的行。

确保在IOS项目中,将资源/图像属性设置为BundledResources。 在我的项目中,他们被设置为AndroidResources,当我纠正BundledResources我开始工作正常。