iOS:已安装的应用程序每次启动时都不会启动和崩溃

标签 ios provisioning-profile code-signing-entitlements

我在 4 个月前通过 OTA(无线)链接安装了一个使用企业帐户分发证书的应用程序,直到今天它运行良好。但今天令人惊讶的是它停止运行,甚至没有启动。我已经验证了证书、个人资料和企业帐户,一切都是完美的。当我将设备与 xCode 的设备管理器连接时,它打印了以下日志:

Feb 17 10:07:50 iPad amfid[159] <Error>: entitlement 'application-identifier' has value not permitted by provisioning profile 'Mobile Consign ProdDistributionProvisioningProfile'
Feb 17 10:07:50 iPad amfid[159] <Error>: /private/var/mobile/Containers/Bundle/Application/FFC8CCE7-BEFD-4801-B64E-974F3B967171/Consignment Replenishment Production copy.app/Consignment Replenishment Production copy not valid: 0xe8008016: The executable was signed with invalid entitlements.
Feb 17 10:07:50 iPad kernel[0] <Notice>: AMFI: hook..execve() killing pid 452: no code signature
Feb 17 10:07:50 iPad kernel[0] <Notice>: Sandbox: hook..execve() killing pid 452: application requires container but none set
Feb 17 10:07:50 iPad com.apple.xpc.launchd[1] (UIKitApplication:com.XYZ.mobileconsign[0xc119][452]) <Notice>: Service exited due to signal: Killed: 9
Feb 17 10:07:50 iPad assertiond[53] <Warning>: Unable to obtain a task name port right for pid 452: (os/kern) failure (5)
Feb 17 10:07:50 iPad SpringBoard[41] <Warning>: Unable to register for exec notifications: No such process
Feb 17 10:07:50 iPad SpringBoard[41] <Warning>: Unable to obtain a task name port right for pid 452: (os/kern) failure (5)
Feb 17 10:07:50 iPad SpringBoard[41] <Warning>: Unable to obtain a task name port right for <FBApplicationProcess: 0x15e00b00; com.XYZ.mobileconsign; pid: 452>
Feb 17 10:07:50 iPad SpringBoard[41] <Warning>: Unable to get short BSD proc info for 452: No such process
Feb 17 10:07:50 iPad SpringBoard[41] <Warning>: Unable to get proc info for 452: No such process
Feb 17 10:07:50 iPad SpringBoard[41] <Warning>: Unable to register for exec notifications: No such process
  Feb 17 10:07:50 iPad SpringBoard[41] <Warning>: Unable to obtain a task name port right for pid 452: (os/kern) failure (5)
 Feb 17 10:07:50 iPad SpringBoard[41] <Warning>: Unable to obtain a task name port right for <FBApplicationProcess: 0x15e00b00; com.XYZ.mobileconsign; pid: 452>
Feb 17 10:07:50 iPad SpringBoard[41] <Warning>: Unable to get short BSD proc info for 452: No such process
  Feb 17 10:07:50 iPad SpringBoard[41] <Warning>: Unable to get proc info for 452: No such process
  Feb 17 10:07:50 iPad assertiond[53] <Warning>: Could not set priority of <BKNewProcess: 0x14640cc0; com.XYZ.mobileconsign; pid: 452; hostpid: -1> to 1, priority: No such process
  Feb 17 10:07:50 iPad assertiond[53] <Warning>: Could not set priority of <BKNewProcess: 0x14640cc0; com.XYZ.mobileconsign; pid: 452; hostpid: -1> to 0, priority: No such process
  Feb 17 10:07:50 iPad locationd[59] <Notice>: Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0
  Feb 17 10:07:50 iPad SpringBoard[41] <Warning>: Application 'UIKitApplication:com.XYZ.mobileconsign[0xc119]' exited abnormally via signal.

当我卸载应用程序并从 URL 重新安装应用程序时,应用程序又开始工作了。但是我已经将该应用程序分发给了所有用户,现在所有人都面临着这个问题。因此,了解为什么在一切正常的情况下会出现此问题对我来说很重要。

提前致谢。

最佳答案

我认为您用于构建应用程序的配置文件已过期。它们将在您创建它们后的 12 个月后过期。

当您构建应用程序时,它会将您在 Xcode 中选择的配置文件与 .app 打包在一起,并且该配置文件将在您安装应用程序时安装在设备上。因此,假设您创建了一个应用程序,并且构建 1 的配置文件是在 2014 年 1 月 1 日创建的。该应用程序可以在 2015 年 1 月 1 日之前安装和使用。如果您在此之前不更新该设备上的配置文件,则该应用程序将不再启动。

有两种可靠的方法可以更新设备上的配置文件。

  1. 创建一个新的配置文件(为了以后方便,确保这个新的配置文件设置了通配符应用程序 ID,例如 com.company.*)并重建应用程序(假设您在 10/1/2014)。应用程序的 Build 2 现在将具有新的配置文件,该配置文件将在 2015 年 10 月 1 日之前过期。用户在那之前是好的,只要他们安装新版本。仍在运行构建 1 的任何人都将无法运行该应用程序,除非您执行下面的选项 2。

  2. 使用新的配置文件构建另一个应用(只要您的新配置文件使用通配符应用 ID)。将该应用程序安装到设备上。新应用程序有效负载的一部分是新的配置文件,该配置文件现在要到 2015 年 10 月 1 日才会过期。该配置文件显示“我被授权在 2015 年 10 月 1 日之前使用捆绑 ID 类似于‘com.company.*’的应用程序运行”。因此,原始应用程序的构建 1 将继续运行。但是请注意,获得第一个应用程序构建 1 的任何人还需要获取新应用程序才能运行第一个应用程序。如果由于某种原因您无法重新构建应用程序 1(丢失源代码,无法在当前版本的 Xcode 中编译),这可能是一个有用的策略。

或者,您可以通过电子邮件将新的配置文件发送给用户,并让他们在设备上打开它。我从 iOS 6 开始就没有尝试过这个,所以它可能不再工作了。

关于iOS:已安装的应用程序每次启动时都不会启动和崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28555769/

相关文章:

ios - 构建 Cocoapods 模块错误 [ARC] xcodebuild : Returned an unsuccessful exit code

ios - 未找到有效的签名身份,配置文件

ios - 更新供应配置文件(分发)并保持当前 Appstore 应用程序正常运行

ios - 临时测试的代码签名

ionic 构建的 Xcode XCBuild 支持错误

ios - Entitlements.plist 对于 Xcode 4 中的分发仍然是必需的吗?

ios - 自引用快速关闭

ios - 在 UICollectionView 中没有开关的 Deque 可重用单元格

ios - 在 HomeKit 中,我能否以编程方式设置启用附件的代码?

ios - xcode 8 权利不匹配错误