Closed beckyhilton closed 3 years ago
I think this might be a partial solution but my swift isn't very good so its not handling the error like the other one was.
NotificationCenter.default.post(name: Notification.Name(CAPNotifications.DidRegisterForRemoteNotificationsWithDeviceToken.name()), object: Messaging.token(completion:))
It fails even on import FirebaseInstanceID
I assume it happened after the Firebase core was upgraded to v8 and some deprecated items were removed.
As a temporary fix, versions of the firebase core and messaging could be hardcoded to the latest that was working without errors (7.11.0)
ios/App/Podfile
:
target 'App' do
capacitor_pods
# Add your Pods here
pod 'FirebaseCore', '7.11.0' // add the version explicitly
pod 'Firebase/Messaging', '7.11.0'
end
same problem here. any solutions in sight?
@SyFlo switching to the v7.11.0 seems to be working for me for now as a work around.
@beckyhilton yes, I'm also using v7.11.0 as a workaround now
If you are using capacitor 2, we recommend fixing the FirebaseCore
and Firebase/Messaging
versions to 7.11.0
pod 'FirebaseCore', '7.11.0'
pod 'Firebase/Messaging', '7.11.0'
If using capacitor 3, follow this guide https://capacitorjs.com/docs/guides/push-notifications-firebase
If you want to use FirebaseCore
and Firebase/Messaging
8, you can still check the capacitor 3 guide, but note that the capacitor notifications to send the token/error to the js side changed the name, so you need to use the old names instead of the names on that guide
@jcesarmobile Thanks!
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.
Bug Report
Capacitor Version
Platform(s)
iOS
Current Behavior
Build failure in App Flow
Expected Behavior
Successful App Flow Build
Code Reproduction
I believe this is related to the code provided on this page https://capacitorjs.com/docs/guides/push-notifications-firebase
Other Technical Details
npm --version
output: 7.6.0node --version
output: v12.19.0pod --version
output (iOS issues only): 1.9.3Additional Context
In XCode I see this error message
And in the firebase release notes I saw this "The deprecated Firebase InstanceID has been removed. Use Firebase Installations to manage app instance and use Firebase Messaging to manage FCM registration token instead" which I thought might be the cause
https://firebase.google.com/support/release-notes/ios