Run .app file in iOS 8 simulator

后端 未结 4 1613
半阙折子戏
半阙折子戏 2021-02-06 01:21

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

4条回答
  •  眼角桃花
    2021-02-06 02:05

    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 :)

提交回复
热议问题