Search code examples
iosxcodeprovisioning-profile

How to renew Xcode Managed Provisioning Profile


I have an app signed with an Xcode Managed Provisioning Profile, this app is under an Enterprise account, so when the certificate is about to expire it must be rebuilt, resigned and reinstalled to all devices since we don't use an MDM solution.

I've rebuilt the app but Xcode keep signing it with the same Provisioning Profile with which it signed the app the last year.

When I go to my developer account I can't see the Xcode Managed Provisioning Profile but I'm sure that it was created from me by my Xcode the last year.

How can i renew this Profile?


Solution

  • When I go to my developer account I can't see the Xcode Managed Provisioning Profile but I'm sure that it was created from me by my Xcode the last year.

    As you can see from this linkApple Docs so it's correct that you don't see profiles that are managed by Xcode.

    I've rebuilt the app but Xcode keep signing it with the same Provisioning Profile with which it signed the app the last year.

    The problem is that Xcode does not recreate a new provisioning profile until it has one in a sort of "cache", to know where this cache is, you can drag this icon

    Xcode Signing & Capabilities

    into a program like VSCode and it will show the path. (That menu is under your app target -> "Signing & Capabilities")

    It will probably be something like: /Users/<your_name>/Library/MobileDevice/Provisioning Profiles, inside that folder you will see all your provisioning profile.

    Now:

    1. close Xcode
    2. delete (or move to another folder) the old Provisioning Profiles that you no longer need
    3. open Xcode again

    Xcode now should regenerate the Provisioning Profiles with a 1 year validity.

    TL;DR: close Xcode, go to /Users/<your_name>/Library/MobileDevice/Provisioning Profiles delete the old Provisioning Profile, reopen Xcode.