Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-12852

Automating the management of iOS provisioning profiles

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • xcode-plugin
    • None

      I was wondering if this is possible, and yesterday I bumped into this article:
      http://lacostej.blogspot.com/2012/02/automating-management-of-ios.html

      I have spent one day to make it work, but now is perfect!

      So, now could be really good to have this feature implemented into the plugin.

      Basically there are two steps:
      1) download all the profile you need from the apple developer center
      2) installing the new certificate into xcode and update the project file with the new one

      if just the second point is integrated into the plugin should be sufficient but if you can integrate all this process would be really amazing.

      I have already dealt with it, so I'm happy to answer your questions and doubt about it.

      What do you think guys? I think would be a very great feature!

          [JENKINS-12852] Automating the management of iOS provisioning profiles

          lacostej added a comment -

          Valerio,

          if it took you one day to set it up, then I can probably improve the tutorial quite a lot. Feedback appreciated.
          And I will gladly help getting this into some form into the xcode or another plugin.
          I would maybe first help to stabilize the API (e.g. the site.json).

          lacostej added a comment - Valerio, if it took you one day to set it up, then I can probably improve the tutorial quite a lot. Feedback appreciated. And I will gladly help getting this into some form into the xcode or another plugin. I would maybe first help to stabilize the API (e.g. the site.json).

          The tutorial is fine, thank you very much for that!

          Actually, I had some problems in get your ruby scripts to run. I don't use ruby, so I missed a lot of packages dependencies.

          Also, it takes a bit of time to debug inside your bash script to understand why they didn't work.
          In the end I realise that if you setup the project to code-sign with the automatic certificate selector, then inside the project file the PROVISIONING_PROFILE field is empty. This cause the script to fail, once I realised that I was able to fix it.

          About the API I was wondering if would be better to include everything in the same job so there is no need to look into the relative path to find the job that download the certificate (as you wrote in the tutorial).

          But include this into the xcode plugin I think would be seriously a great improvement.

          Valerio Mazzeo added a comment - The tutorial is fine, thank you very much for that! Actually, I had some problems in get your ruby scripts to run. I don't use ruby, so I missed a lot of packages dependencies. Also, it takes a bit of time to debug inside your bash script to understand why they didn't work. In the end I realise that if you setup the project to code-sign with the automatic certificate selector, then inside the project file the PROVISIONING_PROFILE field is empty. This cause the script to fail, once I realised that I was able to fix it. About the API I was wondering if would be better to include everything in the same job so there is no need to look into the relative path to find the job that download the certificate (as you wrote in the tutorial). But include this into the xcode plugin I think would be seriously a great improvement.

          lacostej added a comment -

          > Actually, I had some problems in get your ruby scripts to run. I don't use ruby, so I missed a lot of packages dependencies.

          That part I want to fix by making it a proper gem. That way it will be properly installed automatically.

          > Also, it takes a bit of time to debug inside your bash script to understand why they didn't work.

          Yes. The script is tuned to my particular environment and clearly could fail in other environments. I am pretty new to iOS projects. Feel free to send your changes so that I can look at what you have done.

          > About the API I was wondering if would be better to include everything in the same job so there is no need to look into the relative path to find the job that download the certificate (as you wrote in the tutorial).

          I am a bit against putting the 2 tasks in the same job for several reasons

          • things that don't need to be separate dont need to be merged in
          • if you have a build farm, multiple projects or multiple developers, you still only need to download Apple's information once. And by splitting the tasks, you don't need to share the credentials either
          • The part that is in batch today could definitively move into the plugin. The reason I used a batch script was
            1. it was faster to implement
            2. I needed to use it outside the CI server (on my developer box, I need to do the same things)

          Still could you share your changes to the xcode batch scripts so that we know how to best integrate this into the xcode plugin ?

          lacostej added a comment - > Actually, I had some problems in get your ruby scripts to run. I don't use ruby, so I missed a lot of packages dependencies. That part I want to fix by making it a proper gem. That way it will be properly installed automatically. > Also, it takes a bit of time to debug inside your bash script to understand why they didn't work. Yes. The script is tuned to my particular environment and clearly could fail in other environments. I am pretty new to iOS projects. Feel free to send your changes so that I can look at what you have done. > About the API I was wondering if would be better to include everything in the same job so there is no need to look into the relative path to find the job that download the certificate (as you wrote in the tutorial). I am a bit against putting the 2 tasks in the same job for several reasons things that don't need to be separate dont need to be merged in if you have a build farm, multiple projects or multiple developers, you still only need to download Apple's information once. And by splitting the tasks, you don't need to share the credentials either The part that is in batch today could definitively move into the plugin. The reason I used a batch script was 1. it was faster to implement 2. I needed to use it outside the CI server (on my developer box, I need to do the same things) Still could you share your changes to the xcode batch scripts so that we know how to best integrate this into the xcode plugin ?

          I haven't changed you script, as I wrote:
          > In the end I realise that if you setup the project to code-sign with the automatic certificate selector,
          > then inside the project file the PROVISIONING_PROFILE field is empty. This cause the script to fail, once I
          > realised that I was able to fix it.

          The "fix" is to setup the project to a specified provisioning profile. This make sense because if it is automatic I think there is no way to know which one you want to use.

          ps: I need to run your script on my developer machine too

          Valerio Mazzeo added a comment - I haven't changed you script, as I wrote: > In the end I realise that if you setup the project to code-sign with the automatic certificate selector, > then inside the project file the PROVISIONING_PROFILE field is empty. This cause the script to fail, once I > realised that I was able to fix it. The "fix" is to setup the project to a specified provisioning profile. This make sense because if it is automatic I think there is no way to know which one you want to use. ps: I need to run your script on my developer machine too

          lacostej added a comment -

          Valerio, got it. I pushed a few changes to detect this problem and the error message will be cleaner. The documentation also.

          It should be possible to set a value, even if none was set before hand. I've thus opened a detailed issue containing of the roadblocks toward that feature: https://github.com/lacostej/iOSprovisioningprofiles/issues/1

          One first step is to add support to the apple_dev_center.rb script for certificate download, and it should be easy to do. You may want to look at it

          lacostej added a comment - Valerio, got it. I pushed a few changes to detect this problem and the error message will be cleaner. The documentation also. It should be possible to set a value, even if none was set before hand. I've thus opened a detailed issue containing of the roadblocks toward that feature: https://github.com/lacostej/iOSprovisioningprofiles/issues/1 One first step is to add support to the apple_dev_center.rb script for certificate download, and it should be easy to do. You may want to look at it

            Unassigned Unassigned
            netskate Valerio Mazzeo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: