【问题标题】:Identify source cause for Cordova no launching in iOs 9 but works fine in iOs 10确定 Cordova 无法在 iOs 9 中启动但在 iOs 10 中正常工作的原因
【发布时间】:2017-01-23 18:44:33
【问题描述】:

正如标题所说,我遇到了 Cordova 在模拟器和设备上的 iOs 10 中正常工作的问题,但没有在 iOs9 上启动(没有设备准备好触发,根本没有脚本启动。 它只显示 index.html 静态内容文件。 Xcode 在控制台中没有告诉我任何信息。

我使用的是最新版本的 Cordova,而且所有插件都是最新的。 我试图一个一个地停用每个插件,但没有任何反应,我对问题的原因一无所知。

这是我的配置文件,以防任何人有我在这里错过的直接根本原因:

欢迎任何其他关于调试方法的建议!

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.my-domain.myapp" version="2.0.3" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>revolution</name>
    <description> My Description </description>
    <author email="my_email" href="my_website"> Author detail </author>
    <content src="index.html" />
    <access origin="*" />
    <access origin="cdvfile://*" />
    <allow-navigation href="http://*/*" />
    <allow-navigation href="https://*/*" />
    <allow-navigation href="data:*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <platform name="android">
        <allow-intent href="market:*" />
    </platform>
    <preference name="StatusBarOverlaysWebView" value="false" />
    <preference name="ShowSplashScreenSpinner" value="false" />
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
        <icon height="29" src="res/ios/icon-29.png" width="29" />
        <icon height="40" src="res/ios/icon-40.png" width="40" />
        <icon height="80" src="res/ios/icon-40-2x.png" width="80" />
        <icon height="50" src="res/ios/icon-50.png" width="50" />
        <icon height="57" src="res/ios/icon-57.png" width="57" />
        <icon height="58" src="res/ios/icon-58.png" width="58" />
        <icon height="114" src="res/ios/icon-57@2x-114.png" width="114" />
        <icon height="116" src="res/ios/icon-58@2x-116.png" width="116" />
        <icon height="120" src="res/ios/icon-60@2x-120.png" width="120" />
        <icon height="180" src="res/ios/icon-76@3x-180.png" width="180" />
        <icon height="60" src="res/ios/icon-60.png" width="60" />
        <icon height="120" src="res/ios/icon-60-2x.png" width="120" />
        <icon height="72" src="res/ios/icon-72.png" width="72" />
        <icon height="144" src="res/ios/icon-72@2x-144.png" width="144" />
        <icon height="76" src="res/ios/icon-76.png" width="76" />
        <icon height="87" src="res/ios/icon-29@3x-87.png" width="87" />
        <icon height="152" src="res/ios/icon-76@2x-152.png" width="152" />
        <icon height="100" src="res/ios/icon-50@2x-100.png" width="100" />
        <splash height="480" src="res/screen/ios/launch_iPh4x3-480.png" width="320" />
        <splash height="960" src="res/screen/ios/launch_iPh4x3@2x-960.png" width="640" />
        <splash height="1136" src="res/screen/ios/launch_iPh5-1136.png" width="640" />
        <splash height="1334" src="res/screen/ios/launch_iPh6-1334.png" width="750" />
        <splash height="2208" src="res/screen/ios/launch_iPh6p-2208.png" width="1242" />
    </platform>
    <engine name="browser" spec="~4.1.0" />
    <engine name="ios" spec="~4.3.1" />
    <plugin name="cordova-plugin-camera" spec="~2.3.1">
        <variable name="CAMERA_USAGE_DESCRIPTION" value=" " />
        <variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value=" " />
    </plugin>
    <plugin name="cordova-plugin-file-transfer" spec="~1.6.1" />
    <plugin name="cordova-plugin-file" spec="~4.3.1" />
    <plugin name="cordova-plugin-google-analytics" spec="~1.7.4" />
    <plugin name="cordova-plugin-whitelist" spec="~1.3.1" />
    <plugin name="cordova-plugin-badge" spec="~0.7.4" />
    <plugin name="cordova-plugin-device" spec="~1.1.3" />
    <plugin name="cordova-plugin-network-information" spec="~1.3.0" />
    <plugin name="cordova-plugin-statusbar" spec="~2.2.0" />
    <plugin name="cordova-plugin-splashscreen" spec="~4.0.0" />
    <plugin name="phonegap-plugin-barcodescanner" spec="~6.0.3" />
    <plugin name="cordova-plugin-console" spec="~1.0.4" />
    <plugin name="cordova-plugin-dialogs" spec="~1.3.0" />
    <plugin name="cordova-sqlite-storage" spec="~1.5.0" />
    <plugin name="cordova-plugin-googlemaps" spec="~1.4.0">
        <variable name="API_KEY_FOR_IOS" value="my_google_key" />
        <variable name="NSLOCATIONWHENINUSEUSAGEDESCRIPTION" value="Show your location on the map" />
        <variable name="NSLOCATIONALWAYSUSAGEDESCRIPTION" value="Trace your location on the map" />
    </plugin>
</widget>

【问题讨论】:

  • 您找到问题的原因了吗?

标签: ios cordova


【解决方案1】:

尝试检查您的 iOS 崩溃日志:

~/Library/Logs/CrashReporter/MobileDevice/&lt;DEVICE_NAME&gt;

Xcode > 窗口 > 管理器 > 设备选项卡 > 设备日志

管理器窗口的快捷方式是 cmd-shift-2。

【讨论】:

    猜你喜欢
    • 2015-12-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-09-17
    • 2015-10-01
    • 2018-08-01
    • 2018-08-08
    相关资源
    最近更新 更多