by Cesare Rocchi

iOS vs Android in Old Projects

by Cesare Rocchi

Tags: iOS Android

Around ten days ago I wake up and the iPhone tells me I missed ten phone calls. Usually not a lot of people call me and very rarely ten times in half an hour. I call back, suspecting something weird.

It was a friend. He runs a company that has many branches. One branch deals with constructions and publishes a monthly magazine. Besides being printed the magazine is also available as a Newsstand app for iOS and Android. My friend was desperate because in a few days he had to appear on the national TV. He wanted to plug the magazine but neither the iOS app, nor the Android one worked anymore.

I like rescue missions. I did a couple in the past. It was always fun, and also highly remunerative. Before saying yes I asked when the apps where updated the last time. “Built three years ago and never touched since then” he said. Bad smelling, but I said yes anyway.

The core of the question was technically pretty easy to solve. Both apps loaded content from a plist file stored on Dropbox. For some unknown reason the link used by Dropbox to publicly share the file had changed. Obviously that URL was wired in the code of both apps. So the job looked easy peasy:

  • change the URL in the code
  • recompile
  • submit new version

What could possibly go wrong?

I open the Xcode project and 35 warnings are there ready to welcome me. I find the URL, change it and everything works. But an old projects is rusty, even if you let Xcode update the settings as I did. Many assets, icons and splash screens were missing. Adding them was easy. Waiting for the company to find the originals and export new assets was the lengthy part. Same for new assets required by iTunes connect.

I stressed more than once that the warnings were potential issues, but addressing them would have required quite some time and testing. Time that we didn’t have. So we agreed to submit the new iOS version and move on to fix the Android app.

My machine didn’t have Android Studio installed. My last Android project was last year and when I bought a new machine I didn’t bother installing Android tools. It took me almost two hours just to install and configure all the tools I needed to open the project. The Android app was built using IntelliJ. The first version of Android Studio was just born at the time the app was built.

I spent two hours just trying to figure out the project. It took me a lot of trial and error, until I was able to convert the project to the Gradle build system, configured correctly to pull down all the dependencies. I went to sleep, confident in the next day.

I woke up with just five missed calls. The iOS app got approved but wasn’t loading the content correctly. Must have been one of those warnings :) We agreed to give more priority to the Android version for a bit, given that it served 70% of their customers. The original app was built using Gradle 0.4. The current version of Gradle is 2.14. Essentially 80% of the Gradle file that I had used outdated APIs. Not to mention that the app had a big dependency on a third party library used to render PDFs in a magazine-like layout, which hadn’t been updated in three years and was full of unaddressed issues on Github. As much as I tried, I couldn’t get the Android app to compile. As I solved a compilation error I discovered ten more. I consulted with a bunch of Android developers and I consistently got an “it’s complicated” kind of answer.

The window to push both updates to the respective stores was closing. I had to make a tough call. I felt a bit like a doctor after performing a CPR without success. I persuaded the client to take both applications off of the stores, to avoid a blowback by potential and existing customers. He understood and we pulled the plug.

Now my friend wants to rebuild everything from scratch. While I agree I am trying to persuade him to move to something web based. Since the beginning I thought that Newsstand is not a very fit solution for publishers. We’ll see.

Regardless of the future, there’s a bunch of lessons learned in this adventure:

  • own and have full control on the URL that you use to publish your content. Always. There’s no need to add further details.
  • Native apps need to be refreshed periodically. Much like a car needs maintenance, so do apps. Developers don’t build apps that become quickly old/unusable on purpose. It’s platforms that change quickly. APIs become deprecated, new devices are released every day. An app without a plan to keep it up to date, doesn’t make sense anymore.
  • Android has grown a lot. As much as I don’t like being forced to upgrade I can’t deny that developer tools for Android have improved a lot.
  • Newsstand apps are not the best solution for small publishers. You don’t know who your customers are. You are not in direct touch with the people that read your content, you can’t offer ad-hoc discounts and moving to a different publishing system is quite complicated.
  • Not every rescue mission ends as you expect This is mostly a note to self :)