我得到这个错误,而我试图调试我的应用程序上的设备。

我创建了开发配置文件,正如开发人员门户中提到的那样。在概要文件中选择了我的开发设备,我正在从Target的代码签名标识菜单中选择正确的概要文件。我重新创建配置文件几次,也删除和重新安装它,并重新创建项目,但每当我尝试在设备上调试时,我都会得到它。

顺便说一句,临时分发条款概要文件可以工作。

我花了一整天的时间想找出解决办法,但一无所获。有人有办法吗?


当前回答

在我的例子中,有效的配置文件是因为我没有将设备添加到配置文件中。

其他回答

我发现了这个问题,因为我已经获得了一台新的Mac,并且仍然在使用我的旧计算机证书。我为新Mac电脑创建了一个新证书,但两个证书都在我的钥匙链里。

在Organizer中,配置文件警告“XCode无法在您的keychain中为该配置文件找到有效的私钥/证书对”,即使旧证书存在于我的keychain中。

解决方案是从我的Keychain中删除旧证书,并删除/撤销使用此旧证书的所有配置文件。然后用新的证书创建一个新的配置文件并使用它。

希望这能有所帮助!

Xcode->点击你的应用->目标->点击应用->构建设置->代码签名:确保调试和任何iOS SDK都设置为iPhone开发 Xcode ->产品->方案->编辑方案:确保构建配置设置为调试。

另一个原因(已核实):

Apple has a major bug in Xcode going back to version 3.x, where it magically overwrites the OS X keychain with a fake keychain from inside Xcode, re-installing certs (and private keys!) that you already deleted ...so, if you have "new cert" installed, and nothing else, Xcode will sometimes get into an infinite loop where it will keep ALSO installing "old cert" (that doesn't exist anywhere except inside XCode!). ...and because of ANOTHER bug in Xcode (unfixed for 3+ years now...), Xcode sometimes automatically selects the "oldest cert I can find" (whcih, by definition, is incorrect - I think someone at Apple got mixed up between "oldest" and "newest" :( ) ...and EVEN THOUGH you've selected the correct provisioning profile, Xcode sends the "old" provisioning profile to the device, then signs with the "new" profile, causing this error

解决方案:你必须unfubar Xcode的FUBAR你的钥匙链。

这比听起来要难(关于这个话题有很多SO帖子)-它涉及到多次重启你的机器,每次都删除密钥。

最终,Xcode放弃破坏你的操作系统,并接受你呈现给它的现实:)。

这可能是因为配置门户无法识别您的iphone。

解决方案:

In Xcode, Goto --> Build --> clean all targets. In "Groups & Files" -->Target --> expand it --> right click your app and select Clean "your app" Goto->Window-->Organizer In the Devices tab on the left, select your iphone In the Provisioning section of the selected iphone delete all the current profiles (if any) Unplug your iPhone and replug it in. Goto->Window-->Organizer-->right click your iPhone -->Add device to provisioning portal Now make sure you have selected the appropriate code signing identity in edit project settings -> build --> code signing

构建并运行。

我有一个过期的证书(这会产生错误)。 步骤1。登陆developer.apple。com,进入IOS配置门户

步骤2。转到certificates(现在是空的),并按照所列的说明创建一个新证书(在计算机上打开keychain,创建签名请求,保存到磁盘,上传到apple)

步骤3。下载并安装苹果创建的文件到你的钥匙链

步骤4。问题:你之前所有的配置配置文件都与旧证书相关联,所以你需要回到developer.apple.com->IOS提供门户->配置配置文件并“修改”你所关心的每个配置文件。您将看到您的身份不再与配置文件关联,因此只需单击复选框

第5步。下载您更改的所有配置文件

步骤6。插件你的手机,拖拽。mobileprovision文件到dock栏的xcode图标上,将它们安装到设备上