fastlane: Match: Regenerate Profile if Profile is Invalid or Expired

Hi,

 Cert and Profile been synced to Git Repo using Match ( Started from scratch after nuke )

 After that Generated a new Push Certificate for an existing App Id using pem ( Enable Push Services )
 Existing Provisioning Profile became invalid. 

 When i run match without force
     It is not regenerating the Profile - But it says Profile is valid

 When i run match with force
    Ideally a new Provisioning profile is created and synced to the git repo

 To me it looks like When we run match 
   We need to Check whether the Profile is Invalid or Expired
   If so - need to re generate the Profile and Update the Git repo

Any thoughts on this?

Thanks in advance. Ram.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 34 (15 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks for the good job !

Thanks for the work on this.

I filed a radar for Apple that push notifications invalidate certificates: https://openradar.appspot.com/radar?id=4956030156931072, feel free to dupe.

The next match release should be able to automatically repair invalidated provisioning profiles 👍

Thanks everybody for your help on this, and providing the information on how to reproduce the problem.

I always thought force_for_new_devices: true would do this, but was surprised it didn’t.

To add my 2cents. I had bunch of development Provisioning profiles created and valid. I enabled an app group in them on developer.apple.com, which marked them as invalid. screen shot 2016-10-10 at 12 16 50

Running my match lane, just re-downloaded all these profiles and force_for_new_devices had no effect. The solution would be force: true. However that creates new profile for some reason.

[12:20:28]: Successfully logged in
[12:20:28]: Fetching profiles...
[12:20:29]: Provisioning Profile 'match Development com.myapp.dev' is not valid, skipping this one...
[12:20:29]: No existing profiles found, that match the certificates you have installed locally! Creating a new provisioning profile for you
[12:20:33]: The name 'match Development com.myapp.dev' is already taken, using another one.
[12:20:33]: Creating new provisioning profile for 'com.myapp.dev' with name 'match Development com.myapp.dev 1476091233'

Which is obviously not we would like. So now I have to delete all those profiles first and then run my match command with force:true because otherwise it would fail on pushing to git.

I have the same problem. Clean repository, clean account on developer portal:

$ match nuke development
$ match nuke distribution
$ match development
$ match adhoc

Everything is fine on developer portal.

$ pem --development
$ pem

Existing Provisioning Profile became invalid in the developer portal. If I use match again, it creates a new provisioning, it does not fixed the existing one. Also, if I fix the provisioning profile by going to the dev portal , match can’t find the provisioning profile anymore.

@KrauseFx Thanks for your comments. A special thanks to you for giving us an amazing tool - Fastlane.

Please find below the steps to reproduce this issue

Created a New Dist Cert / Provisioning Profile using match

Generated a Push Certificate using pem ( Enable Push Services )

Existing Provisioning Profile became invalid in the Dev Portal.

If I run match with force A new Provisioning profile is created and synced to the git repo

If I run match without force It is not regenerating the Profile - But it says Provisioning Profile is valid. Whereas in the Dev Portal it is invalid.

My Suggestion is When we run match We need to Check whether the Profile is Invalid or Expired If so - need to re generate the Profile and Update the Git repo accordingly.

Kindly let me know your thoughts. Please