All Blog Posts

Fastlane, The Answer to Large Scale Push Certificate Generation

Tired of generating push certificate after push certificate for all of your apps/clients? We certainly were. At 3 SIDED CUBE we have around 140 different apps under various different developer centre teams, but today we’ll be talking to you about one particular client: the GDPC (Global Disaster Preparedness Center).

Development

fastlane

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!

Download the tool.

Published on November 10, 2016, last updated on June 20, 2018

Give us the seal of approval!

Like what you read? Let us know.

0

Tags