iOS 13+ Ionic 4 iOS应用停留在启动画面

时间:2020-03-03 11:00:09

标签: cordova ionic4 ios13

config.xml

<?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文件。

提交的应用程序被App Store拒绝,因为该应用程序滞留在ios13 +设备的启动屏幕中。我尝试降级了启动屏幕插件,但它不起作用,并且还在config.xml中添加了一些与启动屏幕相关的配置行,但该行也没有工作。

应该怎么解决?

1 个答案:

答案 0 :(得分:0)

我在Cordova应用程序上遇到了同样的问题。我可以使用以下步骤进行修复:

与其他插件一起安装这些插件:

  1. “ cordova-plugin-inappbrowser”:“ ^ 4.0.0”
  2. “ cordova-plugin-wkwebview-engine”:“ ^ 1.2.1”
  3. cordova插件添加https://github.com/TheMattRay/cordova-plugin-wkwebviewxhrfix
  4. 删除iOS平台
  5. 添加iOS平台5.1.1
  6. 将此代码添加到config.xml文件中的“平台名称=“ ios”>标记
  7. 中”
<preference name="WKWebViewOnly" value="true" />

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

<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />

它将同时解决启动屏幕卡死问题和苹果警告问题。