Automatically Generate iOS Push Notification Certificates
This hack of a Ruby script logs into your iOS provisioning portal and generates Apple iOS production push notification certificates. This was needed because I have over 200+ apps in the iOS store. I needed a quick way to generate these certificates. So, I created a Ruby Gem to interface with the Mac OS X Keychain app.
This was tested on Mac OS X 10.7 (Lion) using Ruby 1.9.2.
You must have Chrome installed and the chromedriver binary http://code.google.com/p/chromium/downloads/list.
First, install the gems.
gem install keychain_manager gem install watir-webdriver
Next, modify config.example.yml with your appropriate parameters and rename the file to config.yml.
Now, you’ll need to open the script up app.rb and modify the variable END_WITH, if you want to configure all of your iOS apps that aren’t already configured for production push notifications, set END_WITH to an empty string ''. Utlimatetly, right around line 60 with END_WITH is being used should be modified to evaluate a regular expression.
Finally, run the script:
(The MIT License)
Copyright (c) 2011 JP Richardson
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.