Search code examples
iosxcodeprovisioning-profile

Xcode provisioning profile does not show and suddenly disappeared


tl, dr: I tried to add the provisioning profile from old project to new project that was basically an update of an old project. But the profile did not show at the new project, and it is now even gone on the old project. I did not touch any certificate, identity etc. What should I do?

I successfully distributed an iOS app using Firebase just 2 weeks ago. Here are the steps that my lab's manual provided.

  1. Download the most recent template code from github
  2. Do makefile etc. to generate files
  3. Make a new project, copy the above generated files and updated code.
  4. In order to display the provisioning profile to the new project, Download the provisioning profile -> double click to open Xcode -> open Xcodeworkspace.
  5. Under Build Settings, the provisioning profile is available for selection, and everyone is happy.

However, step 5 did not work. Since I was using the same provisioning profile, I simply double clicked the profile that I already had successfully used 2 weeks ago, and open the new xcodeworkspace.

But nothing shows.

Furthermore, when I opened the old project, the profile was showing "ineligible" and when I reopened the old project, it now even disappeared.

The profile expires on June 2022 so it should be okay.

What could have gone wrong here? Where should I check?


Solution

  • I assume that you open the project on another computer. If you just download and import the provisioning of that project on another computer after that you open the old project then you missing the certificate for the project. If like that, you must export the certificate's private key from the old computer (.p12 file) and import it to a new computer and configure provisioning like normal.

    If you open it on the same computer then you need to check 2 steps below:

    1. You must make sure the old project and the new project that they are opening on the same Xcode and the same computer that you distributed 2 weeks ago.
    2. You need to double-check the bundle-id of both projects are the same because they are different then it cannot use the same provisioning unless you use wildcard bundle-id