Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run .app file in iOS 8 simulator

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.

like image 381
user2990765 Avatar asked Dec 05 '14 06:12

user2990765


People also ask

How do I open an .app file on my iPhone?

drag the app file into iTunes and then select your device in the iTunes . After that you can find the apps tab on the iTunes. Then you will see the dragged app file . CLick on the install and sync your phone .

How do I open an .app file in Xcode?

Open your testing project in Xcode. Click build and then run the current scheme button. Once your build runs successfully, click Show in Finder to open the . app file.

Can you download apps on iOS simulator?

Install Apps on Simulators To install an app on a connected simulator, follow these steps. Go to Apps > Install Application. Find and open the app you want to install from your Mac. The app appears in the list of installed apps on the right side of the iOS Gateway window.

How do I run an app in Xcode simulator?

The basic way to open a list of simulators is to use Xcode -> Window -> Devices and Simulators. Here you can create and manage all available simulators. But you cannot run them directly. You need to build your application on the simulator, and then you can run it.


3 Answers

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.

  1. Go to xcode preferences.
  2. Choose the locations tab.
  3. In the 'Derived Data:' section click 'advanced', from the resulting screen choose 'legacy'.
  4. 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
  5. 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 :)

like image 158
Suresh Kumar Durairaj Avatar answered Oct 19 '22 23:10

Suresh Kumar Durairaj


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

like image 40
Jeremy Huddleston Sequoia Avatar answered Oct 19 '22 23:10

Jeremy Huddleston Sequoia


iOS Simulator also supports dragging and dropping for installing .app files

  1. Open Simulator
    • you can do it through XCode under XCode > Open Developer Tool > Simulator
    • to open it "without using xcode", see these answers.
  2. Find the .app file in Finder and drag it into your Simulator window
  3. Wait for the app to install and launch it
like image 23
mattliu Avatar answered Oct 19 '22 23:10

mattliu