gpt4 book ai didi

ios - 如何使用 Cordova 6 在 iOS 中关闭 "Requires Full Screen"选项?

转载 作者:行者123 更新时间:2023-11-29 00:29:42 25 4
gpt4 key购买 nike

当您使用 Cordova 6 创建应用程序,然后为 iOS 构建它时,如果您在 XCode 上打开项目属性,您将看到“需要全屏”选项已启用:

Requires full screen option is checked on iOS

这非常麻烦,因为它会阻止应用程序在 iOS 上“多任务处理”(您不能在打开应用程序的情况下拆分屏幕),如 [CB-9161] Support iPad multitasking in iOS 9 中所述。 :

Just want to mention, the fix (2) also needs to update the project's info plist file to indicate the app does not require the full screen as shown below

<key>UIRequiresFullScreen</key>
<false/>

在以前版本的 Cordova 中,您可以使用 FullScreen 控制此选项。偏爱。但这对 iOS 不再有影响。推荐的替代方法是使用 cordova-plugin-statusbar插入。但这并没有提供任何关闭全屏的选项,而且插件提供的其他选项也不允许多任务处理。

问题:如何关闭 Cordova 6 项目中的“需要全屏”选项(意思是:在为 iOS 构建后无需手动更新 XCode 项目)?

最佳答案

我会使用 Cordova Custom Config plugin

使用该插件,您几乎可以通过 config.xml

更改 plistmanifest 文件中的任何内容

所以在你的情况下,安装插件后,只需添加:

 <config-file parent="UIRequiresFullScreen" platform="ios" target="*-Info.plist">
<false/>
</config-file>

在你的config.xml

关于ios - 如何使用 Cordova 6 在 iOS 中关闭 "Requires Full Screen"选项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42201694/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com