ios iPad 多任务支持需要这些方向
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32559724/
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
iPad Multitasking support requires these orientations
提问by Cosmin
I'm trying to submit my universal iOS 9 app to Apple (built with Xcode 7 GM) but I receive this error message for the bundle in iTunes Connect, just when I select Submit for Review:
我正在尝试将我的通用 iOS 9 应用程序提交给 Apple(使用 Xcode 7 GM 构建),但我在 iTunes Connect 中收到此捆绑包的错误消息,就在我选择Submit for Review 时:
Invalid Bundle. iPad Multitasking support requires these orientations: 'UIInterfaceOrientationPortrait,UIInterfaceOrientationPortraitUpsideDown,UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationLandscapeRight'. Found 'UIInterfaceOrientationPortrait,UIInterfaceOrientationPortraitUpsideDown' in bundle 'com.bitscoffee.PhotoMarks.iOS'.
无效的捆绑。iPad 多任务支持需要这些方向:'UIInterfaceOrientationPortrait,UIInterfaceOrientationPortraitUpsideDown,UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationLandscapeRight'。在包“com.bitscoffee.PhotoMarks.iOS”中找到“UIInterfaceOrientationPortrait,UIInterfaceOrientationPortraitUpsideDown”。
My app has support for Portrait and PortraitUpsideDown orientations but not for the other two.
我的应用程序支持 Portrait 和 PortraitUpsideDown 方向,但不支持其他两个。
So is there a work around this imposed requirement, or all iOS 9 iPad apps have to have all four orientations?
那么是否有解决这个强制要求的工作,或者所有 iOS 9 iPad 应用程序都必须具有所有四个方向?
回答by Michael Wang
iPad Multitasking support requires all the orientations but your app does not, so you need to opt out of it, just add the UIRequiresFullScreen
key to your Xcode project's Info.plist
file and apply the Boolean value YES
.
iPad 多任务支持需要所有方向,但您的应用程序不需要,因此您需要选择退出它,只需将UIRequiresFullScreen
键添加到您的 Xcode 项目Info.plist
文件并应用布尔值YES
。
回答by BatteryAcid
回答by YKa
I am using Xamarin and there is no available option in the UI to specify "Requires full screen". I, therefore, had to follow @Michael Wang's answer with a slight modification. Here goes:
我正在使用 Xamarin,但 UI 中没有可用选项来指定“需要全屏”。因此,我不得不稍微修改一下@Michael Wang 的回答。开始:
Open the info.plist file in a text editor and add the lines:
在文本编辑器中打开 info.plist 文件并添加以下行:
<key>UIRequiresFullScreen</key>
<true/>
I tried setting the value to "YES" but it didn't work, which was kind of expected.
我尝试将该值设置为“YES”,但没有奏效,这在意料之中。
In case you are wondering, I placed the above lines below the UISupportedInterfaceOrientations section
如果您想知道,我将以上几行放在 UISupportedInterfaceOrientations 部分下方
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
Hope this helps someone. Credit to Michael.
希望这可以帮助某人。归功于迈克尔。
回答by Mitsuaki Ishimoto
as Michael said,
正如迈克尔所说,
Check the "Requires full screen" of the target of xcodeproj, if you don't need to support multitasking.
如果不需要支持多任务,勾选 xcodeproj 目标的“需要全屏”。
or Check the following device orientations
或检查以下设备方向
- Portrait
- Upside Down
- Landscape Left
- Landscape Right
- 肖像
- 上下翻转
- 风景左
- 风景右
In this case, we need to support launch storyboard.
在这种情况下,我们需要支持启动故事板。
回答by Dinesh Vaitage
Unchecked all Device orientation and checked only "Requires full screen". Its working properly
取消选中所有设备方向,只选中“需要全屏”。它的工作正常
回答by Khaled Zayed
Go to your project target in Xcode > General > Set "Requires full screen" (under Hide status bar) to true.
转到 Xcode > 常规 > 中的项目目标,将“需要全屏”(在隐藏状态栏下)设置为 true。
回答by Ayub
As Michael said check the "Requires Full Screen" checkbox under General > Targets
正如迈克尔所说,选中“常规”>“目标”下的“需要全屏”复选框
and also delete the 'CFBundleIcons-ipad' from the info.plst
并从 info.plst 中删除“CFBundleIcons-ipad”
This worked for me
这对我有用