【问题标题】:Xamarin Forms: Ios Project not launchingXamarin Forms:Ios 项目未启动
【发布时间】:2017-05-09 11:02:55
【问题描述】:

wsHi 我正在使用 xamarin 表单开发应用程序。我的 ios 项目运行良好,但几天前它已停止启动它。

这是在说——

Error: error MT1007: Failed to launch the application '/Users/user/Library/Caches/Xamarin/mtbs/builds/project.iOS/58c9dca0bc9f1c5ed37d1e8652672fb2/bin/iPhone/Debug/project.iOS.app' on the device 'My iPad': Object reference not set to an instance of an object. You can still launch the application manually by tapping on it.

谁能告诉我为什么会这样???

我已尝试运行我的所有旧备份。但同样的问题来了。

这是我的 AppDelegate.cs

 [Register("AppDelegate")]
    public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
    {
        //
        // This method is invoked when the application has loaded and is ready to run. In this 
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();
            ImageCircleRenderer.Init();
            MR.Gestures.iOS.Settings.LicenseKey = "XXXXXXXXXXXX";

            LoadApplication(new App());

            return base.FinishedLaunching(app, options);
        }
    }

【问题讨论】:

  • 您是否进行了重建和清理工作?
  • 你更新你的设备了吗?
  • @Gerald Versluis 是几次
  • @Taier 没有,它已经在 ios 9.1 上运行
  • 确保您有更新 Xamarin,Xcode 从所有项目文件夹中删除所有 binobj 文件夹并重建。

标签: ios xamarin.ios xamarin.forms portable-class-library


【解决方案1】:

对我来说,这个错误原来与 Free Provisioning Profile 相关,我的物理设备不再信任它。在我从手机中删除应用程序后,它立即停止信任它。在尝试再次调试该应用程序后,我开始看到该错误,该应用程序在我的手机上重新安装了该应用程序但无法启动。

要让您的设备再次信任配置文件,请导航至 Settings -> General -> Device Management。在 Developer App 部分下,选择您的配置文件,然后再次信任它。

信任该应用后,您会在该屏幕中看到:

来自开发者“iPhone Developer: myProfileName”的应用在此 iPhone 上是受信任的,并且在该开发者的所有应用被删除之前都是受信任的。

因此,如果您曾经从物理设备中删除应用程序,您可能会再次遇到这种情况。

created a blog post 详细说明了我是如何得出这个结论的。

【讨论】:

    猜你喜欢
    • 2014-10-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-12-02
    • 1970-01-01
    • 2020-09-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多