-
Notifications
You must be signed in to change notification settings - Fork 446
Firebase Messaging - iOS device loses registration after first app exit #1281
Comments
+1, Please Mister @EddyVerbruggen :) Thanks a lot, N |
@EddyVerbruggen I know your a busy guy and getting to the bottom of these issues is tough with the diversity of projects that use your plugin. Please let me know if i can provide additional information / files / clarification that can help you. I was for some reason able to build once (just once) after switch Podfile version to 5.15.0 still very perplexed as to why it sometimes builds the pod but most of the time skips over it. I have removed every other pod from my Podfile to no avail. |
Works great on Android so far - ios not so much . My clients are also receiving their token but it shows not registered from Firebase and not entirely certain on a good fix. I tried @bipinbipin solution but still having issues building... |
I got my downgrade workaround to build again. For anyone who needs the 5.15.0 workaround. I had to edit:
to: before running any tns commands. this allowed it to build in Xcode and tns cli if i edit the Podfile that tns creates, and do a pod update it does not build all the pods. (....sometimes) |
+1, Please Mister @EddyVerbruggen 🙏 Thanks a lot, Ben |
Hey all, thanks for reporting this issue. Looks like the problem creeped in between Firebase iOS SDK 5.15 and 5.20, and lots of users of the native iOS SDK noticed similar problems. The good news is, it looks like it was fixed in Firebase iOS SDK 6.1.0 (scroll down to the FCM issues, where issue 2438 is mentioned). The not so good news is you'll have to wait for me to bump the plugin to use the latest native SDKs and that's usually quite a bit of work because of all those components involved. It's even a major version bump on both platforms, so there's probably a few breaking changes I'll have to fix and test. Keep an eye on issue #1283 where I'll keep track of the updating progress. |
@EddyVerbruggen Thank you very much for your work and your speed 😉 |
I am struggling with an issue where my iOS app / device gets push notifications great on the initial load. I can get notifications on the device by posting via a push token or via a subscribed topic.
Once the app is "exited" and started up again. I still receive a push token from firebase, however any attempt to post a message to that token/device or subscribed topic fails.
A device/token post to https://fcm.googleapis.com/fcm/send yields the below error. Which is confusing because I register/initialize fine and get the same push token as initially.
Any attempts to subscribe, or unsubscribe to a topic result in this vague error (from Firebase I believe)
Error Domain=com.google.fcm Code=0 "(null)"
Below are some relevant files / code, please let me know if I can provide additional details.
package.json
firebase.nativescript.json
app.component.ts
firebase.service.ts
I used to be able to get messaging to work consistenly with the below workaround:
Go into the /platforms/ios/Podfile and change:
pod 'Firebase/Core', '~> 5.20.1'
to:
pod 'Firebase/Core', '~> 5.15.0'
do a pod update and then rebuild. in that scenario messaging would work all the time. And it would not lose registration with firebase and messages would work via push token or via topic.
But for some reason I can no longer use that workaround. Because Xcode cannot link FirebaseInstanceID (which gets dropped down to 3.8.1)
I get the following in Xcode:
ld: warning: directory not found for option '-F/Users/astondeveloper/Library/Developer/Xcode/DerivedData/commprwatermainmobile-dwzdiavvnqzkxncvbtppyktvlafx/Build/Intermediates.noindex/ArchiveIntermediates/commprwatermainmobile/BuildProductsPath/Release-iphoneos/FirebaseInstanceID' ld: framework not found FirebaseInstanceID
and the same from tns cli build:
`
ld: warning: directory not found for option '-F/Users/astondeveloper/Documents/DEV/com.mpr.watermain.mobile/platforms/ios/build/Debug-iphonesimulator/FirebaseInstanceID'
ld: framework not found FirebaseInstanceID
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build systemnote: Planning buildnote: Constructing build description
** BUILD FAILED **
Command xcodebuild failed with exit code 65
`
Obviously, I'd like to just figure out what is causing it to lose registration on version 5.20, but I am on a crazy tight timeline and would be happy to just get the 5.15 workaround to work again.
The text was updated successfully, but these errors were encountered: