diff --git a/ios/RNInCallManager/RNInCallManager.swift b/ios/RNInCallManager/RNInCallManager.swift index 9cc2736..b34c86d 100644 --- a/ios/RNInCallManager/RNInCallManager.swift +++ b/ios/RNInCallManager/RNInCallManager.swift @@ -377,7 +377,7 @@ class RNInCallManager: NSObject, AVAudioPlayerDelegate { self.audioSessionRouteChangeObserver = self.startObserve(AVAudioSessionRouteChangeNotification, object: nil, queue: nil) { notification in guard notification.name == AVAudioSessionRouteChangeNotification && notification.userInfo != nil else { return } - if let rawValue = notification.userInfo?[AVAudioSessionRouteChangeReasonKey]?.unsignedIntegerValue { + if let rawValue = notification.userInfo?[AVAudioSessionRouteChangeReasonKey] as? UInt { if let type = AVAudioSessionRouteChangeReason(rawValue: rawValue) { switch type { case .Unknown: