diff --git a/CHANGES.rst b/CHANGES.rst index c95b145e3e..2436a286c6 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,7 @@ Improvements: * MXHTTPClient: Send Access-Token as header instead of query param (vector-im/riot-ios/issues/2071). * MXCrypto: Encrypt the messages for invited members according to the history visibility (#559) * MXSession: When create a room as direct wait for room being tagged as direct chat before calling success block. +* CallKit is now disabled in China (PR #578). Bug fix: * MXEvent: Move `invite_room_state` to the correct place in the client-server API (vector-im/riot-ios/issues/2010). diff --git a/MatrixSDK/VoIP/CallKit/MXCallKitAdapter.m b/MatrixSDK/VoIP/CallKit/MXCallKitAdapter.m index 987f95ac32..2fdf27d92d 100644 --- a/MatrixSDK/VoIP/CallKit/MXCallKitAdapter.m +++ b/MatrixSDK/VoIP/CallKit/MXCallKitAdapter.m @@ -192,7 +192,14 @@ - (void)reportCall:(MXCall *)call connectedAtDate:(nullable NSDate *)date + (BOOL)callKitAvailable { - return [NSProcessInfo.processInfo isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){10,0,0}]; + if (@available(iOS 10.0, *)) { + // CallKit currently illegal in China + // https://github.com/vector-im/riot-ios/issues/1941 + + return ![NSLocale.currentLocale.countryCode isEqual: @"CN"]; + } + + return NO; } #pragma mark - CXProviderDelegate