【问题标题】:iOS 13+ ionic 4 iOS app stuck at splash screeniOS 13+ ionic 4 iOS 应用卡在启动画面
【发布时间】:2020-03-03 11:00:09
【问题描述】:

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 中添加了一些与闪屏相关的配置行,这也不是工作。

应该有什么解决办法?

【问题讨论】:

  • 我目前正在研究这个......所以一旦我得到答案,我会告诉你答案。我肯定知道的一件事...如果您删除“”,它将重新开始工作。这与 UIWebView 移除有关。
  • 即使在删除它之后对我也不起作用。

标签: cordova ionic4 ios13


【解决方案1】:

我在 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. 将此代码添加到“platform name="ios"> 标记内的 config.xml 文件中
<preference name="WKWebViewOnly" value="true" />

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

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

它将解决闪屏卡住问题和苹果警告问题。

【讨论】:

  • 无法安装“cordova-plugin-inappbrowser”:“^4.0.0”。您在安装插件时遇到过任何问题吗?
  • @JobinsJohn 我没有遇到这样的问题。请您在安装此插件时分享错误?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2016-09-17
  • 1970-01-01
  • 1970-01-01
  • 2018-04-12
  • 1970-01-01
  • 2020-12-06
  • 2012-11-07
相关资源
最近更新 更多