capacitor-community / fcm

Enable Firebase Cloud Messaging for Capacitor apps
https://capacitor.ionicframework.com/docs/
MIT License
237 stars 83 forks source link

Swift compiler error with "Extra trailling closure" on Plugin.swift file #63

Closed dgk-zartha closed 3 years ago

dgk-zartha commented 3 years ago

Describe the bug I have installed the fcm plugin and tried to build on iOS. When i build the iOS project after have all installed and sync i have this error on iOS project.

In Plugin.swift file on line 36, 51, 63.

Extra trailling closure passed in call

And on line 86 , 92,

Messaging has no member 'isAutoInitEnabled'

Screenshots If applicable, add screenshots to help explain your problem.

ionic info

Ionic:

Ionic CLI : 6.13.1 Ionic Framework : @ionic/angular 5.6.2 @angular-devkit/build-angular : 0.1102.5 @angular-devkit/schematics : 11.2.5 @angular/cli : 11.2.5 @ionic/angular-toolkit : 3.1.1

Capacitor:

Capacitor CLI : 2.4.7 @capacitor/core : 2.4.7

Utility:

cordova-res : not installed native-run (update available: 1.3.0) : 0.2.8

System:

NodeJS : v12.19.0 (/Users/johanpujol/.nvm/versions/node/v12.19.0/bin/node) npm : 6.14.8 OS : macOS Big Sur ios : 11.0 Swift compile : 5.0

Screenshot 2021-03-24 at 11 02 14

dgk-zartha commented 3 years ago

Hi, I found the problem. The problem came when "phonegap-plugin-push": "^2.3.0", lib is added on project. When i remove this dependency and does npx cap sync ios the Swift compilator doesn't display the errors.

thx