Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## Next Release

* Fix: [iOS] Add missing `deviceToken` when reporting 'DEVICETOKEN' `CallEvent`. [Issue #241](https://github.com/cybex-dev/twilio_voice/issues/241)
* Fix: [iOS] Notifications not showing when app is in foreground.

## 0.3.1
Expand Down
4 changes: 3 additions & 1 deletion ios/Classes/SwiftTwilioVoicePlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,9 @@ public class SwiftTwilioVoicePlugin: NSObject, FlutterPlugin, FlutterStreamHand
self.sendPhoneCallEvents(description: "LOG|Call failed to connect: \(error.localizedDescription)", isError: false)
self.sendPhoneCallEvents(description: "Call Ended", isError: false)
if(error.localizedDescription.contains("Access Token expired")){
self.sendPhoneCallEvents(description: "DEVICETOKEN", isError: false)
if let deviceToken = deviceToken {
self.sendPhoneCallEvents(description: "DEVICETOKEN|\(String(decoding: deviceToken, as: UTF8.self))", isError: false)
}
}
if let completion = self.callKitCompletionCallback {
completion(false)
Expand Down