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.
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.
- First make sure to correct or remove the expired profiles in your developer account.
- Open the folder "~/Library/MobileDevice/Provisioning Profiles". It is a hidden folder, so use Finder => Go => Go to folder...
- Delete all provisioning profiles (move to trash).
- In XCode go to XCode => Preferences and select AppleID and team.
- Choose "Download Manual Profiles".
The valid profiles are downloaded and the expired profiles are gone.
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.
xcode->preferences, choose your accounts->Apple ID->Manage Certificates->add iOS Developer,there will use the newest provisioning profile.
© 2022 - 2024 — McMap. All rights reserved.