MoProPro: a single command to add testers to iPhone provisioning profiles
Distributing iPhone applications to testers requires the developer to sign their code using a combination of a (ad hoc) distribution certificate and a mobile provisioning profile, which explicitly contains the device ids (UDIDs) of all your testers.
Introducing MoProPro
MoProPro automates as much as possible of a very specific, but for iPhone developers very common and tedious, task: adding tester’s UDIDs to an existing ad hoc distribution provisioning profile and downloading the new version of the profile. While this doesn’t sound that hard, compare ‘Before’ and ‘After’
Both the ‘Before’ and ‘After’ scenario assume you’ve already set up your app, a distribution certificate, a mobile provisioning profile and acquired the UDID ‘1234567890DEADBEEFCOFFEE098766654321ABCD’ that you want to add to your testers…
Before
- Go to the iPhone Dev Center website
- Click login
- Fill in credentials and login
- Go to the iPhone Developer Program Portal
- Go to the Devices page
- Click on Add Devices
- Enter and name the UDID, submit
- Go to the Provisioning page
- Click on Distribution
- Find the right (ad hoc) provisioning profile for your app
- Click on Edit, click on Modify
- Check all boxes of the newly added devices, submit
- Wait a bit, refresh the page, until the Download button appears again
- Download the new provisioning profile
Most of this process is pretty mechanical and boring. Also, most of this process could be smoother if Apple had made a better web interface, based on common use-cases, which will hopefully happen somewhere in the future. But, in the meantime, and for people that just like the command prompt, witness ‘After’:
After
Using the Terminal, go your project’s directory (containing the Info.plist file, and a .mopropro file containing the ADC credentials for this project) and run:
$ mopropro 1234567890DEADBEEFCOFFEE098766654321ABCD "Name for Device" Saved new provisioning profile to 'Example_Ad_Hoc.mobileprovision' $
That’s it.
If you add the -v switch, you can see (more or less) what it does, for example:
Validating input... Ok. Getting App Id... com.example.app Logging in... Ok. Looking up existing devices... Done. Adding 1 device... Submitted. Looking up provisioning profile... - Found 5 profiles - Found 2 matching profiles - Found Ad Hoc profile - Adding devices Saving profile with new devices... Ok. Waiting a bit while the new profile is generated... Ok. Trying to retrieve new profile... Got it! Saved new provisioning profile to 'Example_Ad_Hoc.mobileprovision'
The script has some more options and can also accept multiple devices. All ‘documentation’ can be found in the README in MoProPro’s repository on GitHub. Enjoy!
About
MoProPro uses the excellent WWW::Mechanize library to automate using the iPhone Dev Center website. The Plist library is used for getting the application identifier out of the Info.plist file. YAML is used as the format for the configuration and input files.
3 Comments
Jump to comment form | comments rss | trackback uri