Compile-Time Warnings


Like many developers that icon bugs the heck out of me. That's where this all started.

When I shipped Slopes v2.3 I intended it to be the last version available for iOS 9.x. It didn't have auto-renewing subscriptions (that'd be v2.4), but it had all the other stuff I wanted it to have. iOS 10 had a lot of nice new shinies that I wanted to move pretty quickly to it - the new Measurements API, the new Core Data stack, and a few other things.

Not to mention watchOS 3. There was basically no point to let people run Slopes on watchOS 2 - a reliable complication wasn't even possible until 3.

At the same time, as an indie app, I usually devote minimal time to keeping backwards compatibility. By the time the season starts (November), I'm usually looking at ~60% adoption (I'm curious how that'll go this year thanks to stickers).

So in July I flipped the switch to make Slopes iOS 10 and watch OS 3 only and got to work.

In iOS 10 [UIApplication openURL:] got deprecated in favor of [UIApplication openURL:options:completionHandler:]. Compiler warnings came up, I dutifully switched to the new call.

'Twas the week of iOS 10 submissions. Thursday, in fact. Apple had asked for submissions the night before. I was waiting on sticker pack art so I had a day and a half extra.

I decided I had made enough changes in my up-sell screens, in-app marketing, etc to try to back port the app to iOS 9. I hadn't gotten the time to use any new iOS-10 only goodie I wanted so nothing was stopping me. After all, if I could get that 40% of slow-to-upgrade users onto my new auto-renewing subscriptions this year instead of listening to my inner engineer and insisting on iOS 10, that's 15% more revenue next year.

I downgraded the target to require iOS 9, and built. Swift warned me of the new APIs I was relying on, so a quick if #available(iOS 10.0, *) here, a few [INPreferences class] checks here and there in ObjC for the Siri support I knew I added, and there and I was up and running.

Spent a decent amount of time testing all the major paths and everything looked OK. Submitted to the App Store on Friday afternoon, and I was approved as part of the initial "New for iOS 10" wave. Featured, even, under the Hey Siri section.

You know when you don't want your app to crash?

I'd probably say this "Sure thing" button is one of them.

Turns out, I had missed all the ObjC uses of [UIApplication openURL:options:completionHandler:]. You remember, that API that was iOS 10 only? Remember, kids, the ObjC compiler will let you compile iOS 10 only code for iOS 9, and it'll only yell at you when you actually go and execute that code path.

Rookie mistake. Despite almost 10 years working in ObjC, I'd gotten so used to Swift's compile-time safety that I didn't think to scrub my code.

A quick find-text for openURL:, a few if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"10.0")) {s added in, and a v2.4.1 submission later, all is well.

There are worse bugs to ship. Probably coulda used that rating, though. Thanks for trying, whoever you were.