Finally, this is what I did and it worked in Production.
Apple Developer Account Type: Enterprise.
Delete the Enterprise certificate files from the git repository where Fastlane pushes the certificates and profiles.
Run "fastlane match enterprise".
This will create a new Enterprise certificate. Note Apple only allows 2 production certificates per account. So at this point, your account should show your old and the newly created Distribution (Enterprise) certificate.
- Now run "fastlane match enterprise --force"
This will re-create the profiles using the new certificate and push it to the Git repository. Pass the bundle identifiers of all the profiles which you wish to renew.
You could skip Step 2 technically and just execute Step 3 but I didn't do that and I didn't want to redo this again.
So this will keep your current deployed apps active. You can create new builds or re-sign the old builds, with the new certificate and profiles and push out the new builds.
Once you are sure that all the users have the updated builds you can delete the old certificate from the Apple Developer account or let it expire on its own and then delete it, once expired.
Above process will renew the certificate for 3 years and profile for 1 year.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…