iOS simulator reverts to iOS7 when I'm trying

2019-07-23 12:40发布

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条回答
甜甜的少女心
2楼-- · 2019-07-23 12:41

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')

查看更多
登录 后发表回答