voximplant / flutter_callkit

Flutter SDK for CallKit integration to Flutter applications on iOS
MIT License
53 stars 18 forks source link

calluuid and uuid in FCXAnswerCallAction #15

Closed cdg720 closed 3 years ago

cdg720 commented 3 years ago

where are there two uuids in FCXAnswerCallAction?

when a server send a voip notification to a device with uuid = "X", plugin.didDisplayIncomingCall gets called with uuid = "X". when a user performs answer or end, a callback gets called with callUuid = "X" and uuid = "something else".

what is uuid in FCXAnswerCallAction or FCXEndCallAction and how is it generated? and why is uuid from plugin.didDisplayIncomingCall renamed to callUuid in FCXAnswerCallAction?

YuliaGrigorieva commented 3 years ago

Hello!

The UUID of a call is the unique identifier for CXCall. It is set on CXCall creation that is performed when a new incoming or outgoing call is reported to the CallKit framework. So it is not changed.

I suppose that your question is about the naming. When a new incoming or outgoing call is reported to the CallKit, the API request to provide the Call UUID as uuid parameter:

As for CXCallAction in CallKit framework the same uuid is the property of the CXCallAction class named callUUID: https://developer.apple.com/documentation/callkit/cxcallaction/1648089-calluuid FCXCallAction is following the same naming and its property is also called callUuid: https://github.com/voximplant/flutter_callkit/blob/09b666e461135ca0fe271e668b5ac74b4c8de713/lib/src/actions/call_action.dart#L24

Each CXAction has its own identifier uuid https://developer.apple.com/documentation/callkit/cxaction - the identifier of the action and callUuid - identifier of the CXCall https://developer.apple.com/documentation/callkit/cxcallaction - the call the action is assotiated with As CXCallAction is a subclass of CXAction you get both identifiers.

Best regards, Yulia Grigorieva

cdg720 commented 3 years ago

thank you!