如何在iPhone模拟器中设置默认设备? [英] How do you set the default device in the iPhone simulator?

查看:685
本文介绍了如何在iPhone模拟器中设置默认设备?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次我在iPhone上调试和在模拟器中运行之间切换Xcode都会重置模拟设备。我想将模拟器作为iPhone设备运行,但它不断变回iPad。有谁知道如何设置配置,以便模拟器默认为iPhone设备?

Every time I switch Xcode between debugging on my iPhone and running in the simulator it resets the simulated device. I want to run the simulator as an iPhone device, but it keeps changing back to iPad. Does anyone know how to set the configuration so that the simulator defaults to an iPhone device?

我可以在模拟器内将硬件切换到iPhone,但是当我回到Xcode并运行Build Debug,它在iPad内重新打开应用程序。我可以让它切换的唯一方法是使用Xcode中的Overview菜单,我看到的选项是iPad模拟器3.2和iPhone模拟器4.0

I can switch the hardware to iPhone inside the Simulator, but when I go back to Xcode and run a "Build Debug" it reopens the app inside an iPad. The only way I can get it to switch is by using the Overview menu in Xcode, the choices I see are iPad Simulator 3.2 and iPhone Simulator 4.0

当我在设备和模拟器然后它总是回到iPad。

And when I switch between device and simulator then it always goes back to iPad.

推荐答案

您的项目中设置的基本SDK是什么(常规选项卡) ?如果它不是4.0,那么我认为它可能会假设你正在编写一个iPad应用程序。

What is the Base SDK set to in your project (General tab)? If it's not 4.0 then I think it may assume you are writing an iPad app.

如果你将它设置为3.2想要支持iOS 3.x,你需要设置基本SDK到4.0,然后进入项目构建设置选项卡,并将操作系统部署目标更改为3.1(或者您想要支持的最早版本)。

If you set it to 3.2 wanting to support iOS 3.x, you need to set the base SDK to 4.0, then go into project build settings tab and change the OS Deployment target to 3.1 (or whatever the earliest version is you want to support).

这篇关于如何在iPhone模拟器中设置默认设备?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆