ios设备中的Ionic ios应用程序速度很慢

时间:2018-01-13 19:20:32

标签: ios cordova typescript ionic3

目前我正在开展一个离子-3项目。我需要在ios设备中部署应用程序。但是应用程序在ios设备中非常慢。我厌倦了运行这个cmd "离子cordova build ios --prod --aot" 。但它导致一堆离子成分错误。 Screenshot of error when taking prod and aot app build

package.json

{
    "name": "Demo",
    "private": true,
    "scripts": {
        "build": "ionic-app-scripts build",
        "watch": "ionic-app-scripts watch",
        "serve:before": "watch",
        "emulate:before": "build",
        "deploy:before": "build",
        "build:before": "build",
        "run:before": "build",
        "test": "ng test --code-coverage",
        "e2e": "protractor",
        "postinstall": "webdriver-manager update"
    },
    "dependencies": {
        "@angular/animations": "^5.1.3",
        "@angular/common": "^5.1.3",
        "@angular/compiler": "^5.1.3",
        "@angular/compiler-cli": "^5.1.3",
        "@angular/core": "^5.1.3",
        "@angular/forms": "^5.1.3",
        "@angular/http": "^5.1.3",
        "@angular/platform-browser": "^5.1.3",
        "@angular/platform-browser-dynamic": "^5.1.3",
        "@angular/platform-server": "^5.1.3",
        "@ionic-native/android-permissions": "*",
        "@ionic-native/badge": "*",
        "@ionic-native/camera": "*",
        "@ionic-native/core": "*",
        "@ionic-native/file": "*",
        "@ionic-native/file-chooser": "*",
        "@ionic-native/file-path": "*",
        "@ionic-native/file-transfer": "*",
        "@ionic-native/in-app-browser": "*",
        "@ionic-native/keyboard": "*",
        "@ionic-native/media": "*",
        "@ionic-native/network": "*",
        "@ionic-native/push": "^4.5.2",
        "@ionic-native/splash-screen": "*",
        "@ionic-native/status-bar": "*",
        "@ionic-native/streaming-media": "*",
        "@ionic-native/transfer": "*",
        "@ionic-native/video-player": "*",
        "@ionic/cloud-angular": "^0.12.0",
        "@ionic/storage": "*",
        "@types/googlemaps": "*",
        "@types/lodash": "^4.14.92",
        "accounts-password-client-side": "*",
        "angular-svg-round-progressbar": "*",
        "angular2-moment": "*",
        "angular2-swing": "^0.14.0",
        "aws-sdk": "*",
        "body-parser": "*",
        "braintree": "^2.4.0",
        "braintree-web": "^3.27.0",
        "cordova-android": "^7.0.0",
        "cordova-ios": "*",
        "cordova-plugin-android-permissions": "*",
        "cordova-plugin-badge": "*",
        "cordova-plugin-camera": "^4.0.1",
        "cordova-plugin-compat": "*",
        "cordova-plugin-console": "*",
        "cordova-plugin-crosswalk-webview": "*",
        "cordova-plugin-device": "^2.0.1",
        "cordova-plugin-file": "^6.0.1",
        "cordova-plugin-file-transfer": "*",
        "cordova-plugin-filechooser": "*",
        "cordova-plugin-filepath": "*",
        "cordova-plugin-filepicker": "*",
        "cordova-plugin-geolocation": "^4.0.1",
        "cordova-plugin-inappbrowser": "^2.0.1",
        "cordova-plugin-media": "^5.0.1",
        "cordova-plugin-network-information": "^2.0.1",
        "cordova-plugin-splashscreen": "^5.0.1",
        "cordova-plugin-statusbar": "*",
        "cordova-plugin-whitelist": "*",
        "cors": "*",
        "express": "*",
        "intl": "*",
        "ionic-angular": "*",
        "ionic-image-loader": "git+https://github.com/patricktyndall/ionic-image-loader.git",
        "ionic-plugin-keyboard": "*",
        "ionic2-autosize": "*",
        "ionic2-rating": "*",
        "ionicons": "*",
        "jquery": "*",
        "jssha": "^2.3.1",
        "lodash": "*",
        "meteor-rxjs": "*",
        "meteor-tracker": "*",
        "moment": "*",
        "ng2-cordova-oauth": "0.0.8",
        "ng2-currency-mask": "*",
        "ng2-translate": "*",
        "ng2-validation-manager": "^5.0.0",
        "phonegap-plugin-push": "^2.1.2",
        "rxjs": "*",
        "stripe": "^5.4.0",
        "sw-toolbox": "*",
        "underscore": "*",
        "zone.js": "*"
    },
    "devDependencies": {
        "@angular/cli": "^1.6.3",
        "@ionic/app-scripts": "^3.1.7",
        "@types/core-js": "^0.9.44",
        "@types/google-maps": "^3.2.0",
        "@types/jssha": "0.0.29",
        "@types/meteor": "^1.4.13",
        "@types/node": "^9.3.0",
        "codelyzer": "^4.0.2",
        "ionic": "^3.19.0",
        "ts-node": "^4.1.0",
        "typescript": "^2.6.2"
    },
    "cordovaPlugins": [],
    "cordovaPlatforms": [
        "ios",
        {
            "platform": "ios",
            "version": "",
            "locator": "ios"
        }
    ],
    "cordova": {
        "plugins": {
            "cordova-plugin-compat": {},
            "cordova-plugin-console": {},
            "cordova-plugin-device": {},
            "cordova-plugin-file": {},
            "cordova-plugin-filechooser": {},
            "cordova-plugin-filepicker": {},
            "cordova-plugin-filepath": {},
            "cordova-plugin-geolocation": {},
            "cordova-plugin-media": {},
            "cordova-plugin-splashscreen": {},
            "cordova-plugin-whitelist": {},
            "ionic-plugin-keyboard": {},
            "phonegap-plugin-push": {
                "SENDER_ID": "318310044174"
            },
            "cordova-plugin-network-information": {},
            "cordova-plugin-camera": {},
            "cordova-plugin-statusbar": {},
            "cordova-plugin-file-transfer": {},
            "cordova-plugin-inappbrowser": {},
            "cordova-plugin-badge": {},
            "cordova-plugin-android-permissions": {},
            "cordova-plugin-crosswalk-webview": {
                "XWALK_VERSION": "23+",
                "XWALK_LITEVERSION": "xwalk_core_library_canary:17+",
                "XWALK_COMMANDLINE": "--disable-pull-to-refresh-effect",
                "XWALK_MODE": "embedded",
                "XWALK_MULTIPLEAPK": "true"
            }
        },
        "platforms": [
            "android"
        ]
    }
}

ionic info file

我们已经厌倦了所有现有的解决方案,但都没有奏效。 请帮助我们解决这个问题。 感谢

1 个答案:

答案 0 :(得分:0)

你还有这个问题吗?

如果是,请尝试卸载所有插件,清理项目,然后重新安装以前删除的所有插件。确保每个插件都安装了正确的依赖项(并且版本正确)。

就个人而言,我不知道是否有快速卸载/重新安装所有内容的方法,但这个 - 如果不是很多 - 实际上可能会加快您的应用程序运行速度并可能解决不一致问题,所以&# 39;绝对值得尝试(如果你还没有)。

希望有所帮助!