How to change the default Xcode iphone simulator when testing

前端 未结 14 1715
耶瑟儿~
耶瑟儿~ 2020-12-18 18:30

I don\'t know why but now the default iphone simulator launched when I build the project is \"ipad\", but I want it to use iphone 3g instead.

Any way to set this pre

相关标签:
14条回答
  • 2020-12-18 19:13

    This worked for me. When I already have the app open on an iphone in "Simulator". I click File -> Open Simulator -> iOS 14.0 -> iPhone 8 (or iPad (7th generation))

    0 讨论(0)
  • 2020-12-18 19:14

    I finally solved this problem myself.

    First, install new version of xCode, which is xCode 4.

    Then set project scheme to iphone simulator and run app in xCode several times.

    And re-install xCode 3 and the problem will be gone away!

    0 讨论(0)
  • 2020-12-18 19:18

    Try Project > Active Executable , and select the one you want the most.

    0 讨论(0)
  • 2020-12-18 19:20

    In the chance that anyone reading this is building their app in react-native, the solution is the --simulator option.

    For example:

    $ react-native run-ios --simulator "iPhone X"
    
    0 讨论(0)
  • 2020-12-18 19:21

    In Xcode,

    Click Product -> Destination -> iOS Simulator -> Choose Device to run.

    Then build and execute Xcode project.

    It works..

    0 讨论(0)
  • 2020-12-18 19:22

    2020 Fix:

    1. With the simulator running go to File > Open Device > iOS > iPhone 11 and select the device. It will open up the device as another window but there won't be the Expo app.
    2. Close the device window you don't want (cmd + w), then close the window with the device you would like.
    3. Restart Expo (in the command window with it running do ctrl + c then re-run Expo with expo start
    4. You will now be able to "Run on iOS Simulator" and it will open up with the selected device type.
    0 讨论(0)
提交回复
热议问题