xcode 配置文件无效但证书和应用程序 ID 有效,这是为什么
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/28186088/
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 was invalid but Certificate and App ID are valid, why is that
提问by Qiulang
My provisioning profile suddenly became invalid. I logged in developer.apple.com couples of days ago and everything was fine. Today I logged in again and was surprised to find that both of my development profile and distribution profile were invalid. The certificates and App ID are valid, I did not revoke any of them and they are not expired at all. So why my profile became invalid?
我的配置文件突然无效。几天前我登录了 developer.apple.com,一切都很好。今天我再次登录,惊讶地发现我的开发配置文件和分发配置文件都无效。证书和 App ID 是有效的,我没有撤销它们中的任何一个,它们根本没有过期。那么为什么我的个人资料无效?
I know I can re-generate profile but because I do enterprises distribution not app store distribution. I am worried that regenerating profile may affect current users. Also, I really need to figure out the reason to prevent it from happening again.
我知道我可以重新生成配置文件,但因为我做企业分发而不是应用程序商店分发。我担心重新生成配置文件可能会影响当前用户。另外,我真的需要找出防止它再次发生的原因。
Any idea? Thanks!
任何的想法?谢谢!
Updated: First of all, it is not because the profiles were expired, their expiration date is at the end of 2015.
更新:首先,不是因为配置文件已过期,它们的过期日期是在 2015 年底。
Second, I did re-generate development profile at morning but I just checked it and found the profile was invalid again! Something weird must happen and I have submitted a support ticket to apple and wait for their response.
其次,我早上确实重新生成了开发配置文件,但我刚刚检查了一下,发现配置文件又无效了!一定会发生一些奇怪的事情,我已经向 Apple 提交了支持请求并等待他们的回复。
回答by wottle
I'm curious to see what Apple support says. According to Apple (https://developer.apple.com/library/ios/qa/qa1878/_index.html) :
我很想知道 Apple 支持人员怎么说。根据苹果(https://developer.apple.com/library/ios/qa/qa1878/_index.html):
Q: What causes the provisioning profile "Invalid" status? How do I resolve it, and how do I prevent it?
A: The provisioning profile invalid status is caused by changes to the profile's associated certificate or App ID. Any time an App ID or certificate changes, all profiles that are associated to it are marked Invalid. This does not apply to Xcode's team profiles, but applies to all profiles that Xcode does not manage, specifically, custom development profiles and distribution profiles. This document explains the causes in detail and provides steps to resolve and avoid the profile invalid status.
问:是什么导致配置文件“无效”状态?我该如何解决,又该如何预防?
A:provisioning profile 无效状态是由 profile 的关联证书或 App ID 的更改引起的。每当 App ID 或证书发生更改时,与其关联的所有配置文件都会标记为无效。这不适用于 Xcode 的团队配置文件,但适用于 Xcode 不管理的所有配置文件,特别是自定义开发配置文件和分发配置文件。本文档详细解释了原因,并提供了解决和避免配置文件无效状态的步骤。
One possibility is that you modified the app id by turning on or off services in Xcode:
一种可能性是您通过在 Xcode 中打开或关闭服务来修改应用程序 ID:
Avoidance
Since Xcode started managing services on App IDs (through the Xcode > Target > Capabilities tab), Invalidating provisioning profiles became as easy as enabling or disabling a target capability. Remember that every time the App ID changes with respect to its enabled services, all profiles attached to that ID become invalid.
回避
由于 Xcode 开始在 App ID 上管理服务(通过 Xcode > Target > Capabilities 选项卡),使配置文件失效变得像启用或禁用目标功能一样简单。请记住,每次 App ID 相对于其启用的服务发生更改时,附加到该 ID 的所有配置文件都会变得无效。
Hope this helps.
希望这可以帮助。
回答by Qiulang
It seems that somebody still hits this problem after almost a year when I first raised it. So I am answering my own question trying to provide some insight.
当我第一次提出这个问题将近一年后,似乎仍然有人遇到了这个问题。所以我正在回答我自己的问题,试图提供一些见解。
Apple never answered my ticket instead they returned my credit. I took that as a sign that they had no idea either (saw my comments above). I can still use that "invalid" profile but it really made me uncomfortable. So I created a different one.
苹果从来没有回答过我的票,而是退回了我的信用。我认为这表明他们也不知道(看到我上面的评论)。我仍然可以使用那个“无效”的配置文件,但这确实让我感到不舒服。所以我创造了一个不同的。
In summary it maybe just a bug in their system and if you have tried all the solutions and the problem still exists just create a new one.
总而言之,这可能只是他们系统中的一个错误,如果您尝试了所有解决方案但问题仍然存在,只需创建一个新的解决方案。
回答by Duan Nguyen
I guess it's related Automatically manage signingin Xcode. In case you switch to another branch which has different configures in Xcode > Target > Capabilities, Xcode will change your App ID settings
我想这与自动管理Xcode 中的签名有关。如果您切换到另一个在 Xcode > Target > Capabilities 中具有不同配置的分支,Xcode 将更改您的 App ID 设置
回答by ppetree
If you generate a new CSR for something like an APNS certificate, it will mark your provisioning profiles as invalid.
如果您为 APNS 证书之类的内容生成新的 CSR,它会将您的配置文件标记为无效。
回答by ajay negi
Guess I found the answer, it's simple go to the apple developer account and select those certificates which wasn't working.
猜猜我找到了答案,很简单,转到苹果开发者帐户并选择那些无效的证书。
1.Edit them and simply add some new name just to remember.
1.编辑它们并简单地添加一些新名称只是为了记住。
Select same App Id and certificate for both development profile and distribution profile and hit the download button
After downloading add them into you Xcode and you will them there.
为开发配置文件和分发配置文件选择相同的 App Id 和证书,然后点击下载按钮
下载后将它们添加到您的 Xcode 中,您就会将它们放在那里。
it generally happens when you update your Xcode, so be sure when you check certification where Xcode is mentioned(For use in Xcode 11 or later in my case)
它通常在您更新 Xcode 时发生,因此请确保在检查提及 Xcode 的认证时(在我的情况下用于 Xcode 11 或更高版本)
回答by Boda Taljo
If you generate a new provisioning profile, your old installations (store or adhoc) won't be affected
The provisioning profile lives for 1 year, maybe it expired so simply remove it and make another one with the same certificates, app ids and devices and you can use it without any problem
如果您生成新的配置文件,您的旧安装(商店或临时)不会受到影响
配置文件的有效期为 1 年,也许它已过期,因此只需将其删除并使用相同的证书、应用程序 ID 和设备创建另一个配置文件,您就可以毫无问题地使用它
EDIT:
编辑:
I don't know a case where a provisioing profile would become invalid unless:
我不知道提供配置文件会失效的情况,除非:
- It reached its expiry date;
- You modified the app id or certificates that are related to it.
- 它达到了到期日;
- 您修改了应用 ID 或与其相关的证书。