fix: adjusted CXProvider delegate initialization#2148
fix: adjusted CXProvider delegate initialization#2148greenfrvr merged 2 commits intofeat/callkit-telecom-integrationfrom
Conversation
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| // This is mostly needed for very first setup, as we need to override the default | ||
| // provider configuration which is set in the constructor. | ||
| // IMPORTANT: We override CXProvider instance only if there is no registered call, otherwise we may lose corrsponding call state/events from CallKit |
There was a problem hiding this comment.
| // This is mostly needed for very first setup, as we need to override the default | |
| // provider configuration which is set in the constructor. | |
| // IMPORTANT: We override CXProvider instance only if there is no registered call, otherwise we may lose corrsponding call state/events from CallKit | |
| // we should not override provider settings when there is already a registered call | |
| // because that would remove the provider that was associated with that call |
💡 Overview
This PR solves an issue with quickly answered CallKit call. The problem was that CXProvider delegate was not set by the moment CallKit answer event was omitted and was not added to delayed events store. Current implementation ensures that delegate will be set up before we report the call, so that all consequent events will be handled.