带有 SDK 4.2 的 Xcode 总是启动 iPad 模拟器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4309165/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode with SDK 4.2 always starting iPad Simulator
提问by massimoksi
Why does Xcode, after updating to SDK 4.2, always run my application in iPad Simulator instead of iPhone??? If I select iPhone Simulator as active executable it doesn't store my preference and runs the iPad simulator after any new Build & Run.
为什么 Xcode 在更新到 SDK 4.2 后,总是在 iPad Simulator 而不是 iPhone 中运行我的应用程序???如果我选择 iPhone Simulator 作为活动的可执行文件,它不会存储我的偏好并在任何新的 Build & Run 之后运行 iPad 模拟器。
回答by Denshi
I had the same Problem. But suddenly after an Update it disappeared. Do you have the newest Version of all Software( or tried turning it off and on again)?
我有同样的问题。但是突然更新后它消失了。您是否拥有所有软件的最新版本(或尝试将其关闭再打开)?
If that doesn't works, I would suggest a reinstall. Solved many of my Problems...
如果这不起作用,我建议重新安装。解决了我的很多问题...
回答by Khoa Tran ANh
On XCode 3.2.6, you can go to "Project" menu -> "Set Active Executable" and select iPhone Simulator.
在 XCode 3.2.6 上,您可以转到“项目”菜单 ->“设置活动可执行文件”并选择 iPhone 模拟器。
回答by Cristian Bressan
Try to Build -> 'Clean All Targets'. Go into Release configuration, compile and then back to Debug. Now you can choose Iphone Simulator. For me it works.
尝试构建 -> '清理所有目标'。进入发布配置,编译然后返回调试。现在您可以选择 Iphone Simulator。对我来说它有效。
Hope this help.
希望这有帮助。
回答by Gilson Araujo
You can go to Product -> Destination -> iPhone 6.1 Simulator
.
你可以去Product -> Destination -> iPhone 6.1 Simulator
。
It took me a while to figure out the reason, because even though you select the Device iPhone
in Targets
, it still opens the iPad emulator if you don't change the destination of your product.
我花了一段时间才能找出原因,因为即使您选择的设备iPhone
中Targets
,它仍然会打开iPad的模拟器,如果你不改变你的产品的目的。
回答by Saurabh
do yo have two xcode (or iphone sdk) installation on your machine? if yes then completely uninstall the xcode using this command -
您的机器上是否安装了两个 xcode(或 iphone sdk)?如果是,则使用此命令完全卸载 xcode -
sudo /Developer/Library/uninstall-devtools –mode=all
from all the locations (replace Developer with installed directory name)
从所有位置(用已安装的目录名称替换 Developer)
and install the xcode 3.2.6 in developer directory
并在开发者目录中安装 xcode 3.2.6
回答by joshpaul
Check the Active Executable setting, as well as the Simulator's setting for "Device."
检查 Active Executable 设置,以及模拟器的“设备”设置。
回答by Melvin Lai
Check your .xcodeproj info. Navigate yourself in there and locate Simulator's Settings and choose 'iPhone' or 'iPad'
检查您的 .xcodeproj 信息。在那里导航并找到模拟器的设置并选择“iPhone”或“iPad”
Hope this helps
希望这可以帮助
回答by Maximilian G?tzfried
Removing all iPad devices from the device list in the organizer (Window Menu > Organizer) fixed it for me. But i know that's not a perfect solution. I hope Apple will fix this soon.
从管理器中的设备列表中删除所有 iPad 设备(窗口菜单 > 管理器)为我修复了它。但我知道这不是一个完美的解决方案。希望苹果尽快解决这个问题。