Provisioning Profiles was invalid but Certificate and App ID are valid, why is that

烂漫一生 提交于 2019-12-03 06:39:34

I'm curious to see what Apple support says. According to 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.

One possibility is that you modified the app id by turning on or off services in Xcode:

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.

Hope this helps.

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.

  1. If you generate a new provisioning profile, your old installations (store or adhoc) won't be affected

  2. 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

EDIT:

I don't know a case where a provisioing profile would become invalid unless:

  1. It reached its expiry date;
  2. You modified the app id or certificates that are related to it.

I guess it's related Automatically manage signing in Xcode. In case you switch to another branch which has different configures in Xcode > Target > Capabilities, Xcode will change your App ID settings

If you generate a new CSR for something like an APNS certificate, it will mark your provisioning profiles as invalid.

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

  2. After downloading add them into you Xcode and you will them there.

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)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!