Open Nazeer-Nageb opened 8 months ago
curl -v \
-d '{"aps":{"alert":"Hien Nguyen Call"},"id":"44d915e1-5ff4-4bed-bf13-c423048ec97a","nameCaller":"Hien Nguyen","handle":"0123456789","isVideo":true}' \
-H "apns-topic: com.hiennv.testing.voip" \
-H "apns-push-type: voip" \
--http2 \
--cert VOIP.pem:'
to push a voip to the device.
Having the same issue, Followed all the steps from:
https://pub.dev/packages/flutter_callkit_incoming
And
https://github.com/hiennguyen92/flutter_callkit_incoming/blob/master/PUSHKIT.md
But it is still not working on iOS.
I am using FCM to push a notification. Can someone here help generate a payload to be sent to FCM?
This is what I'm trying to do right now:
message: {
token: options[:device_token],
notification: {
title: options[:title],
body: options[:body]
},
data: options[:data] || {},
android: {
notification: {
sound: "tadah.wav",
click_action: "FLUTTER_NOTIFICATION_CLICK",
channel_id: 'high_importance_channel'
}
},
apns: {
headers: {
"apns-push-type": "voip",
"apns-topic": "<app-bundle-id>.voip"
},
payload: {
aps: {
sound: "tadah.wav"
}
}
}
}
@hiennguyen92 I'm sorry but I couldn't understand what I had to do to make it work Is there anything that can help me understand what I should do?
Having the same issue, Followed all the steps from: https://pub.dev/packages/flutter_callkit_incoming And https://github.com/hiennguyen92/flutter_callkit_incoming/blob/master/PUSHKIT.md But it is still not working on iOS.
I am using FCM to push a notification. Can someone here help generate a payload to be sent to FCM?
This is what I'm trying to do right now:
message: { token: options[:device_token], notification: { title: options[:title], body: options[:body] }, data: options[:data] || {}, android: { notification: { sound: "tadah.wav", click_action: "FLUTTER_NOTIFICATION_CLICK", channel_id: 'high_importance_channel' } }, apns: { headers: { "apns-push-type": "voip", "apns-topic": "<app-bundle-id>.voip" }, payload: { aps: { sound: "tadah.wav" } } } }
I was trying to use FCM to push the voip notifications (on IOS). After getting in touch with FCM support, I learned that it's not possible to use FCM to make voip calls for IOS. So have to make a separate call to https://api.development.push.apple.com:443
.
@umairmehar how to make aseparate call ? Is there a video or anything that helps me on this topic to be able to solve this problem
@Nazeer-Nageb You can make apn voip push call as below:
curl -v \ -d '{"aps":{"alert": "Hien Nguyen Call"}, "id": "44d915e1-5ff4-4bed-bf13-c423048ec97a", "nameCaller": "Hien Nguyen", "handle": "0123456789", "isVideo": true}' \ -H "apns-topic: com.hiennv.testing.voip" \ -H "apns-push-type: voip" \ --http2 \ --cert VOIP.pem:'<passphrase>' \ https://api.development.push.apple.com/3/device/<device token>
Make sure to:
Change com.hiennv.testing.voip
to your app bundle (Must add .voip at the end)
Change <passphrase>
to be the path to your .pem file.
Change <device token>
to your device's VoIP token.
Depending on your programming language/platform you can use this call as a reference.
@umairmehar @hiennguyen92
our backend is connected with Firebase so there is any way to call this curl from Flutter or Firebase ?
curl -v \ -d '{"aps":{"alert": "Hien Nguyen Call"}, "id": "44d915e1-5ff4-4bed-bf13-c423048ec97a", "nameCaller": "Hien Nguyen", "handle": "0123456789", "isVideo": true}' \ -H "apns-topic: com.hiennv.testing.voip" \ -H "apns-push-type: voip" \ --http2 \ --cert VOIP.pem:'<passphrase>' \ https://api.development.push.apple.com/3/device/<device token>
Hello @hiennguyen92 I completed the VoIP setup, but it still does not work on iOS and I cannot receive the call. What could be the problem? After convert the file and getting the voip.pem file, where should I put it?
_Originally posted by @Nazeer-Nageb in https://github.com/hiennguyen92/flutter_callkit_incoming/issues/459#issuecomment-1968435676_