andrehtissot / cordova-plugin-fcm-with-dependecy-updated

Google FCM Push Notifications Cordova Plugin
MIT License
210 stars 273 forks source link

Failed to install 'cordova-plugin-fcm-with-dependecy-updated' #178

Open leocharrua opened 3 years ago

leocharrua commented 3 years ago

Hi André!!

When I run:

ionic cordova platform add ios  

I get:

iOS project created with cordova-ios@6.1.1
Installing "cordova-plugin-device" for ios
Installing "cordova-plugin-fcm-with-dependecy-updated" for ios
Failed to install 'cordova-plugin-fcm-with-dependecy-updated': CordovaError: CocoaPods was not found. Please install version 1.8.0 or greater from https://cocoapods.org/
    at checkTool (R:\wamp\app\sofilink4\platforms\ios\cordova\lib\check_reqs.js:88:31)
    at module.exports.check_cocoapods (R:\wamp\app\sofilink4\platforms\ios\cordova\lib\check_reqs.js:71:12)
    at Podfile.install (R:\wamp\app\sofilink4\platforms\ios\cordova\lib\Podfile.js:392:12)
    at Api.addPodSpecs (R:\wamp\app\sofilink4\platforms\ios\cordova\Api.js:443:32)
    at R:\wamp\app\sofilink4\platforms\ios\cordova\Api.js:278:29
    at _fulfilled (R:\wamp\app\sofilink4\node_modules\q\q.js:854:54)
    at R:\wamp\app\sofilink4\node_modules\q\q.js:883:30
    at Promise.promise.promiseDispatch (R:\wamp\app\sofilink4\node_modules\q\q.js:816:13)
    at R:\wamp\app\sofilink4\node_modules\q\q.js:624:44
CocoaPods was not found. Please install version 1.8.0 or greater from https://cocoapods.org/
    at runSingle (R:\wamp\app\sofilink4\node_modules\q\q.js:137:13)
[ERROR] An error occurred while running subprocess cordova.

Environment: Ionic:

Ionic CLI : 6.11.8 (C:\Users\leoch\AppData\Roaming\npm\node_modules\@ionic\cli) Ionic Framework : @ionic/angular 5.3.3 @angular-devkit/build-angular : 0.901.12 @angular-devkit/schematics : 9.1.12 @angular/cli : 9.1.12 @ionic/angular-toolkit : 2.3.3

Cordova:

Cordova CLI : 10.0.0 Cordova Platforms : 6.0.0, android 9.0.0, browser, ios 6.1.1 Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 6 other plugins)

Utility:

cordova-res : 0.15.1 native-run : 1.1.0

System:

Android SDK Tools : 26.1.1 (C:\Users\leoch\AppData\Local\Android\Sdk) NodeJS : v14.4.0 (C:\Program Files\nodejs\node.exe) npm : 6.14.8 OS : Windows 10

Package.json

 "dependencies": {
    "@angular/animations": "^9.1.12",
    "@angular/cdk": "^9.2.4",
    "@angular/fire": "^6.0.2",
    "@angular/forms": "^9.1.12",
    "@angular/material": "^9.2.4",
    "@angular/material-moment-adapter": "^9.2.4",
    "@angular/platform-browser-dynamic": "^9.1.12",
    "@angular/pwa": "^0.901.7",
    "@angular/router": "^9.1.12",
    "@angular/service-worker": "^9.1.12",
    "@ionic-native/core": "^5.28.0",
    "@ionic-native/keyboard": "^5.28.0",
    "@ionic-native/splash-screen": "^5.28.0",
    "@ionic-native/status-bar": "^5.28.0",
    "@ionic/angular": "^5.3.3",
    "@ionic/lab": "^3.2.7",
    "@ionic/storage": "^2.3.1",
    "@sentry/browser": "^5.24.2",
    "cordova-android": "^9.0.0",
    "cordova-browser": "6.0.0",
    "cordova-plugin-device": "^2.0.3",
    "cordova-plugin-ionic-webview": "^5.0.0",
    "cordova-plugin-statusbar": "^2.4.3",
    "cordova-plugin-whitelist": "^1.3.4",
    "core-js": "^3.6.5",
    "firebase": "^7.21.0",
    "moment": "^2.29.0",
    "request": "^2.88.2",
    "rxjs": "^6.6.3",
    "tslib": "^2.0.1",
    "zone.js": "^0.11.1"
  },
  "devDependencies": {
    "@angular-devkit/architect": "^0.901.7",
    "@angular-devkit/build-angular": "^0.901.7",
    "@angular-devkit/core": "^9.1.12",
    "@angular-devkit/schematics": "^9.1.12",
    "@angular/cli": "^9.1.12",
    "@angular/common": "^9.1.12",
    "@angular/compiler": "^9.1.12",
    "@angular/compiler-cli": "^9.1.12",
    "@angular/core": "^9.1.12",
    "@angular/language-service": "^9.1.12",
    "@angular/platform-browser": "^9.1.12",
    "@ionic/angular-toolkit": "^2.3.3",
    "@sentry/webpack-plugin": "^1.12.1",
    "@types/jasmine": "^3.5.14",
    "@types/jasminewd2": "^2.0.8",
    "@types/node": "^14.11.2",
    "codelyzer": "^6.0.0",
    "cordova-ios": "^6.1.1",
    "cordova-plugin-fcm-with-dependecy-updated": "^7.3.1",
    "cordova-plugin-ionic-keyboard": "^2.2.0",
    "cordova-plugin-splashscreen": "^6.0.0",
    "cordova-sqlite-storage": "^5.1.0",
    "jasmine-core": "^3.6.0",
    "jasmine-spec-reporter": "^6.0.0",
    "karma": "^5.2.2",
    "karma-chrome-launcher": "^3.1.0",
    "karma-coverage-istanbul-reporter": "^3.0.3",
    "karma-jasmine": "^4.0.1",
    "karma-jasmine-html-reporter": "^1.5.4",
    "protractor": "^7.0.0",
    "ts-node": "^9.0.0",
    "tslint": "^5.20.1",
    "typescript": "3.8.3"
  },
  "description": "Sofilink - Seguridad y Control",
  "config": {
    "ionic_generate_source_map": "true"
  },
  "cordova": {
    "plugins": {
      "cordova-plugin-ionic-keyboard": {},
      "cordova-plugin-device": {},
      "cordova-plugin-ionic-webview": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-whitelist": {},
      "cordova-sqlite-storage": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-fcm-with-dependecy-updated": {
        "ANDROID_FCM_VERSION": "19.0.0",
        "ANDROID_GRADLE_TOOLS_VERSION": "3.5.3",
        "ANDROID_GOOGLE_SERVICES_VERSION": "4.3.3",
        "ANDROID_DEFAULT_NOTIFICATION_ICON": "@mipmap/ic_launcher"
      }
    },

cordova-plugin-fcm-with-dependecy-updated 7.3.1 "Cordova FCM Push Plugin"

Any clue?

Thanks

leocharrua commented 3 years ago

Hello again André!!!

I have tried with other versions of cordova-ios:

ionic cordova platform add ios@6.0.0 NOT WORK ionic cordova platform add ios@5.1.1 WORK

Can you help me get it to work with the latest version (6.1.1)?

Thanks

andrehtissot commented 3 years ago

AFAIK, it's not possible to building iOS apps on Windows, as it relies on Apple's XCode. https://cordova.apache.org/docs/en/latest/guide/platforms/ios/index.html#requirements-and-support

leocharrua commented 3 years ago

Hello André ... ok ... but why when I use the cordova-ios 5.1.1 adds the plugin without errors, but when I use version 6.1.1 is trying to build the plugin? Thanks

leocharrua commented 3 years ago

How I can add the plugin with cordova-ios 6.1.1? Thanks again

andrehtissot commented 3 years ago

After version 6, the cordova-ios itself started managing cocoapods dependencies. By looking at the plugin.xml podspec https://github.com/andrehtissot/cordova-plugin-fcm-with-dependecy-updated/blob/master/plugin.xml#L122 and running the `pod install ...' on cordova plugin install.

I really don't know how would you be able to skip that step without either changing the cordova-ios scripts of forking this plugin and editing the plugin.xml.

My confusion is in the desire of having it installed on your environment, as you are not able to build it.

leocharrua commented 3 years ago

André, my development environment is Windows. I run: "ionic cordova platform add ios" and then I copy the "platforms/ios" folder to the mac ...

After that I run "pod install" in the mac.

Then I can work with the xCode.

Is this procedure ok? What do you recommend?

Thanks

leocharrua commented 3 years ago

André, I need to copy all the ionic project to the mac and run "ionic cordova platform add ios" there? What do you think? Thanks

leocharrua commented 3 years ago

Sorry André for bothering you again :(

I run the command with the --verbose option, and I get this:

Prepared iOS project successfully Installing plugin "cordova-plugin-device" following successful platform add of ios Found variables for "cordova-plugin-device". Processing as cli_variables. Installing "cordova-plugin-device" for ios Finding scripts for "before_plugin_install" hook from plugin cordova-plugin-device on ios platform only. No scripts found for hook "before_plugin_install". Install start for "cordova-plugin-device" on ios. Beginning processing of action stack for ios project... Action stack processing complete. pods.json: The file at R:\wamp\app\sofilink4\platforms\ios\pods.json does not exist. Creating new pods.json in platforms/ios Wrote to pods.json. Podfile: The file at R:\wamp\app\sofilink4\platforms\ios\Podfile does not exist. Creating new Podfile in platforms/ios Wrote to Podfile. Install complete for cordova-plugin-device on ios. Finding scripts for "after_plugin_install" hook from plugin cordova-plugin-device on ios platform only. No scripts found for hook "after_plugin_install". Installing plugin "cordova-plugin-fcm-with-dependecy-updated" following successful platform add of ios Found variables for "cordova-plugin-fcm-with-dependecy-updated". Processing as cli_variables. Installing "cordova-plugin-fcm-with-dependecy-updated" for ios Finding scripts for "before_plugin_install" hook from plugin cordova-plugin-fcm-with-dependecy-updated on ios platform only. No scripts found for hook "before_plugin_install". Install start for "cordova-plugin-fcm-with-dependecy-updated" on ios. Beginning processing of action stack for ios project... Action stack processing complete. pods.json found in platforms/ios Podfile found in platforms/ios Adding pods since the plugin contained Set pods.json for sources - https://github.com/CocoaPods/Specs.git Added source line for https://github.com/CocoaPods/Specs.git Set pods.json for libraries - Firebase/Messaging Added pod line for Firebase/Messaging Wrote to pods.json. Wrote to Podfile. Running pod install (to install plugins) Failed to install 'cordova-plugin-fcm-with-dependecy-updated': CordovaError: CocoaPods was not found. Please install version 1.8.0 or greater from https://cocoapods.org/

The question is who is calling "pod install" with cordova-ios >= 6 (with version 5.1.1 does not happen). Do you know any way to avoid this?

I wanna add ios platform without run "pod install" (because I'm in Windows yet) ... copy "platforms/ios" folder to the mac and then run "pod install" there.

Is that right?

Thanks

andrehtissot commented 3 years ago

I understand, although what you are doing is a lot of pain (copying the dev code from a OS to another to build for iOS)...

Did you try installing ruby and cocoapods on windows? https://rvm.io/ (recommended, as it is installed on the user context) And with ruby loaded into the PATH, gem install cocoapods

leocharrua commented 3 years ago

Hello Andre!!! Honestly, I didn't know about "ruby and cocapods on windows". But, I don't understand why the only package of my project, that is trying to run pod in windows, is this plugin. I can't stop thinking, if there's a way to avoid this ... how the other packages do it?

shahabas-cp-14 commented 3 years ago

cordova-plugin-fcm-with-dependecy-updated latest version getting an error of Failed to install 'cordova-plugin-fcm-with-dependecy-updated': CordovaError: CocoaPods was not found. Please install version 1.8.0 or greater from https://cocoapods.org/ after ionic cordova platform add ios

RidClick commented 3 years ago

Don't forget update your cocoapods before add platform ios pod repo update on your app folder then add platform ios

Florian-crg commented 3 years ago

I have trouble installing fcm for iOS as well.

On Android it works like a charm. It seems that it has a pod problem. Using ionic 5 and pod 1.10.1 on macos

Installing "cordova-plugin-fcm-with-dependecy-updated" for ios
Running command: pod install --verbose
Failed to install 'cordova-plugin-fcm-with-dependecy-updated': Error: pod: Command failed with exit code 1
    at ChildProcess.whenDone (/Users/ecovelo/Projects/appli-usager-v2/platforms/ios/cordova/node_modules/cordova-common/src/superspawn.js:136:25)
    at ChildProcess.emit (node:events:379:20)
    at maybeClose (node:internal/child_process:1069:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:300:5)
pod: Command failed with exit code 1
[ERROR] An error occurred while running subprocess cordova. 
BboyEcuachi commented 3 years ago

@Florian-crg hello, have you solved this? I am having the same error

fleerdayo commented 3 years ago

@BboyEcuachi you can use v.7.5.0. instead. The error doesn't appear in that version for me. ionic cordova plugin add cordova-plugin-fcm-with-dependecy-updated@7.5.0

Also #241 solves the problem for me in v.7.7.0, but it hasn't been reviewed yet by @andrehtissot

dineshmaths1 commented 3 years ago

Hello again André!!!

I have tried with other versions of cordova-ios:

ionic cordova platform add ios@6.0.0 NOT WORK ionic cordova platform add ios@5.1.1 WORK

Can you help me get it to work with the latest version (6.1.1)?

Thanks

how to x 6.1.1 any solution

dineshmaths1 commented 3 years ago

I have trouble installing fcm for iOS as well.

On Android it works like a charm. It seems that it has a pod problem. Using ionic 5 and pod 1.10.1 on macos

Installing "cordova-plugin-fcm-with-dependecy-updated" for ios
Running command: pod install --verbose
Failed to install 'cordova-plugin-fcm-with-dependecy-updated': Error: pod: Command failed with exit code 1
    at ChildProcess.whenDone (/Users/ecovelo/Projects/appli-usager-v2/platforms/ios/cordova/node_modules/cordova-common/src/superspawn.js:136:25)
    at ChildProcess.emit (node:events:379:20)
    at maybeClose (node:internal/child_process:1069:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:300:5)
pod: Command failed with exit code 1
[ERROR] An error occurred while running subprocess cordova. 

how to fix?

dineshmaths1 commented 3 years ago

I have trouble installing fcm for iOS as well.

On Android it works like a charm. It seems that it has a pod problem. Using ionic 5 and pod 1.10.1 on macos

Installing "cordova-plugin-fcm-with-dependecy-updated" for ios
Running command: pod install --verbose
Failed to install 'cordova-plugin-fcm-with-dependecy-updated': Error: pod: Command failed with exit code 1
    at ChildProcess.whenDone (/Users/ecovelo/Projects/appli-usager-v2/platforms/ios/cordova/node_modules/cordova-common/src/superspawn.js:136:25)
    at ChildProcess.emit (node:events:379:20)
    at maybeClose (node:internal/child_process:1069:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:300:5)
pod: Command failed with exit code 1
[ERROR] An error occurred while running subprocess cordova. 

Am facing same issue how to fix?

FiReBlUe45 commented 2 years ago

any news?

asd456680 commented 2 years ago

same error ! how to fix ?

vishwanath1004 commented 2 years ago

HI any update on the issue, am facing same error

jpcweb commented 2 years ago

Fix: Modifiy the podspec in the plugin.xml file (use-frameworks property)

...
<podspec>
  <config>
    <source url="https://github.com/CocoaPods/Specs.git"/>
  </config>
  <pods use-frameworks="true">
    <pod name="Firebase/Messaging" spec="$IOS_FIREBASE_MESSAGING_VERSION"/>
  </pods>
</podspec>
...

Then ionic cordova platform rm ios and ionic cordova platform add ios@5.1.1 --verbose

Neseek77 commented 1 year ago

how to x 6.1.1 any solution

use plugin version 7.6.1 as used in this sample project. (Check Example Apps section in this repo)

https://github.com/andrehtissot/cordova-plugin-fcm-with-dependecy-updated

AppXprt commented 1 year ago

https://github.com/dpa99c/cordova-plugin-firebasex is way more featured and mature.

On Tue, Jul 19, 2022 at 5:39 AM Neseek @.***> wrote:

how to x 6.1.1 any solution

use version 7.6.1 as used in this sample project. (Check Example Apps section in this repo)

https://github.com/andrehtissot/cordova-plugin-fcm-with-dependecy-updated

— Reply to this email directly, view it on GitHub https://github.com/andrehtissot/cordova-plugin-fcm-with-dependecy-updated/issues/178#issuecomment-1188832158, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGNLQUA2WIYQ72JTQN4ONY3VUZZWNANCNFSM4R27Z73A . You are receiving this because you are subscribed to this thread.Message ID: <andrehtissot/cordova-plugin-fcm-with-dependecy-updated/issues/178/1188832158 @github.com>