Weekly Sponsor: Rollout 🚀

Delighted to welcome an great new sponsor this week, it's Rollout!

Rollout allows us to deploy code-level changes to native iOS apps, without waiting for App Store approval.

We can fix bugs, diagnose issues, and patch code, all without resubmitting!

Let's try this out. After signing in to Rollout, we'll add our first app.

We'll give our app a name, then use Cocoapods to install the Rollout SDK.

Following the instructions, we'll install the pod like normal, then run a quick script to get our project ready.

Next we'll add 2 lines to our AppDelegate.m, to import the SDK and set it up:

#import <Rollout/Rollout.h>


- (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  [Rollout setupWithKey:@"12345abcdefg"];

  return YES;

That's it, Rollout is now integrated into our app. Neat!

Now let's fast-forward a bit, to a time after we've shipped our imaginary app to the App Store. We get approved, and we're celebrating the launch and then 😣 doh! Something is causing our app to crash on launch. Yikes.

First we'll take a look at our project, and find the culprit. In our case, it looks like part of our code is throwing a non-fatal exception when we didn't expect it to. Yuck.

Not to worry though, because our app has Rollout inside.

We'll head to the Rollout dashboard and add a hotfix.

We'll select the "Surround Invocation with Try Catch" type, and test it out.

That fixes it! Now that things are fixed up, we can switch our hot patch to "Production" mode. (We could even release it gradually to only a percentage of our user base).

This kind of flexibility and freedom really does feel like magic. It's sort of like "insurance" knowing we won't be stuck waiting on Apple to get critical changes out to users. Neat!

Rollout supports Objective-C apps, Swift is supported (in beta) and will be fully released in November.

Last but certainly not least, Rollout is offering a sweet discount for LBOC readers: Use the code cocoa20 to get 20% off any paid plan for 6 months!

A huge thanks to Rollout for sponsoring this week's Bites!