iPad 多任务支持需要这些方向

问题描述 投票:0回答:9

我正在尝试将我的通用 iOS 9 应用程序提交给 Apple(使用 Xcode 7 GM 构建),但当我选择 提交审核时,我在 iTunes Connect 中收到此捆绑包的错误消息:

无效捆绑包。 iPad 多任务支持需要以下方向:“UIInterfaceOrientationPortrait、UIInterfaceOrientationPortraitUpsideDown、UIInterfaceOrientationLandscapeLeft、UIInterfaceOrientationLandscapeRight”。在捆绑包“com.bitscoffee.PhotoMarks.iOS”中找到“UIInterfaceOrientationPortrait、UIInterfaceOrientationPortraitUpsideDown”。

我的应用程序支持 Portrait 和 PortraitUpsideDown 方向,但不支持其他两个方向。

那么对于这一强加的要求是否有解决方法,或者所有 iOS 9 iPad 应用程序都必须具有全部四个方向?

ios objective-c iphone xcode ipad
9个回答
893
投票

iPad 多任务支持需要所有方向,但您的应用程序不需要,因此您需要选择退出它,只需将

UIRequiresFullScreen
键添加到 Xcode 项目的
Info.plist
文件并应用布尔值
YES


658
投票

在 Xcode 中,选中常规 > 目标下的“需要全屏”复选框,如下所示。

enter image description here


84
投票

我正在使用 Xamarin,UI 中没有可用选项来指定“需要全屏”。因此,我必须遵循@Michael Wang 的回答并稍加修改。这里是:

在文本编辑器中打开 info.plist 文件并添加以下行:

<key>UIRequiresFullScreen</key>
<true/>

我尝试将值设置为“YES”,但它不起作用,这是预期的。

如果您想知道,我将以上几行放在 UISupportedInterfaceOrientations 部分下方

<key>UISupportedInterfaceOrientations~ipad</key>
<array>
    <string>UIInterfaceOrientationPortrait</string>
    <string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>

希望这对某人有帮助。感谢迈克尔。


44
投票

正如迈克尔所说,

如果不需要支持多任务,请勾选xcodeproj目标的“需要全屏”。

或检查以下设备方向

  • 肖像
  • 颠倒
  • 风景左
  • 横向右

在这种情况下,我们需要支持启动storyboard。


11
投票

取消选中所有设备方向并仅选中“需要全屏”。工作正常


7
投票

转到 Xcode > 常规 > 将“需要全屏”(在隐藏状态栏下)设置为 true 中的项目目标。


4
投票

正如迈克尔所说,选中“常规”>“目标”下的“需要全屏”复选框

并从 info.plst 中删除“CFBundleIcons-ipad”

这对我有用


0
投票

你可以指定所有这些

info.plist

<plist version="1.0">
<dict>
 ...

 <key>UISupportedInterfaceOrientations</key>
 <array>
 <string>UIInterfaceOrientationLandscapeLeft</string>
 <string>UIInterfaceOrientationPortrait</string>
 <string>UIInterfaceOrientationPortraitUpsideDown</string>
 </array>
 <key>UISupportedInterfaceOrientations~ipad</key>
 <array>
 <string>UIInterfaceOrientationLandscapeLeft</string>
 <string>UIInterfaceOrientationLandscapeRight</string>
 <string>UIInterfaceOrientationPortrait</string>
 <string>UIInterfaceOrientationPortraitUpsideDown</string>
 </array>

 ...

或者只喜欢其他人

<key>UIRequiresFullScreen</key>
<true/>

-1
投票

您需要在xcode中info.plist文件支持的界面方向字段中添加Portrait(顶部主页按钮)

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.