We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug When calling fcm.subscribeTo(..) the mentioned exception is thrown, only on iOS, on Android works as expected
To Reproduce
import { FCM } from "@capacitor-community/fcm"; var fcm; try { fcm = new FCM(); } catch (e) { console.error(e); } try { PushNotifications.requestPermission().then(async (result) => { if (result.granted) { console.log("registering push notifications"); await PushNotifications.register(); } }); } catch (e) { console.error(e); } try { await fcm.subscribeTo({ topic: "all" }); <--- here it crashes if (user) { await fcm.unsubscribeFrom({ topic: "not_logged" }); await fcm.subscribeTo({ topic: "logged" }); await fcm.subscribeTo({ topic: user.uid }); } else { await fcm.subscribeTo({ topic: "not_logged" }); await fcm.unsubscribeFrom({ topic: "logged" }); } } catch (e) { console.log(fcm); console.error(e); }
From what i can see inot the source code, FCMPlugin is undefined
"@capacitor-community/fcm": "^1.1.2", "@capacitor/core": "^2.4.7", "@capacitor/ios": "^2.4.7",
Expected behavior fcm.subscribeTo({topic: "all" }) should work and subscribe user to the "all" topic
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
When calling fcm.subscribeTo(..) the mentioned exception is thrown, only on iOS, on Android works as expected
To Reproduce
From what i can see inot the source code, FCMPlugin is undefined
"@capacitor-community/fcm": "^1.1.2",
"@capacitor/core": "^2.4.7",
"@capacitor/ios": "^2.4.7",
Expected behavior
fcm.subscribeTo({topic: "all" }) should work and subscribe user to the "all" topic
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: