react-native-webrtc / react-native-callkeep

iOS CallKit framework and Android ConnectionService for React Native
ISC License
923 stars 445 forks source link

Disable CallKit for China on iOS #805

Open m15r opened 2 months ago

m15r commented 2 months ago

Apple does not allow distribution to the App Store in China with CallKit features enabled.

There's a solution discussed here, using NSLocale to check the user's region and conditionally initialize Callkit: https://stackoverflow.com/questions/51016603/disabling-callkit-from-china-store-best-approach

The CallKeep equivalent I'm using:

  NSString *currentRegion = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode];
  if (![currentRegion isEqualToString:@"CN"]) {
    // Disable CallKit in China
    [RNVoipPushNotificationManager voipRegistration];
    [RNCallKeep setup:@{
      @"appName": @"Call App",
      @"maximumCallGroups": @1,
      @"maximumCallsPerCallGroup": @1,
      @"supportsVideo": @YES,
    }];
  }

However, Apple continues to reject my app, leading me to believe CallKeep continues to use CallKit features internally without setup.

How would I go by disabling CallKit completely? Could the locale check by any chance be implemented in CallKeep?

fukemy commented 3 weeks ago

just disable distribution in China from app store