供应、证书、调试器错误
编辑: 在一遍又一遍地尝试了很多很多事情之后,我决定升级到 xCode 4,问题就停止了。我不知道出了什么问题,所以不幸的是,这是我对那些因我遇到的问题而迷失的人的建议。
PS 谢谢大家的建议:)
大家好,
我不知道为什么,但我的应用程序在尝试启用推送通知后停止在我的设备上编译。在使用开发人员证书的调试模式下,它运行正常,但我在控制台中收到推送通知相关的错误。在阅读了这个问题后,我意识到我必须使用分发证书对代码进行签名才能真正测试推送通知。在“玩弄”这些东西之后,我的应用程序无法再部署在测试设备上...... 我一次又一次地收到 2 个错误:
1。可执行文件使用无效的权利进行签名
,当我通过将“代码签名身份”更改为另一个开发人员证书(管理员)来解决此问题时,我得到了另一个:
2。找不到此可执行文件的有效配置文件。
我尝试了以下所有操作: - 我使用团队管理员的通行证登录并删除/撤销证书和配置文件,重新创建它们并将它们安装在我的计算机上。在钥匙串中一切似乎都正常(带有密钥的证书),在 xCode Organizer(新配置文件)中也一切正常。
我清理了目标几次
创建了具有自定义值“get-task-allow”的Entitlements.plist,未选中
在 Entitlements.plist 中,我放置了我的捆绑包标识符
我从 iPhone 设备中删除了配置文件,然后重试。它安装了正确的配置文件
我重新启动了计算机/xcode,iPhone几次
然后,当我看到我快要疯了时,我决定尝试启动另一个应用程序只是为了看看这个是否可以运行。 你猜怎么着……不可能。我得到与上面相同的两个错误。
我将逐步解释如何在开发者门户中重新创建内容,以便您可以看到我是否遗漏了某些内容。请记住,我们使用 2 个开发人员工具帐户(团队管理员 (A)、团队成员 (B))。我这么说是因为我在重新创建证书和配置文件时可能做错了什么...
删除旧设置
1 从钥匙串中删除了证书(开发和分发)和私钥。
2 从 xCode Organizer 中删除了所有配置文件。
3 在开发人员门户(作为管理员)中,我撤销了其开发证书,然后删除了分发证书
4 在设备中,我删除了我的 iPhone 设备
5 我删除了所有开发配置文件。分发版无法删除???
6 然后我登录团队成员的帐户并撤销开发证书
CREATING NEW CERTIFICATE;配置文件...
1 在钥匙串助手中,我创建了新的 CSR 并将其上传,管理员批准了它,然后我将其与 WWDR 中间证书一起下载。将它们拖放到钥匙串 - 登录/类别 - 证书中
2 我添加了我的设备名称/标识符
3 在配置/开发中我创建了新的配置配置文件。我添加了我的开发者、所有设备和应用 ID。
4 然后,我从我的团队成员帐户下载了它,双击它,就是这样。
5 在 xCode 项目信息中,我将代码签名设置为开发人员证书,然后使用设备/调试运行并构建。我构建成功并出现错误:可执行文件已使用无效权利进行签名
在黑暗中敲击:
//我创建 enitlements.plist 并运行,我得到:来自调试器的错误:正在调试的程序未运行。
//然后我添加 get-task-allow = false 并得到:可执行文件已使用无效权利进行签名。
//如果我将其更改为 true,则我得到:来自调试器的错误
//然后我将我的应用程序 ID 作为纯字符串添加到权利中。这里没有任何变化:( -
非常非常感谢您阅读我的帖子。 希望我能在发疯之前解决这个问题……
最诚挚的问候, 卢卡
EDIT: After trying many, many things over and over again I've decided to upgrade to xCode 4 and problems stopped. I don't know what was wrong so unfortunately this is my advice to the rest of you who are lost with the problem I had.
PS thank you all for your suggestions :)
Hi everyone,
I don't know why, but my app stopped compiling on my device after trying to enable push notifications. In debug mode with developer certificate it was running ok, but I was getting push notification related error in the console. After reading about this problem I realized I'll have to sign the code with Distribution certificate in order to really test the push notification. After "playing" with these things my app could not be deployed on the testing device anymore…
I am getting 2 errors over and over again:
1. The executable was signed with invalid entitlements
and when I solve this problem by changing the "code signing identity" to another developer certificate (admin) I get another one:
2. A valid provisioning profile for this executable was not found.
I tried all of the following:
- I logged with my team admin's pass and deleted /revoked certificates and profiles, recreated them and installed them on my computer. In keychain everything seems ok (certificates with keys) and in xCode Organiser (new profiles) also.
I cleaned targets several times
created Entitlements.plist with custom value "get-task-allow" unchecked
In Entitlements.plist I put my bundle identifier
I removed profiles from iphone device and tried again. It installs right provisioning profile
I restarted computer/xcode, iPhone several times
Then, when I saw that I'm going crazy I've decided to try to start another application just to see if this one can be run.
Guess what… It can't. I get the same two errors as above.
I'll explain how I recreated things in developer portal step by step so that you can see If I'm missing something. Just have in mind that we are using 2 developer tools accounts (team admin (A), team member (B)). I'm saying this because I might have done something wrong while recreating certificates and profiles…
REMOVING OLD SETTINGS
1 deleted certificates (dev and distribution) and private keys from keychain.
2 removed all provisioning profiles from xCode Organiser.
3 In developer portal (as Admin) I revoked its Development certificate and then removed Distribution certificate
4 In devices I removed my iPhone device
5 I removed all Development provisioning profiles. The Distribution ones cannot be removed???
6 Then I logged into Team Member's account and revoked development Certificate
CREATING NEW CERTIFICATE; PROFILE...
1 In keychain assistant I created new CSR and uploaded it, admin approved it and I downloaded it along with WWDR intermediate certificate. Drag and dropped them into keychain - login / category - certificates
2 I added my device name/identifier
3 In PROVISIONING/DEVELOPMENT I created new provisioning profile. I added my developer, all devices, and app ID.
4 Then from my team member account I downloaded it, double clicked it and that was it.
5 In xCode Project info I set code sign to developer certificate, and I ran and built with Device / Debug. I get build succeeded and error: The executable was signed with invalid entitlements
TAPPING IN THE DARK:
//I create enitlements.plist and run and I get: Error from debugger: The program being debugged is not being run.
//Then I add get-task-allow = false and I get the: The executable was signed with invalid entitlements.
//If I change it to true then I get: Error from debugger
//Then I add my app Id to Entitlements as a pure string. Nothing changes here :( - either
Thank you very, very much for even reading my post.
Hope I'll solve this before going nuts…
Best regards,
Luka
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为此,您已经导入了团队领导者的 mac 的私钥(.p12),然后它就可以工作了。我面临着同样的问题,只有当您从证书制作的地方拥有该 mac 的私有密钥时,它才可以工作。希望如此帮助。
For that you have import private key(.p12) of mac of your team leader then it will work.I face the same problem it works then only if you will have private of that mac from where the certificate made.Hope so that it will help.
我刚刚花了几个小时来解决这个确切的错误,我采取的解决步骤是:
所以之后经过大量谷歌搜索,我发现了一篇关于图像如何影响这一点的博客文章,所以我检查并注意到我们正在更改应用程序图标,但目前还没有一套。因此,我放入了一个较旧的应用程序图标,它就像魔术一样开始构建并给了我设备令牌。
I just spent a few hours with this exact error, the steps i took to resolve it were:
So after much googling i found a blog post about how images can affect this so i checked and noticed we were in the middle of changing the app icon and currently didn't have one set. So I threw in a older app icon and it just started building like magic and giving me the device token.