iOS模拟器——如何将默认模拟器设置为iPhone

时间:2022-08-26 21:30:39

I downloaded latest XCode with iOS 4.2 version. When I'm testing any app in simulator, its running in ipad simulator by default. How can I make my simulator default to iPhone.

我用ios4.2版本下载了最新的XCode。当我在模拟器中测试任何应用程序时,它默认在ipad模拟器中运行。如何使模拟器默认为iPhone ?

6 个解决方案

#1


10  

Solution#1

You can remove the iPad from the organizer. I haven't tried it, since I use both iPhone and iPad.

你可以从记事本上删除iPad。我还没试过,因为我同时用iPhone和iPad。


Solution#2

Create a keyboard shortcut to switch to to the iPhone simulator

创建一个键盘快捷键切换到iPhone模拟器

top menu > Project > Set Active Executable > Targetname - iPhone Simulator

*菜单>项目>设置主动可执行> Targetname - iPhone模拟器。

See these screenshots

看到这些截图

iOS模拟器——如何将默认模拟器设置为iPhoneiOS模拟器——如何将默认模拟器设置为iPhone

#2


10  

I hope this is what you're looking for, but in the top left of XCode, you should see a drop down bar that reads something like "Simulator - 4.2 | Debug | projName". If you click on that, you should see a section titled "Active Executable". There should be a small number of options to select the device and OS for the simulator. For instance, mine is currently selected to "projName - iPhone Simulator 4.2"

我希望这是您正在寻找的,但是在XCode的左上角,您应该看到一个下拉栏,其内容类似于“模拟器- 4.2 |调试|项目名”。如果您点击它,您应该会看到一个标题为“活动可执行文件”的部分。应该有少量的选项来为模拟器选择设备和操作系统。例如,mine当前被选择为“project name - iPhone Simulator 4.2”

Hope that helps.

希望有帮助。

#3


2  

  1. Right click your project's name inside Xcode, select "Get Info".
  2. 在Xcode中右键单击项目名称,选择“获取信息”。
  3. Under "Deployment" section, set "Targeted Device Family" to iPhone.
  4. 在“部署”部分,将“目标设备族”设置为iPhone。

#4


1  

Open Xcode -> Product Menu -> Destination -> Select desired destination. sticks when I restart.

打开Xcode ->产品菜单->目的地->选择所需目的地。当我重新启动。

#5


0  

The simplest solution to this is simply to change your active executable. Go to project -> set active executable -> iPhone whatever version you want

最简单的解决方案是更改您的活动可执行文件。进入项目->设置活动可执行文件-> iPhone任何你想要的版本

#6


-1  

I finally solved this problem myself.

我终于自己解决了这个问题。

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

首先,安装新版本的xCode,即xCode 4。

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

然后将项目方案设置为iphone模拟器,并在xCode中多次运行app。

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

重新安装xCode 3,问题就会消失!

#1


10  

Solution#1

You can remove the iPad from the organizer. I haven't tried it, since I use both iPhone and iPad.

你可以从记事本上删除iPad。我还没试过,因为我同时用iPhone和iPad。


Solution#2

Create a keyboard shortcut to switch to to the iPhone simulator

创建一个键盘快捷键切换到iPhone模拟器

top menu > Project > Set Active Executable > Targetname - iPhone Simulator

*菜单>项目>设置主动可执行> Targetname - iPhone模拟器。

See these screenshots

看到这些截图

iOS模拟器——如何将默认模拟器设置为iPhoneiOS模拟器——如何将默认模拟器设置为iPhone

#2


10  

I hope this is what you're looking for, but in the top left of XCode, you should see a drop down bar that reads something like "Simulator - 4.2 | Debug | projName". If you click on that, you should see a section titled "Active Executable". There should be a small number of options to select the device and OS for the simulator. For instance, mine is currently selected to "projName - iPhone Simulator 4.2"

我希望这是您正在寻找的,但是在XCode的左上角,您应该看到一个下拉栏,其内容类似于“模拟器- 4.2 |调试|项目名”。如果您点击它,您应该会看到一个标题为“活动可执行文件”的部分。应该有少量的选项来为模拟器选择设备和操作系统。例如,mine当前被选择为“project name - iPhone Simulator 4.2”

Hope that helps.

希望有帮助。

#3


2  

  1. Right click your project's name inside Xcode, select "Get Info".
  2. 在Xcode中右键单击项目名称,选择“获取信息”。
  3. Under "Deployment" section, set "Targeted Device Family" to iPhone.
  4. 在“部署”部分,将“目标设备族”设置为iPhone。

#4


1  

Open Xcode -> Product Menu -> Destination -> Select desired destination. sticks when I restart.

打开Xcode ->产品菜单->目的地->选择所需目的地。当我重新启动。

#5


0  

The simplest solution to this is simply to change your active executable. Go to project -> set active executable -> iPhone whatever version you want

最简单的解决方案是更改您的活动可执行文件。进入项目->设置活动可执行文件-> iPhone任何你想要的版本

#6


-1  

I finally solved this problem myself.

我终于自己解决了这个问题。

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

首先,安装新版本的xCode,即xCode 4。

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

然后将项目方案设置为iphone模拟器,并在xCode中多次运行app。

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

重新安装xCode 3,问题就会消失!