我得到这个错误,而我试图调试我的应用程序上的设备。
我创建了开发配置文件,正如开发人员门户中提到的那样。在概要文件中选择了我的开发设备,我正在从Target的代码签名标识菜单中选择正确的概要文件。我重新创建配置文件几次,也删除和重新安装它,并重新创建项目,但每当我尝试在设备上调试时,我都会得到它。
顺便说一句,临时分发条款概要文件可以工作。
我花了一整天的时间想找出解决办法,但一无所获。有人有办法吗?
我得到这个错误,而我试图调试我的应用程序上的设备。
我创建了开发配置文件,正如开发人员门户中提到的那样。在概要文件中选择了我的开发设备,我正在从Target的代码签名标识菜单中选择正确的概要文件。我重新创建配置文件几次,也删除和重新安装它,并重新创建项目,但每当我尝试在设备上调试时,我都会得到它。
顺便说一句,临时分发条款概要文件可以工作。
我花了一整天的时间想找出解决办法,但一无所获。有人有办法吗?
当前回答
另一个原因(已核实):
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的UDID。为此,您需要先注册UDID,然后从开发人员帐户重新生成配置文件。
根据我的经验,如果您试图在未在开发人员中心注册或未在您正在使用的配置配置文件中启用的设备上进行构建,则会出现此问题。
1)将设备添加到开发人员中心。 在XCode 5中,你仍然可以在管理器窗口中找到“添加到成员中心”按钮。 在XCode 6中,我建议复制设备ID,并手动将其添加到成员中心的设备部分。
2)编辑您正在使用的配置文件,以包括您刚刚添加的设备。保存并同步XCode中的配置文件。
干净了,就开了。
我在Xcode 10.0 beta 5 (10L221o)和运行iOS 12.0 (16A5345f)的设备上遇到了同样的问题——这也是beta版。
在安装应用程序后,提示“应用程序安装失败”,“未找到此可执行文件的有效配置文件”。
我通过去~/Library/MobileDevice/Provisioning Profiles找到Xcode试图使用的证书来摆脱它。然后在Xcode的“Devices and Simulators”窗口中,我右键单击我的设备,选择“Show Provisioning Profiles”,然后用一个加号按钮将配置文件添加到设备中。
我不记得上次是什么时候做的了,好几年了。我猜Xcode通常会帮我们做,但由于某些原因,当我们看到那条消息时,它失败了。
我也有同样的问题。一切都很好: 设备在IOS Provisioning Portal中注册;证书被下载,我的应用程序的开发配置文件被下载。
所以解决方案!!
目标>获取信息
选择配置到释放(这是魔鬼) 在代码签名中,代码签名身份检查iPhone开发者。关闭。
在目标上选择清洁目标,然后运行应用程序。
祝你好运。
另一个原因(已核实):
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放弃破坏你的操作系统,并接受你呈现给它的现实:)。