Xcode: Need to lock game to portrait only

2019-01-26 14:19发布

I just released a game to the app store and realized I completely forgot to lock it to portrait only. I need to submit an updated version that does just that. At this point, is it enough to just go to general > deployment info and uncheck everything but Portrait and then submit this as a new build? Or do I also need to do something to the code? Please note that it's a swift app.

4条回答
Rolldiameter
2楼-- · 2019-01-26 14:42

Simple.

Here's how you do it.

This works for both objective c and swift.

1. Open your project and go do your build settings.

enter image description here

Scroll down to the tab that says Deployment Info.

enter image description here

3. From there you can see a section called Device Orientation, This is where you need to be. Select an orientation like so.

enter image description here

4 Build the project and you are done!

enter image description here

查看更多
手持菜刀,她持情操
3楼-- · 2019-01-26 14:42

There are two different plist keys for iOS in info.plist for orientation,

  • Supported Device Orientations
  • Supported Device Orientations (iPad)

Both of these must have the appropriate key value pairs in the plist.

查看更多
劫难
4楼-- · 2019-01-26 14:43

Go to your info.plist file, Supported interface orientations, delete the keys you don't need.

查看更多
Root(大扎)
5楼-- · 2019-01-26 14:54

The basic answer is: yes, that should be sufficient.

However:

  • Some elements of your application might not adapt well. I know I had problems with the UIImagePickerController for a landscape-only app. So watch out for functionality that you yourself haven't written and how that interacts with the restriction.
  • If you have code related to orientation (pushing a certain mode etc) it's probably worth testing.
  • You should make the change and test it before submitting. I think there may be ways of holding the release with Apple until you've had the portrait only one approved.
查看更多
登录 后发表回答