iOS simulator reverts to iOS7 when I'm trying to run 6

自作多情 提交于 2020-01-04 06:15:58

问题


I'm having a weird situation in XCode 5 that I can't explain. My project's build target is iOS 6.1. I go into the simulator menu and change device to iPhone Retina (4-inch) / iOS 6.1. Should run in iOS6, yes?

When I hit run, the simulator immediately flips to iOS7 and runs the app in that instead. I've tried deleting the app from the sim, cleaning the build folder, resetting the simulator, restarting both...all the standard stuff. Still happens.

This is a project I had been working on in iOS6/Xcode 4. When I first opened it in XCode 5, I was prompted to "update the storyboard". I hit "yes" because it seemed like a good idea. Now I'm worried I can no longer support (or even test for) iOS6???

Appreciate any help.


回答1:


A few things to check:

  1. Like @vikingosegundo said, click on your project file and select 'Info' at the top. Your 'iOS Deployment Target' should be set to 6.0 or 6.1
  2. Stay in your project file and click on your main target. Select 'General' at the top. Your 'Deployment Target' should be set to 6.0 or 6.1 here as well.

Now, when you go to select which simulator to run your project on it should give you the option to run on iOS 6.0/6.1 or iOS 7.0

As an aside, you can work with a storyboard file in iOS 6 or 7 mode by selecting your storyboard file in the project navigator, clicking on the File Inspector and changing 'Builds for' and 'View as' to the appropriate iOS target.

(To find the file inspector: in XCode, once you've selected the storyboard file go to the right-side panel and click on the little document icon on the upper left side. When you hover over it, it should say 'Show the File Inspector')



来源:https://stackoverflow.com/questions/19122618/ios-simulator-reverts-to-ios7-when-im-trying-to-run-6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!