How to transfer your App to an iOS simulator on another machine (using .app file and xcrun)
Here is another quick tip, we had to search around quite a bit to get this to work. I hope this helps someone in the future.
There are quite a few ways to share apps with other people while you are developing the App. TestFlight is popular these days this is a huge improvement to the old method of sending .ipa files with provisioning files, etc.
If another person wants to run the App you are developing on their Xcode Simulator, you will have to hand over the project files (including code) and get the other person to go through a complex build process. All of this can be avoided by using xcrun and sending over the .app file.
Advantage of using xcrun and .app files:
- No build process on the person you are sending the app to
- You don’t have to handover any code files
Here are the steps to get this to work.
- On Xcode (On Xcode 8 for this example), build and run the app on the simulator.
- Then open “Activity Monitor” and find the name of the App you are running. Not Xcode, the actual App you are building. If you double click on the App Name, you should get a popup with the tab “Open Files and Ports”. Once you are on the tab you should get a long path for example /Users/webdigi/Library/Developer/CoreSimulator/Devices/A334134-2343-234A-234C-ASD1234EA3/Webdigi.app
- The above is the location to the .app file that you need. Copy the .app file from that folder and send it across to the person who wants to run the app on their Simulator.
- Now the other person should place the .app file to a location like Desktop
- They have to then open Xcode and open a Simulator
- On the command line type this command
> xcrun simctl install booted $LOCATION/FILENAME.app
replace $LOCATION with the path and the FILENAME should be the name
- The App should appear on the Simulator, just click on the App to Launch it.