-
Notifications
You must be signed in to change notification settings - Fork 106
[BUG] VoIP Push Still Arrives After Unregistering Push Notifications #2114
Description
Describe the Bug
I’m encountering an issue related to Azure Communication Services VoIP push notifications not being properly unregistered after signing out of a user. Below is the detailed scenario:
Steps to Reproduce
1. Device A: Logged in with user XX, received AcsId-1.
2. Device B: Logged in with the same user XX, also received AcsId-1.
3. Admin initiated a call to AcsId-1 → Both Device A and B received the call as expected.
4. The call was accepted on Device A, connected, and then disconnected normally.
5. On Device A:
• The user signed out.
• The application called:
agent.unregisterPushNotification { (error) in
if (error == nil) {
log("Unregister of push notification was successful")
agent.dispose()
} else {
...
}
}
• Then, a new user ZZ signed in and received a new AcsId-2.
6. Admin made another call to AcsId-1.
Expected Behavior
• Only Device B should receive the VoIP push for AcsId-1.
• Device A, now signed in as ZZ and unregistered from push, should not receive any push notification for AcsId-1.
Actual Behavior
• Both Device A and B received the VoIP push for AcsId-1.
• On Device A, the following logs were observed:
pushRegistry.didReceiveIncomingPushWith
pushRegistry.didReceiveIncomingPushWith.payload: <PKPushPayload: 0x12dca4660>
handleACSCall with payload: <PKPushPayload: 0x12dca4660>
VoIPManager.handleIncomingPush()
📥 Read from UserDefaults | Key: voip_token_azure_communication_service | Data size: 32 bytes
TelehealthCallKitObjectManager.createCXProvideConfiguration()
VoIPManager.handleIncomingPush() deviceVoipTokenData: Optional(32 bytes)
VoIPManager.handleIncomingPush() has CallAgent. Let it handle push normally.
VoIPManager.CallAgent handled incoming push normally.
❌ VoIPManager.handlePush error:
↳ domain: ACSCallingShared
↳ code: 228969904
↳ description: Failed
↳ userInfo: ["NSLocalizedDescription": Failed]
self.incomingCall: nil
Question
How can I fully stop or prevent VoIP pushes from being delivered to a device after the user signs out and unregisterPushNotification() is called?
OR
What steps can I take to fix or work around this problem?
To Reproduce
Just follow the step on above
Setup (please complete the following information):
- OS: iOS 18.4.1
- IDE : Xcode Version 16.2 (16C5032a)
- AzureCommunicationCalling: 2.15.1
** I use CallKit in SDK ***