Install App On iOS Simulator
This article highlights that how to install iOS app on Simulator that every app developer and tester needs to know
Have you ever found yourself in a situation where you or a colleague have the need to test an iOS App, but you do not have a physical device? The alternative is to use the iOS simulator on a Mac computer.
The big question is, how do you install the App to your simulator without building it using Xcode and allowing Xcode to install the App for you? Well, as it turns out, the solution is relatively easy. You simply need to manually install the App to your simulator. The steps required are detail below.
The App also needs to be built targeting the iOS simulator. The steps required to build an App targeting the iOS simulator are included at the end in the section entitled “Building the App for iOS Simulator”
- If you would like to see all the available xcrun commands for the simulator type: xcrun simctl
2. From Xcode, launch the iOS simulator:
3. Verify that the desired device is selected, in this case I am using the iPhone 11 Pro Max device as shown below.
4. If the App that you plan to install is already installed, you should delete it. Then proceed with installing the updated release.
5. List available simulators: xcrun simctl list
6. Identify the UID for the simulator that you want to use; note that the iPhone 11 Pro Max in the above listing and is listed as Booted since the simulator was launched in step 2.
7. The App file that was provided to you should be copied/placed on your desktop for easy access.
8. To install the App, type the following command in the terminal window:
xcrun simctl install F00973C9–7D5D-4CE6–924C-72D1050BC798 ~/Desktop/TestApp.app
9. After executing the install command, the App will be installed on the simulator and is ready to be executed.
10. Now the App is installed to the simulator and you are ready to test. Happy testing!
Building the App for iOS Simulator
If you want to generate a build and provide this App to someone to install to an iOS simulator using the above process, you should follow the steps detailed below.
- The App needs to be built for the iOS simulator by you or the developer. Using shortcut Command+B by selecting any simulator
2. Then the App file can be found in the DerivedData folder, within the desired App’s Products/Debug-iphonesimulator folder, as shown below.
3. The App file can be provided to the users that need to install it to the iOS simulator.