Sharing iOS Test Apps

they don’t want you to

Currently I’m using Flutter for iOS spec development, targeting mainly Android with Material Design components. Flutter’s native cross-platform capabilities (with hot reload) make this remarkably easy for my local development. I can spin up an Android or iOS emulator on my Macbook and start iterating right away, while going back and forth with ease between the two.

However, I recently found myself in a scenario where I wanted to share my app bundles with another developer so they could test/demo on their own Macbook. For the Android bundle, this was quite simple, with just a few cli commands to build the app package, and my colleague only needed to drag+drop the package into their emulator to immediately start it up.

For iOS, though, it was much more complex.

apple = $$$

Someone suggested that I use TestFlight to distribute the test app. Sure, sounds simple enough, I’d just need to register and then upload my build, then my colleague would be able to download it and start testing. I clicked through to Apple’s website and started the registration process.

In very small print above my entered info, I saw the roadblock – a 99$ annual premium to be an official iOS Developer.

I can understand that someone who was employed by an iOS shop or running their own business would be able to eat that cost and write it down later. But for an individual such as myself, who is just trying to spec out the app before ever even considering distribution on the App Store, that is prohibitive.

Thankfully, there is a way to share your app with other Macbook users so they can run an iOS Simulator and check out your work.

ios-sim to the rescue

Surprisingly, there was little to no information on how to achieve this without paying for TestFlight access. I actually found this hint on the Facebook docs for VR test development.

There is a Node.js package on NPM that you can use to quickly and easily run a bundled iOS app on your local Simulator. It’s called ios-sim .

% npm install -g ios-sim

That will install it globally on your Macbook, meaning you can run it from any terminal session.

Assuming you have Xcode installed, which bundles the Simulator, we can now look at which device types we have installed locally, e.g. iPad, iPhone, etc. The output will look something like this:

% ios-sim showdevicetypes                                                                                                                                                             
iPhone-12-mini, 15.2
iPhone-12, 15.2
iPhone-12-Pro, 15.2
iPhone-12-Pro-Max, 15.2
iPhone-13-Pro, 15.2
iPhone-13-Pro-Max, 15.2
iPhone-13-mini, 15.2
iPhone-13, 15.2

Great, so since the bundled test app was targeting iPhone 13 on iOS 15.2, we can see that we already have it installed and take it for a test run.

% ios-sim launch /Users/myuser/path_to_dir/MyApp.app --devicetypeid iPhone-13

And that’s it! The Simulator should launch automatically and start installing and running the App file. I was honestly shocked how little information there was out there regarding this workflow. In fact, I suspect you’d have to look at the ios-sim source code to understand how to achieve this without that package. I assume it’s using Xcode commands to do it.

I hope this helps out any aspiring iOS developers who don’t want to pay $$$!