配置文件状态无效(由 XCode 管理)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/31583319/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Provisioning profiles status invalid (managed by XCode)
提问by jlmg5564
Suddenly all my provisioning profiles are in status Invalid
(managed by XCode). Why?
突然间,我所有的配置文件都处于状态Invalid
(由 XCode 管理)。为什么?
Also I remember in XCode 4 that you always had to create your provisioning profile. Now XCode autocreates your provisioning profile for development. Is this a new feature on XCode 6?
我还记得在 XCode 4 中,您总是必须创建配置文件。现在 XCode 会自动创建您的配置文件以进行开发。这是 XCode 6 的新功能吗?
回答by Mike Gledhill
I had the same problem today.
我今天遇到了同样的问题。
In the Apple Developer website, all of my company's Provisioning Profiles were marked as "Invalid (managed in Xcode)". None were out of them were date, none were using iOS Certificates which had expired, and the website gave zero suggestion that anything was actually wrong.
在 Apple Developer 网站上,我公司的所有配置文件都被标记为“无效(在 Xcode 中管理)”。没有一个是过时的,没有一个使用已经过期的 iOS 证书,并且该网站给出了零建议,表明任何事情实际上是错误的。
The solution, ridiculously, was to deletemy perfectly valid iOS Certificates, and recreate them.
荒谬的是,解决方案是删除我完全有效的 iOS 证书,然后重新创建它们。
We write in-house apps aswell as apps for the App Store, and Apple (quietly) refuses to let you have more than 2 of these at once. So I was unable to create a thirdiOS Certificate which would allow me to use the "In house and Ad-hoc" option, hence the need to delete an iOS Certificate first.
我们为 App Store 编写内部应用程序和应用程序,Apple(悄悄地)拒绝让您同时拥有 2 个以上的应用程序。所以我无法创建第三个iOS 证书,它允许我使用“内部和临时”选项,因此需要先删除一个 iOS 证书。
Once I had pointlessly recreated the "iOS Certificate", the Provisioning Profiles came to life.
一旦我毫无意义地重新创建了“iOS 证书”,Provisioning Profiles 就栩栩如生了。
Part 2 of this farce is to go into Xcode, and delete your Provision Profiles (XCode \ Preferences \ select your iOS Certificate \ View Details, then select all of your provisioning profiles, right click and select "Move to trash".
这个闹剧的第 2 部分是进入 Xcode,并删除您的配置文件(XCode \ Preferences \ 选择您的 iOS 证书 \ 查看详细信息,然后选择您的所有配置文件,右键单击并选择“移至垃圾箱”。
At this point, absolutely nothing will change, and you'll think you've done something wrong.
在这一点上,绝对没有什么会改变,你会认为你做错了什么。
But then, if you then quit Xcode, and go back in, thenyou'll see the Provisioning Profiles will have disappeared.
不过,如果你然后退出Xcode中,并回去,然后你会看到预置描述文件将会消失。
Now you can re-download the Provisioning Profiles from the Apple Developers website, and redownload the latest versions.
现在您可以从 Apple Developers 网站重新下载 Provisioning Profiles,并重新下载最新版本。
Until Xcode 7.2 comes along, and breaks something else.
直到 Xcode 7.2 出现,并破坏了其他东西。
(Seriously, I spend more time fighting with Xcode bugs than writing code..)
(说真的,与编写代码相比,我花更多的时间来解决 Xcode 错误。)
回答by Bryan Musial
Apple introduced Xcode Managed profiles in Xcode 5 as a way to try and make the provisioning process less cumbersome and get Developers sending code to their devices without having to go through the manual upload/setup/download/install/build process. In effect, Xcode was completely automating the entire provisioning process whenever there was a code sign error detected. For developers that had already wrestled with understanding Provisioning, this new behavior was frustrating as the processes those teams put in place were unintentionally being wrecked by Xcode's best attempts to be helpful. That said, it is better today but not as transparent as it should be when it comes to affecting your Certificates, Identities, and Profiles data. If you are't familiar with what all is included in a provisioning profile or signing identity, there's some related reading you might want to skim: What are code signing identities?
Apple 在 Xcode 5 中引入了 Xcode Managed 配置文件,作为一种尝试使配置过程不那么麻烦的方法,并使开发人员无需通过手动上传/设置/下载/安装/构建过程即可将代码发送到他们的设备。实际上,只要检测到代码签名错误,Xcode 就会完全自动化整个配置过程。对于已经努力理解 Provisioning 的开发人员来说,这种新行为令人沮丧,因为这些团队实施的流程无意中被 Xcode 最好的帮助尝试破坏了。也就是说,它现在更好,但在影响您的证书、身份和配置文件数据时并不像它应该的那样透明。如果您不熟悉配置文件或签名标识中包含的所有内容,什么是代码签名身份?
Suddenly all my provisioning profiles are in status Invalid (managed by XCode). Why?
突然间,我所有的配置文件都处于无效状态(由 XCode 管理)。为什么?
The most common reason for a profile to move to the "Invalid" state is because at least one of the profile's registered test devices has been deactivated / removed from the developer's account. By doing so, all profiles that included that device UDID are marked as invalid and require regeneration. This can be accomplished in Xcode > Preferences > Accounts, clicking 'View Details' on your Apple ID account, and then clicking the refresh button in the lower right corner of that account details screen.
配置文件移动到“无效”状态的最常见原因是因为配置文件的至少一个已注册的测试设备已从开发人员的帐户中停用/删除。通过这样做,包含该设备 UDID 的所有配置文件都被标记为无效并需要重新生成。这可以在 Xcode > Preferences > Accounts 中完成,单击 Apple ID 帐户上的“查看详细信息”,然后单击该帐户详细信息屏幕右下角的刷新按钮。
Also I remember in XCode 4 that you always had to create your provisioning profile. Now XCode autocreates your provisioning profile for development. Is this a new feature on XCode 6?
我还记得在 XCode 4 中,您总是必须创建配置文件。现在 XCode 会自动创建您的配置文件以进行开发。这是 XCode 6 的新功能吗?
As stated in the start of this answer, no. Autogenerated provisioning profiles were introduced in Xcode 5 and the workflow has been refined several times since Xcode 5.0 and modern Xcode. If you allow Xcode to assist you with Code Signing error messages, its default position is to check the validity of your development or distribution certificate (depending on what kind of code sign operation you were trying to do), check the validity of the AppId and Provisioning Profile, and revoke then reissue whichever part of the signing identity is in error.
如本答案开头所述,不。Xcode 5 中引入了自动生成的配置文件,并且自 Xcode 5.0 和现代 Xcode 以来,工作流程已多次改进。如果您允许 Xcode 协助您处理代码签名错误消息,其默认位置是检查您的开发或分发证书的有效性(取决于您尝试执行的代码签名操作类型)、检查 AppId 的有效性和提供配置文件,并撤销然后重新发布签名身份的任何部分错误。