添加插件可防止IOS cordova应用程序轮换

时间:2017-07-21 13:49:17

标签: javascript cordova cordova-plugins

我有IOS cordova应用程序。当我在我的应用程序中添加this Pugin时,除了应用程序不在Iphone和Ipad中旋转外,一切正常。奇怪的东西。我无法弄清楚原因。需要一些帮助。

我的环境信息:

Cordova CLI: 6.3.1
Node Version: v6.4.0
Android version: 3.7.0

以下是我的应用程序中安装的插件列表

at.modalog.cordova.plugin.html2pdf 1.0.0 "Html2pdf"
cordova-plugin-console 1.0.1-dev "Console"
de.appplant.cordova.plugin.printer 0.7.1-dev "Printer"
org.apache.cordova.file 1.3.3 "File"
org.apache.cordova.file-transfer 0.5.0 "File Transfer"
org.apache.cordova.inappbrowser 0.6.0 "InAppBrowser"

这是我的config.xml代码

 <?xml version='1.0' encoding='utf-8'?>
<widget id="com.Test.mobileapp2.0" version="3.5.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <preference name="AllowInlineMediaPlayback" value="false" />
    <preference name="AutoHideSplashScreen" value="true" />
    <preference name="BackupWebStorage" value="cloud" />
    <preference name="DisallowOverscroll" value="false" />
    <preference name="EnableViewportScale" value="false" />
    <preference name="FadeSplashScreen" value="true" />
    <preference name="FadeSplashScreenDuration" value=".25" />
    <preference name="KeyboardDisplayRequiresUserAction" value="true" />
    <preference name="MediaPlaybackRequiresUserAction" value="false" />
    <preference name="ShowSplashScreenSpinner" value="true" />
    <preference name="SuppressesIncrementalRendering" value="false" />
    <preference name="TopActivityIndicator" value="gray" />
    <preference name="GapBetweenPages" value="0" />
    <preference name="PageLength" value="0" />
    <preference name="PaginationBreakingMode" value="page" />
    <preference name="PaginationMode" value="unpaginated" />      

    <feature name="LocalStorage">
        <param name="ios-package" value="CDVLocalStorage" />
    </feature>
    <name>Test</name>
    <description>
        A sample Apache Cordova application that responds to the deviceready event.
    </description>
    <author email="dev@cordova.apache.org" href="http://cordova.io">
        Apache Cordova Team
    </author>
    <content src="mainpage.html" />
    <access origin="*" />
    <feature name="Printer">
        <param name="ios-package" value="APPPrinter" />
    </feature>
    <feature name="PhoneGapDropbox">
        <param name="ios-package" value="PhoneGapDropbox" />
    </feature>
    <feature name="Device">
        <param name="ios-package" value="CDVDevice" />
    </feature>
    <feature name="LaunchReview">
        <param name="ios-package" value="LaunchReview" />
    </feature>
    <feature name="File">
        <param name="ios-package" value="CDVFile" />
        <param name="onload" value="true" />
    </feature>
    <feature name="FileTransfer">
        <param name="ios-package" value="CDVFileTransfer" />
    </feature>
    <feature name="InAppBrowser">
        <param name="ios-package" value="CDVInAppBrowser" />
    </feature>
    <feature name="Console">
        <param name="ios-package" value="CDVLogger" />
    </feature>
    <feature name="PhoneGapDropbox">
        <param name="ios-package" value="PhoneGapDropbox" />
    </feature>
    <feature name="Html2pdf">
        <param name="ios-package" value="Html2pdf" />
    </feature>
</widget>

根配置文件:

    <?xml version='1.0' encoding='utf-8'?>
<widget id="com.Test.mobileapp2.0" version="3.5.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>Test</name>
    <description>
        A sample Apache Cordova application that responds to the deviceready event.
    </description>
    <author email="dev@cordova.apache.org" href="http://cordova.io">
        Apache Cordova Team
    </author>
    <content src="index.html" />
    <access origin="*" />
</widget>

0 个答案:

没有答案