简体   繁体   English

自从xcode5升级以来,iPhone模拟器无法正常工作

[英]iPhone simulator not working since xcode5 upgrade

Ever since i upgraded to xcode5, the iOS simulator only displays as an iPad even though the project is targeted for iPhone. 自从我升级到xcode5以来,即使该项目针对iPhone,iOS模拟器也只能显示为iPad。 The Run button also shows it's set to iPhone and I've tried switching between the different iPhone types in simulator. “运行”按钮还显示它已设置为iPhone,并且我尝试在模拟器中的不同iPhone类型之间进行切换。 But no matter what, my iPhone project opens as an iPad simulation. 但是无论如何,我的iPhone项目将以iPad模拟形式打开。 Anybody encounter this problem or know how to fix it? 任何人遇到此问题或知道如何解决?

I believe I've downloaded all the relevant libraries and tools from apple as well. 我相信我也已经从Apple下载了所有相关的库和工具。 I'll double check that now but I'm pretty sure I have all the accessory downloads up to date. 现在,我将再次检查,但我敢肯定,我的所有附件下载都是最新的。

Edit 编辑

I found the answer! 我找到了答案! Due to the changes with resolution of the retina display, the simulator was loading without the bezel. 由于视网膜显示器分辨率的变化,模拟器加载时没有边框。 Turns out the best way to solve this problem without a large screen or retina display is to deploy target in navigator=>General menu=> to iOS 6.1 and make sure iOS simulator=>Hardware=>Devices=>is set to iOS 6.1 as well. 事实证明,在没有大屏幕或视网膜显示屏的情况下解决此问题的最佳方法是在导航器=>常规菜单=>中将目标部署到iOS 6.1,并确保将iOS模拟器=>硬件=>设备=>设置为iOS 6.1,好。

Have you tried changing the simulator device? 您是否尝试过更换模拟器设备? Go to iOS Simulaotr.app -> hardware -> devices? 转到iOS Simulaotr.app->硬件->设备?

Download the extra components/simulators.. 下载额外的组件/模拟器。

在此处输入图片说明

在此处输入图片说明

If you find your iOS simulator is showing a large iPad like display since upgrading, it's because of the change in resolution for the retina display. 如果您发现自升级以来,iOS模拟器显示的是类似iPad的大型显示屏,那是因为视网膜显示屏的分辨率发生了变化。 In order to view the simulator as a regular looking iPhone follow these steps: 为了将模拟器作为普通的iPhone查看,请按照以下步骤操作:

  1. Deploy your project target for iOS 6.1 or earlier. 为iOS 6.1或更早版本部署项目目标。 In the navigator menu (far left), top folder (your project folder), click it. 在导航菜单(最左侧)的顶部文件夹(您的项目文件夹)中,单击它。 Make sure "General" is selected in the menu in the centre of the screen. 确保在屏幕中央的菜单中选择了“常规”。 In 'deployment Info' set it to iOS 6.1 and 'devices' to iPhone. 在“部署信息”中,将其设置为iOS 6.1,将“设备”设置为iPhone。

  2. Open iOS simulator: Click 'XCODE' in the top left of the screen => Open Developer Tools => iOS Simulator. 打开iOS模拟器:单击屏幕左上方的“ XCODE” =>打开开发人员工具=> iOS模拟器。

  3. In iOS simulator, go to => Hardware => Devices => select iPhone => iOS 6.1. 在iOS模拟器中,转到=>硬件=>设备=>选择iPhone => iOS 6.1。 Make sure not to select any of the hardware devices that are listed as retina displays, thats the major key. 确保不要选择列出为视网膜显示屏的任何硬件设备,这就是主键。

  4. Finally, make sure the deployment next to the run button is also showing 'iPhone iOS 6.1' AND NOT 'iPhone Retina...' 最后,确保“运行”按钮旁边的部署也显示“ iPhone iOS 6.1”,而不显示“ iPhone Retina ...”

And enjoy seeing the iPhone simulator properly again! 并再次欣赏iPhone模拟器! :) :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM