capacitor-community / fcm

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

Update Firebase Version 18->22 on Android #88

Closed halomakes closed 2 years ago

eljass commented 2 years ago

Suggestion on how to get same firebase messaging package version as what is used in PushNotifications.

Should include this on ext firebaseMessagingVersion = project.hasProperty('firebaseMessagingVersion') ? rootProject.ext.firebaseMessagingVersion : '22.0.0'

And then this on dependencies: implementation "com.google.firebase:firebase-messaging:$firebaseMessagingVersion"

Example:

ext {
    ...
    firebaseMessagingVersion = project.hasProperty('firebaseMessagingVersion') ? rootProject.ext.firebaseMessagingVersion : '22.0.0'
}
...
dependencies {
    ...
    implementation "com.google.firebase:firebase-messaging:$firebaseMessagingVersion"
    ...
}
halomakes commented 2 years ago

google changed the interface for getting instance IDs pretty recently; I don't know if I'd feel comfortable just using the version of firebase that happens to be installed for cap pushnotifications since it could be incompatible. I'm not an expert on plugin development though so I'd like to hear others weigh in on that