我在为ios编译离子3应用程序时遇到错误,无法安装'onesignal-cordova-plugin':undefined

问题描述 投票:1回答:1

我想用离子3为“ios”构建我的应用程序,但是我收到以下错误:

ordova/apple_ios_version), continuing anyways.
    "framework" tag with type "podspec" is deprecated and will be removed. Please use the "podspec" tag.
    Failed to install 'onesignal-cordova-plugin': undefined
    CordovaError: Promise rejected with non-error: 'Version should contain only numbers and dots'
        at cli.catch.err (/usr/local/lib/node_modules/cordova/bin/cordova:29:15)
        at <anonymous>
        at process._tickCallback (internal/process/next_tick.js:188:7)
    [ERROR] An error occurred while running subprocess cordova.

            cordova platform add ios --save exited with exit code 1.

我的package.json:

"dependencies": {
    "@angular/animations": "5.2.11",
    "@angular/common": "5.2.11",
    "@angular/compiler": "5.2.11",
    "@angular/compiler-cli": "5.2.11",
    "@angular/core": "5.2.11",
    "@angular/forms": "5.2.11",
    "@angular/http": "5.2.11",
    "@angular/platform-browser": "^5.2.11",
    "@angular/platform-browser-dynamic": "5.2.11",
    "@ionic-native/barcode-scanner": "^4.20.0",
    "@ionic-native/core": "^5.1.0",
    "@ionic-native/in-app-browser": "^5.4.0",
    "@ionic-native/onesignal": "^4.20.0",
    "@ionic-native/photo-viewer": "^5.4.0",
    "@ionic-native/splash-screen": "~4.18.0",
    "@ionic-native/status-bar": "~4.18.0",
    "@ionic/storage": "2.2.0",
    "brmasker-ionic-3": "^1.6.3",
    "com-sarriaroman-photoviewer": "1.2.1",
    "cordova-android": "7.1.4",
    "cordova-ios": "5.0.0",
    "cordova-plugin-device": "^2.0.2",
    "cordova-plugin-inappbrowser": "3.0.0",
    "cordova-plugin-ionic-keyboard": "^2.1.3",
    "cordova-plugin-ionic-webview": "^3.1.2",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-statusbar": "^2.4.2",
    "cordova-plugin-whitelist": "^1.3.3",
    "css-animator": "^2.3.1",
    "ionic-angular": "3.9.3",
    "ionicons": "3.0.0",
    "leaflet": "^1.4.0",
    "onesignal-cordova-plugin": "2.4.6",
    "phonegap-plugin-barcodescanner": "8.0.1",
    "rxjs": "^6.3.3",
    "rxjs-compat": "^6.3.3",
    "sw-toolbox": "3.6.0",
    "web-animations-js": "^2.3.1",
    "zone.js": "0.8.29"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.2.1",
    "typescript": "~2.6.2"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-inappbrowser": {},
      "phonegap-plugin-barcodescanner": {},
      "com-sarriaroman-photoviewer": {},
      "onesignal-cordova-plugin": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {
        "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
      },
      "cordova-plugin-ionic-keyboard": {}
    },
    "platforms": [
      "android"
    ]
  }

我正在使用Xcode10,我已经尝试了许多解决方案来解决这个问题,但我认为它们已经过时且过时了。如果你已经尝试了最后几天并且有一个成功的b解决方案,我在等你的答案。

ionic3 xcode10
1个回答
1
投票

我在我的mac设备上安装了以前版本的cocoapods并将其删除并在安装最新的稳定版本时解决了这个问题。

© www.soinside.com 2019 - 2024. All rights reserved.