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

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

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

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


当前回答

在我的案例中,出现此问题是因为为单元测试选择了另一个配置配置文件。我花了好几个小时才找到这个…

其他回答

以我为例,两个月前我在iPhone上手动设置时间时就遇到了问题。但是当我自动设置时间时,它工作得很好。

Setting -> General -> Date & Time ->自动设置时间

如果它不工作,设置时间自动的mac和iPhone,将工作良好。

解决方案之一可能是,您的配置配置文件不包括您的iPhone的UDID。为此,您需要先注册UDID,然后从开发人员帐户重新生成配置文件。

用Xcode 6和一个新设备:

按cmd + shift + 2打开设备。 按下“注册设备”按钮。如果没有这样的按钮(如截图所示),请访问developer.apple.com并手动添加。将标识符复制到字段中。 进入Xcode -> Preferences -> Accounts ->双击你的账户->按左下角的刷新按钮刷新配置文件 转到代码签名并设置新的配置文件。

在Xcode 10中,我通过将项目的构建系统从“新构建系统”切换到“旧构建系统”(File ->项目设置)来解决这个问题。

另一个原因(已核实):

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放弃破坏你的操作系统,并接受你呈现给它的现实:)。