A few weeks ago, I decided to publish my first Flutter app on the Apple app store. The app had been published on Android for almost a year, but I had actually never tested it on an iPhone. Did Flutter live up to its cross platform claims?
Here are a few things to consider & watch out for, especially if you come from an Android background.
Do you have native Android code?
If you do, you will need to write the code again for iOS.
It is worth using plugins whenever you can. If a plugin lacks a feature but otherwise does the job, consider adding the feature to the plugin itself. You may be able to add it for one platform only, with the maintainer writing the code for the other platform. And even if you write the code for both platforms, it is the same time as writing it for your app but you are saving time for other developers (and if we all do this, we all save time 🙂 )
iPad has a different ratio than most Android tablets
When I tested the app on the iPad simulator to take screenshots, I noticed my layout didn’t quite work. iPads are a bit more square than most Android tablets, and my layouts, both in portrait and landscape modes, needed adjusting.
I didn’t write any iOS specific code, but I improved on my code logic for the UI. Specifically, instead of blindly filling the width, in portrait mode, or height, in landscape mode, with the crossword, I ensured enough space remained for the clues and the keyboard and reduced the crossword size accordingly.
You will find bugs when testing on a different device
This is the nature of testing. When trying an app on a different device, you will find (existing) bugs. Expect it.
In-app items available for purchase must be approved by Apple
Apple likes to control everything. Including in-app items available for purchase. It makes sense when you think about how Apple handles everything, but I didn’t know this. For my app, the in-app item is only to support the development of the app, so I removed it from the iOS app (thus writing one line of iOS specific code in Dart, using Platform.isIOS()).
Apple reviewed my app 11 hours after I submitted it. The review took about 1 hour, and the app was then approved and published.
All in all, it took me about 6 hours of work (including testing). I also needed another hour to prepare the app listing (creating icons of the required size, getting screenshots etc).
My app is small. Nonetheless, the ease of publishing my Flutter app, originally tested on Android only, to iOS, pleasantly surprised me. Flutter did live up to my expectations 🙂