flutter_callkit_incoming icon indicating copy to clipboard operation
flutter_callkit_incoming copied to clipboard

not showing call in ios

Open Nazeer-Nageb opened this issue 1 year ago • 7 comments

    Not showing call in ios

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

Nazeer-Nageb avatar Feb 28 '24 08:02 Nazeer-Nageb

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:''
https://api.development.push.apple.com/3/device/

to push a voip to the device.

hiennguyen92 avatar Feb 28 '24 08:02 hiennguyen92

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"
						}
					}
				}
			}

umairmehar avatar Feb 28 '24 13:02 umairmehar

@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?

Nazeer-Nageb avatar Feb 29 '24 13:02 Nazeer-Nageb

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 avatar Mar 11 '24 13:03 umairmehar

@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 avatar Mar 11 '24 15:03 Nazeer-Nageb

@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 avatar Mar 12 '24 07:03 umairmehar

@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>

Sahilkathir avatar May 17 '24 07:05 Sahilkathir