簡體   English   中英

ionic 4 iOS 應用程序卡在 iOS 13+ 上的啟動畫面

[英]ionic 4 iOS app stuck at splash screen on iOS 13+

配置文件

<xml version='1.0' encoding='utf-8'?>
<widget id="com.leo9.gameofplan" version="0.0.4" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>Game Of Plan</name>
    <description>The Game of Plan app is designed to: Capture your Thoughts and Feelings and convert it into Tangible Action Plan.</description>
    <author email="info@leo9studio.com" href="https://leo9studio.com/">Le9studio Team</author>
    <content src="index.html" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <preference name="ScrollEnabled" value="false" />
    <preference name="WKWebViewOnly" value="true" />
    <preference name="CordovaWebViewEngine" value="CDVUIWebViewEngine" />
    <preference name="android-minSdkVersion" value="19" />
    <preference name="android-targetSdkVersion" value="28" />
    <preference name="BackupWebStorage" value="none" />
    <preference name="DisallowOverscroll" value="true" />
    <preference name="AutoHideSplashScreen" value="false" />
    <preference name="SplashScreenDelay" value="10000" />
    <preference name="SplashScreen" value="screen" />
    <preference name="SplashScreenDelay" value="30000" />
    <preference name="OverrideUserAgent" value="Mozilla/5.0 Google" />
    <allow-navigation href="*" />
    <plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
    <plugin name="cordova-plugin-statusbar" spec="^2.4.2" />
    <plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
    <plugin name="cordova-plugin-ionic-webview" spec="^4.0.0">
        <variable name="ANDROID_SUPPORT_ANNOTATIONS_VERSION" value="27.+" />
    </plugin>
    <plugin name="cordova-plugin-network-information" spec="~2.0.1" />
    <plugin name="cordova-plugin-secure-storage" spec="^3.0.2" />
    <plugin name="cordova-plugin-screen-orientation" spec="^3.0.2" />
</widget>

 <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Game of Plan</title> <base href="." /> <meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <meta name="format-detection" content="telephone=no" /> <meta http-equiv="Content-Security-Policy" content="font-src 'self' data:; img-src * data:; default-src gap://ready file://* *; script-src 'self' 'unsafe-inline' 'unsafe-eval' * ; style-src 'self' 'unsafe-inline' *"> <meta name="msapplication-tap-highlight" content="no" /> <link rel="icon" type="image/png" href="assets/icon/favicon.png" /> <meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-status-bar-style" content="black" /> </head> <body> <app-root></app-root> </body> </html>

在這里我附上我的 config.xml 和 index.html 文件。

我的應用程序卡在 ios13+ 設備的啟動畫面上。 出於這個原因,該應用程序被拒絕發布到應用程序商店。 我嘗試了很多方法來解決這個錯誤。 降級無法工作的閃屏插件,還在 config.xml 中添加了一些與閃屏相關的配置行,但也無法工作。

解決方案應該是什么?

Yu 應該在您的<platform name="ios">標簽中添加以下代碼:

<feature name="CDVWKWebViewEngine">
   <param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />

取自這里: https : //cordova.apache.org/howto/2020/03/18/wkwebviewonly.html

我從未使用過 Cordova 啟動畫面,但查看您的config.xml內容,我看到您有重復的SplashScreenDelay首選項,一個值為30000 ,相當於 30 秒,另一個值為10000 ,這可能是原因問題的背后。
我將刪除重復的首選項並將時間值設置為 5000(5 秒),我還將添加AutoHideSplashScreen首選項並將其設置為false ,然后在deviceready事件處理程序中添加計時器:

function onDeviceReady() {
    setTimeout(function () {
        navigator.splashscreen.hide();
    }, 5000);
}


它應該在這里解釋。 也檢查這個
我希望這有幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM