react-native-callkeep icon indicating copy to clipboard operation
react-native-callkeep copied to clipboard

Disable CallKit for China on iOS

Open m15r opened this issue 1 year ago • 1 comments

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?

m15r avatar Aug 20 '24 15:08 m15r

just disable distribution in China from app store

fukemy avatar Oct 24 '24 08:10 fukemy