We make two lines of white-labelled apps for the GDPC:
First Aid (Available in 82 countries as of October 2016).
Hazards (Available in 22 countries as of October 2016).
Out with the old:
These apps are submitted on a per-country basis, so each country can have their own icon and content, they are also built and maintained in pools of apps throughout the year. Until recently our push certificate generation process went as follows:
Once a year, manually generate push certificates for all 104 apps (this took 3 of us roughly 2 days).
Set up a calendar invite for a years time to regenerate the push certificates.
As we add more countries in new dev pools generate their certificates.
Set up a calendar invite for each new app added.
Panic, when an app stops receiving push notifications, because it’s certificate has expired.
Have our day interrupted by having to regenerate half-a-dozen push certificates.
Scream at our computer because Amazon SNS still don’t support 1 key push notification authentication.
Wish we had a better process in place for generating push certificates.
In with the new:
We needed a solution for this, and the obvious one was to use the fantastic set of tools known as Fastlane (And specifically PEM) to generate our push certificates at a much higher speed than we could possibly do ourselves.
To do this, we created a bash script, which today we’re open-sourcing and can be found here.
What this script does, is take a formatted JSON file, and for each app in the structure, generates a push certificate using Fastlane’s PEM tool. The only information you need to provide to the script are:
Your developer center email address.
A relative path to your JSON file to generate from.
A password to protect the generated certificates with.
And the script will handle the rest! So now, our new and improved process – Donned the Push Party – is as follows:
Every 6 months run a script (Using a maintaned JSON file) to regenerate all of our push certificates.
As we add more countries in a dev pool generate their certificates (Using the tool) and add them to the master JSON file.
Scream at our computer because Amazon SNS still don’t support 1 key push notification authentication.
Praise the lord that we took the time to improve our processes.
Using this new process we recently regenerated all 108 certificates in roughly 16 minutes! So thank you developers of Fastlane, and thank you process improvement!
Published on 10 November 2016, last updated on 20 June 2018