How to delete expired provisioning profiles in Xcode
Asked Answered
E

3

10

I want to delete expired provisioning profile manually but I don't want to delete all profiles. I want to add new provisioning profiles but in new Xcode 8.3.2, I can only see certificates and if I directly add provisioning profile by double click how can I check the date of provisioning profile.

Emmanuel answered 22/6, 2017 at 7:42 Comment(5)
Go to your system - "~/Library/MobileDevice/Provisioning Profiles" you can see all your provisioning profile there.Pocked
yeah i checked it but i cant find the specific profileEmmanuel
You can remove all your provisioning profile from there and add again.Pocked
i don't want to delete them all that's why i specified in my questionEmmanuel
Bro I am using this app to check all the provisioning profile and certificates. here is the link iphone-configuration-utility.soft32.com/download/file/id/810420/…. Hope it helps.Soothsay
D
19

This is the way to do it in XCode 9, I believe it is the same in XCode 8.3:

Mind that the certificates and the provisioning profiles are managed separately now, so it is safe to remove the provisioning profiles and download them again.

  1. First make sure to correct or remove the expired profiles in your developer account.
  2. Open the folder "~/Library/MobileDevice/Provisioning Profiles". It is a hidden folder, so use Finder => Go => Go to folder...
  3. Delete all provisioning profiles (move to trash).
  4. In XCode go to XCode => Preferences and select AppleID and team.
  5. Choose "Download Manual Profiles".

The valid profiles are downloaded and the expired profiles are gone.

Dunbarton answered 11/10, 2017 at 11:9 Comment(0)
S
3

If you open the .mobileprovision files in something like TextEdit, you can view the expiration date of the profile. You can do this manually for all files in ~/Library/MobileDevice/Provisioning Profiles if you want, and manually delete the ones that expired already.

OR

You can use a script to check all the files in the Provisioning Profiles directory.

See this answer for more details about the script.

Note that the script will not do the delete as is (the rm command is commented out for safety), but in it's current state it will list each provisioning profile and whether it is expired or not. You can either delete the expired ones manually, or uncomment the rm command to have the script do it.

Fortunately, if you do delete one you need, you can always re-download the latest from Apple's developer site. I often will delete all the provisioning profiles and then just download the one(s) that is needed. Xcode can sometimes get confused if you have multiple valid profiles for an app you are building.

Honestly, at this point, if you are struggling with code signing and it isn't a multi-member team environment, you should look into doing automatic code signing. This gives Xcode the power to create / update certificates and profiles for you on each Mac.

Sender answered 22/6, 2017 at 13:9 Comment(0)
O
-2

xcode->preferences, choose your accounts->Apple ID->Manage Certificates->add iOS Developer,there will use the newest provisioning profile.

Ossiferous answered 22/6, 2017 at 8:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.