Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable CallKit in China (#1941) #578

Merged
merged 4 commits into from
Oct 16, 2018
Merged
Changes from 1 commit
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
9 changes: 8 additions & 1 deletion MatrixSDK/VoIP/CallKit/MXCallKitAdapter.m
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://stackoverflow.com/a/51319158 checks also "CHN". We could do the same.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

screen shot 2018-10-16 at 11 04 38 am

It seems like they are all two letters as least as far as iOS is concerned.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, so "CN" only.

}

return false;
aaronraimist marked this conversation as resolved.
Show resolved Hide resolved
}

#pragma mark - CXProviderDelegate
Expand Down