简体   繁体   English

在设备上安装iPhone App时出错

[英]Error Installing iPhone App on Device

I set up all my certificates and keys today and am trying to run my project on my iPhone. 我今天设置了所有证书和密钥,并试图在我的iPhone上运行我的项目。 I'm encountering this strange error: 我遇到了这个奇怪的错误:

Your mobile device has encountered an unexpected error (0xE800003A) during the install phase: Verifying application 您的移动设备在安装阶段遇到意外错误(0xE800003A):验证应用程序

Poking around the Apple Developer forums, I've attempted to set new certificates and provisioning profiles as well as editing Info.plist , but no matter what I do I can't seem to run the app on my device. 围绕Apple Developer论坛,我试图设置新的证书和配置文件以及编辑Info.plist ,但无论我做什么,我似乎无法在我的设备上运行该应用程序。

The only think I can currently think of is that my project name in Xcode differs slightly from my development provisioning profile (it uses a question mark), but I've named it according to Apple's conventions: com.mycompany.myapp , so I'm unsure if that's the problem. 我现在唯一想到的是,我在Xcode中的项目名称与我的开发配置文件略有不同(它使用了问号),但我根据Apple的惯例命名它: com.mycompany.myapp ,所以我'我不确定这是不是问题。

Any ideas? 有任何想法吗?

Edit: I've hard restarted the phone, rebooted Xcode, cleaed my targets, set up a new wildcard App ID and respective provisioning profile and still nothing. 编辑:我很难重启手机,重新启动Xcode,清除目标,设置新的通配符应用程序ID和相应的配置文件,但仍然没有。 Any other ideas? 还有其他想法吗?

It turned out that I had 2 certs in keychain that were simultaneously overwriting each other! 事实证明,我在钥匙串中有两个同时覆盖的证书! I hope this helps people in the future. 我希望这有助于未来的人们。

You should create a wildcard app ID; 您应该创建一个通配符应用程序ID; com.mycompany.*. com.mycompany。*。 That may help. 这可能有所帮助。

I've encountered this on many occasions. 我在很多场合遇到过这种情况。 What i do is clean all targets, shut down xcode, and hard reboot my phone. 我所做的是清理所有目标,关闭xcode,并硬重启我的手机。

This is a different error than the more common problem of getting the cert wrong... 这是一个与获取证书错误的更常见问题不同的错误...

Restore the phone (using the XCode Organizer to reload the latest OS), to be safe do not restore from backup when you sync with iTunes the first time (it'll still keep your number when you sync even if you don't use the backup). 恢复手机(使用XCode管理器重新加载最新的操作系统),为了安全起见,请勿在第一次与iTunes同步时从备份恢复(即使您不使用,它仍会在您同步时保留您的号码)备用)。 I've had to do this a very few times, the last one was when it was in the middle of deployment when I unhooked the phone from the cable (had to answer a call). 我必须这么做几次,最后一次是在部署过程中,当我从电缆上取下电话时(不得不接听电话)。

Try the reboot (of the phone) first, hooking it up with XCode off. 首先尝试重新启动(手机),然后关闭XCode。 But if that does not solve things, restore is the way. 但如果这不能解决问题,那就是恢复。

The console tab in the XCode Organizer sometimes gives helpful hints as to what happens during the install phase. XCode Organizer中的控制台选项卡有时会提供有关安装阶段发生情况的有用提示。 In one case my problem was my app already existing on the phone. 在一个案例中,我的问题是我的应用程序已经存在于手机上。 I deleted my app and the install succeeded. 我删除了我的应用程序,安装成功。

Regardless, it looks like a lot of error messages are bundled into this one cryptic message and to really diagnose what is going on, I found the Console tab very useful... 无论如何,看起来很多错误消息被捆绑到这个神秘的消息中,并且为了真正诊断发生了什么,我发现Console选项卡非常有用......

One other thing to try is reinstalling the iPhone SDK. 另一件要尝试的是重新安装iPhone SDK。 I ran into an error like this when I first got my developer key and this was the only way around. 当我第一次得到开发人员密钥时,我遇到了这样的错误,这是唯一的方法。

Just want to say to everyone, when you go to edit Targets-> be sure to set "configuration" in the top left corner to "All Configurations" or the correct config you are building for (Debug or Release). 只想对每个人说,当你去编辑目标时 - >一定要将左上角的“配置”设置为“所有配置”或正在构建的正确配置(调试或发布)。 You might think you have things set correctly but it will be for the wrong configuration. 您可能认为已正确设置了某些内容,但这将是错误的配置。

I've seen that error on a correctly provisioned device that has had success installing apps from XCode before, and I've had luck restarting the device and trying again. 我已经在正确配置的设备上看到了错误,该设备之前已成功从XCode安装应用程序,并且我很幸运重新启动设备并再次尝试。 Maybe that will help. 也许这会有所帮助。

Try running in Release mode instead of Debug. 尝试在Release模式下运行而不是Debug。 I have a working project with this problem. 我有一个有问题的工作项目。 No idea what the issue was, but running it in Release mode works, but Debug mode produces the error code. 不知道问题是什么,但在发布模式下运行它,但是调试模式会产生错误代码。

我有一个支持票,Apple支持同样的问题支持,并且(FWIW)我会发布他们的建议,如果他们可以让我的工具链工作。

Try this: (source: http://ephemera.lifewithalacrity.com/iphone_development/ ) 试试这个:(来源: http//ephemera.lifewithalacrity.com/iphone_development/

Even though this is supposedly only for Distribution builds, it helped me to be able to install my Debug version on my iPhone again, after it mysteriously broke yesterday. 虽然这应该仅适用于Distribution版本,但它帮助我能够再次在我的iPhone上安装我的Debug版本,之后它昨天神秘地破坏了。

"just triple check that all the code signing in your project properties are clear or default" “只需三次检查项目属性中的所有代码签名是否清除或默认”

Note, this is the PROJECT properties as opposed to the TARGET properties. 注意,这是PROJECT属性而不是TARGET属性。 I set my Code Signing Provisioning Profile back to the default and removed the Code Signing Identity string. 我将我的代码签名配置文件设置回默认值并删除了代码签名标识字符串。

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

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