使用cordova inappbrowser和ios 11和iPhone x的状态栏问题

时间:2017-11-20 19:49:40

标签: cordova cordova-plugins ios11 inappbrowser iphone-x

我有一个cordova应用程序,我正在尝试更新以使用新的iPhone x,我在使用inappbrowser打开外部页面时遇到问题。我正在使用最新的xcode iPhone X模拟器。如果我将目标更改为" _self"它工作正常,但我没有我依赖的loadstop事件。

注意白页和红页之间的灰色空间。附带的视频更好地解释了https://www.dropbox.com/s/fnsjz71dssqcr56/bug.mov?dl=0enter image description here

封面图片和其他一切看起来都很棒。

这是我的cordova配置

    <preference name="Fullscreen" value="True" />
<preference name="phonegap-version" value="cli-7.0.1" />
<preference name="KeepRunning" value="True" />
<preference name="ShowTitle" value="False" />
<preference name="InAppBrowserStorageEnabled" value="True" />
<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="StatusBarBackgroundColor" value="#ffffff" />
<preference name="StatusBarStyle" value="black-translucent" />
<preference name="deployment-target" value="10" />
<preference name="AutoHideSplashScreen" value="true" />
<preference name="SplashScreenDelay" value="2000" />
<preference name="AllowBackForwardNavigationGestures" value="false" />
<feature name="CDVWKWebViewEngine">
    <param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
<feature name="StatusBar">
    <param name="ios-package" onload="true" value="CDVStatusBar" />
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
<plugin name="cordova-plugin-device" spec="1.1.7" />
<plugin name="phonegap-plugin-push" spec="2.0.0" />
<plugin name="cordova-plugin-splashscreen" spec="4.1.0" />
<plugin name="cordova-plugin-whitelist" spec="~1.3.3" />
<plugin name="cordova-plugin-touch-id" spec="~3.2.0" />
<plugin name="cordova-plugin-statusbar" spec="2.3.0" />
<plugin name="cordova-plugin-wkwebview-engine" spec="~1.1.4" />
<plugin name="cordova-plugin-inappbrowser-wkwebview" spec="^1.0.4" />
<engine name="ios" spec="~4.5.3" />

html

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="Content-Security-Policy">
    <meta name="viewport" content="viewport-fit=cover", initial-scale=1, width=device-width">
    <link href="content/css/font-awesome.css" rel="stylesheet" />
    <title>Wealth Access</title>   
</head>
<body>    
    <!-- Scripts -->
    <script src="cordova.js"></script>
    <script src="scripts/jquery/jquery-1.9.1.min.js"></script>
    <script src="scripts/index.js"></script>
    <script type="text/javascript" src="js/TouchID.js"></script>
</body>
</html>

javascript

&#13;
&#13;
function onDeviceReady() {
    	if (window.plugins.uniqueDeviceID) {
		    registerDevice();
		    setBotificationBadges();
	    }
	    loadSite();
    }


function loadSite() {

		if (ref) {
			return;
		}

        window.open = cordova.InAppBrowser.open;

        ref = cordova.InAppBrowser.open(/* my url */, '_blank', 'location=no,toolbar=no,zoom=no,disallowoverscroll=yes');


}
&#13;
&#13;
&#13;

这是正在加载的页面

&#13;
&#13;
<!DOCTYPE html>
<html lang="en">
<head>




    	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />

    <title>Wealth Access | Login</title>
    <link rel="icon" href="/Content/images/wealthaccess-icon.png" />
    <link rel="apple-touch-icon" href="/Content/images/wealthaccess-icon.png" />


    <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">

</head>

<body>

        
<div style="background-color: red">test page</div>
       
</body>
</html>
&#13;
&#13;
&#13;

0 个答案:

没有答案