Open Easycatchup opened 3 years ago
Push notification tokens are not the same as voip notification tokens. They need to be managed seperatley in your database.
Here is an example of using it with curl. You can probably do something similar with FCM
curl -v \
-d '{"aps":{"alert":{"uuid":"982cf533-7b1b-4cf6-a6e0-004aab68c503","incoming_caller_id":"0123456789","incoming_caller_name":"Tester"}}}' \
-H "apns-push-type: voip" \
-H "apns-expiration: 0" \
-H "apns-priority: 0" \
-H "apns-topic: <your app’s bundle ID>.voip" \
--http2 \
--cert ./voip_services.pem \
https://api.sandbox.push.apple.com/3/device/<VoIP device Token for your iPhone>
From Apple docs:
Use the voip push type for notifications that provide information about an incoming Voice-over-IP (VoIP) call. For more information, see Responding to VoIP Notifications from PushKit.
If you set this push type, the apns-topic header field must use your app’s bundle ID with .voip appended to the end. If you’re using certificate-based authentication, you must also register the certificate for VoIP services. The topic is then part of the 1.2.840.113635.100.6.3.4 or 1.2.840.113635.100.6.3.6 extension.
The voip push type is not available on watchOS. It is recommended on macOS, iOS, tvOS, and iPadOS.
Hi, I'm trying to use this plugin as described in https://github.com/FirebaseExtended/flutterfire/issues/116#issuecomment-583854658 to send IOS background notifications on IOS but I always get the "BadDeviceToken" error server-side, my guess is that I did not correctly register the token.
I am trying to use the same token as FCM - in general push notifications work fine for me using FCM both on Android and IOS, it's really just IOS background notifications that do not work where I would need this plugin.
Could someone who successfully implemented it share the code on the flutter side to use the same token for FCM and this plugin in a stateless widget?
Thanks, Marcel