I have a .app file shared from a developer which i would like to run in iOS 8 simulator. I have seen similar questions which has solutions for older versions of iOS which is no longer working for iOS 8. Can someone point out what needs to be done to run the .app file in an iOS 8 simulator without using xcode.
-
1If your app just contains ARM code, it won't run. You need to have a version that contains x86 code. – Cyrille Dec 05 '14 at 10:22
5 Answers
Boot the simulator you want to install it to in the iOS Simulator and then do the following:
xcrun simctl install booted /path/to/Your.app
xcrun simctl launch booted com.yourcompany.yourapp
The "booted" token was not supported on older versions of simctl in Xcode 6.0. If you get an error, please use the full device UDID instead of "booted". You can determine the UDID by running xcrun simctl list

- 22,938
- 5
- 78
- 86
-
It works fine till the installation part. But when I run the application using xcrun simctl launch booted com.yourcompany.yourapp, it is crashing as soon as the app is launched. – user2990765 Dec 31 '14 at 09:08
-
You need to provide more information than that if you want help fixing your crash. – Jeremy Huddleston Sequoia Dec 31 '14 at 10:22
-
Hey Jeremy, after executing the first command that you have mentioned above, the app got installed in the simulator. Then I executed the second command. Then the app opened and then immediately shut down. i.e, the app crashed. However the issue seemed to be from the developer who has provided the build. But I am going to accept this answer as it answers my original questions. Meanwile I will write a more complete answer with the steps. – user2990765 Jan 27 '15 at 07:40
-
1I got a error saying `An error was encountered processing the command (code=4): The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 4.) ` – Cplusplusplus Nov 17 '15 at 22:51
-
14 is what you get back when you're requesting install of an app that doesn't exist. – Jeremy Huddleston Sequoia Nov 17 '15 at 23:08
If the application crashes after installing in the simulator using the command,
xcrun simctl install booted /path/to/Your.app
It's probably because the architecture issues, since we used the device build instead of simulator build.
The basic architecture difference between the iphone simulator and iphone device is
iPhone simulator uses the architecture i386 or x86_x64
whereas,
iPhone device uses the architecture arm64 or armv7 or armv7s
We can find each device architectures in this link. So to over come this problem we need to get the simulator build by changing the xcode build location settings.
SOLUTION :
To change the build location settings, Open your xcode and follow the below steps.
- Go to xcode preferences.
- Choose the locations tab.
- In the 'Derived Data:' section click 'advanced', from the resulting screen choose 'legacy'.
- Now build the application, after successful build go to 'Your-App-Folder/build/Debug-iphonesimulator' in finder, and copy the build available on the same folder with the extension .app
Copy that and run the above command answered by @jeremy.
xcrun simctl install booted /path/to/Your.app
After running this command, note that your simulator is installed with the build you specified. There you go, run the application in simulator by clicking the corresponding app and use it.
I deliberately write this solution to help the needy, those who are clueless about the architecture issues specified above.
Happy Coding :)

- 1
- 1

- 2,104
- 16
- 24
iOS Simulator also supports dragging and dropping for installing .app files
- Open Simulator
- you can do it through XCode under
XCode > Open Developer Tool > Simulator
- to open it "without using xcode", see these answers.
- you can do it through XCode under
- Find the .app file in Finder and drag it into your Simulator window
- Wait for the app to install and launch it

- 823
- 12
- 28
For developers looking to provide a simulator build to theirs testers, these are the steps that I followed to create and test a build -
Add i386 in valid architectures section of build settings.
Open terminal and navigate to your project folder. Then execute the command -
xcodebuild -arch i386 -sdk iphonesimulator8.1
(This will build the application)
To install the application on simulator, run the command mentioned in the above answer i.e -
xcrun simctl install booted /path/to/Your.app
Now you should be able to run the app by clicking on the installed application in the simulator.

- 387
- 2
- 3
- 16
-
You don't need to add i386 as a valid architecture to the build settings. Xcode will translate a 32bit arm value in there to i386 when you build for the sim. – Jeremy Huddleston Sequoia Jan 28 '15 at 00:52
-
Actually When I tried to build using the command "xcodebuild -arch i386 -sdk iphonesimulator8.1", I was getting a build failure with error "No architectures to compile for (ARCHS=i386, VALID_ARCHS=armv7 armv7s arm64)". Solved after I added i386 as a valid architecture. – user2990765 Feb 06 '15 at 04:47
-
Alternatively, you could just delete your VALID_ARCHS override, and it should just work. – Jeremy Huddleston Sequoia Feb 06 '15 at 06:14
I have followed all the above commands and stuff but none worked. All I was doing is creating .app through archiving the app from Product->Archive and then converting that generated .ipa to .app by changing the extension to .zip. But the app is crashing as and when it is being launched. For those facing the same issue, go to
DerivedData/projectname/Build/Products/Debug-iphonesimulator/
folder. There you can find the .app file with app name. You need to use this .app file by dragging and dropping onto the simulator. Product->Archive->.app doesn't work.

- 360
- 3
- 10