简体   繁体   English

Xamarin iOS App启动后立即崩溃

[英]Xamarin iOS App crashes immediately after startup

I've got a Xamarin app, which runs as expected for a while and then, after a couple of days just crashes immediately after trying to start it. 我有一个Xamarin应用程序,该应用程序按预期运行了一段时间,然后在尝试启动几天后立即崩溃。 Here's the output from the XCode Console filtered by the app's package name. 这是XCode Console的输出,按应用程序的软件包名称过滤。

default 12:54:58.536319 +0200   SpringBoard Bootstrapping foo.bar.MyApp with intent foreground-interactive
default 12:54:58.539833 +0200   assertiond  Submitting new job for "foo.bar.MyApp" on behalf of <BKProcess: 0x102877f50; SpringBoard; com.apple.springboard; pid: 15264; agency: SystemShell; visibility: foreground; task: running>
default 12:54:58.540033 +0200   assertiond  Submitted job with label: UIKitApplication:foo.bar.MyApp[0x44cf][62]
default 12:54:58.580322 +0200   assertiond  Unable to get pid for 'UIKitApplication:foo.bar.MyApp[0x44cf][62]': No such process (3)
error   12:54:58.580490 +0200   assertiond  Failed to start job with error <NSError: 0x10288ff30; domain: NSPOSIXErrorDomain; code: 3; reason: "No such process"> {
    description = "Unable to get pid for label UIKitApplication:foo.bar.MyApp[0x44cf][62]";
    failureReason = "No such process";
    userInfo = {
        BKLaunchdJobLabel = UIKitApplication:foo.bar.MyApp[0x44cf][62];
        BKLaunchdOperation = launch_get_running_pid_4SB;
    }
}
default 12:54:58.580757 +0200   assertiond  Deleted job with label: UIKitApplication:foo.bar.MyApp[0x44cf][62]
error   12:54:58.582916 +0200   SpringBoard [foo.bar.MyApp] Bootstrap failed with error: <NSError: 0x283076850; domain: BKSProcessErrorDomain; code: 1 (bootstrap-failed); reason: "Failed to start job">
error   12:54:58.583057 +0200   SpringBoard Bootstrapping failed for <FBApplicationProcess: 0x10b1768b0; foo.bar.MyApp; pid: -1> with error: Error Domain=BKSProcessErrorDomain Code=1 "Unable to bootstrap process with bundleID foo.bar.MyApp" UserInfo={NSLocalizedDescription=Unable to bootstrap process with bundleID foo.bar.MyApp, BKSProcessExitReason=0, NSLocalizedFailureReason=Failed to start job, NSUnderlyingError=0x2832f7e10 {Error Domain=NSPOSIXErrorDomain Code=3 "No such process" UserInfo={BKLaunchdOperation=launch_get_running_pid_4SB, NSLocalizedDescription=Unable to get pid for label UIKitApplication:foo.bar.MyApp[0x44cf][62], BKLaunchdJobLabel=UIKitApplication:foo.bar.MyApp[0x44cf][62], NSLocalizedFailureReason=No such process}}, BKSProcessJobLabel=UIKitApplication:foo.bar.MyApp[0x44cf][62], BSErrorCodeDescription=bootstrap-failed}
default 12:54:58.583151 +0200   SpringBoard Adding: <FBApplicationProcess: 0x10b1768b0; foo.bar.MyApp; pid: -1>
default 12:54:58.583303 +0200   SpringBoard <FBApplicationProcess: 0x10b1768b0; foo.bar.MyApp; pid: -1> exited.
default 12:54:58.584241 +0200   SpringBoard Removing: <FBApplicationProcess: 0x10b1768b0; foo.bar.MyApp; pid: -1>
default 12:54:58.591967 +0200   SpringBoard Application process state changed for foo.bar.MyApp: <SBApplicationProcessState: 0x283c6a420; pid: -1; taskState: Not Running; visibility: Unknown>
default 12:54:58.592169 +0200   SpringBoard Process exited: <FBApplicationProcess: 0x10b1768b0; foo.bar.MyApp; pid: -1> -> <FBApplicationProcessExitContext: 0x2832cbe10; exitReason: (none); terminationReason: (none)> {
    stateAtExit = <FBProcessState: 0x283c38060; pid: -1; taskState: Unknown; visibility: Unknown>;
}
default 12:54:58.592395 +0200   SpringBoard Application process state changed for foo.bar.MyApp: (null)
default 12:54:58.838065 +0200   SpringBoard Front display did change: <SBApplication: 0x2803522b0; foo.bar.MyApp>

I observed that this phenomenon always happens after a certain amount of days, which keeps me thinking that there's some certificate or something similar, which expired in the meanwhile. 我观察到,这种现象总是在一定天数后发生,这使我一直认为有一些证书或类似的东西同时过期了。

Q: Is there such a thing and how can I ensure that it's longer valid? 问:有这样的事情,我如何确保它的有效期更长?

Are you testing your application on a real device and using free provisioning profile? 您是否在真实设备上使用免费配置文件测试应用程序? If so, it could be a certificate issue. 如果是这样,则可能是证书问题。

There're some limitations when you are using free provisioning profile. 使用免费配置文件时有一些限制。 One of them is: 其中之一是:

Provisioning profiles created with free provisioning will expire after one week, and signing identities will expire after one year. 使用免费预配置创建的预配置配置文件将在一周后过期,并且签名身份将在一年后过期。

Refer to this documentation for more details: https://docs.microsoft.com/en-us/xamarin/ios/get-started/installation/device-provisioning/free-provisioning?tabs=windows#limitations . 有关更多详细信息,请参阅此文档: https : //docs.microsoft.com/zh-cn/xamarin/ios/get-started/installation/device-provisioning/free-provisioning?tabs=windows#limitations

When it has been expired, you have to use Visual Studio to generate a new ipa for deploying your app on a real device. 到期后,您必须使用Visual Studio生成一个新的ipa,以将您的应用程序部署在真实设备上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM