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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…