gpt4 book ai didi

ios - 我可以知道我的应用程序是从哪个 iOS App Store 区域下载的吗?

转载 作者:行者123 更新时间:2023-11-28 23:56:42 24 4
gpt4 key购买 nike

我是一名 iOS 开发者。

最近我被告知我需要从我在中国地区的应用程序中删除 Callkit。但我不能只发布一个没有与原始应用程序分离的 Callkit 的中文版本。因为我们的服务器端已经卖给客户了,我没法给他们一一修改apple push certificate。所以我需要在运行时识别中国地区。

使用位置不是一个好主意,因为我们的应用程序与用户的位置无关,并且可以在设置中轻松关闭。是否可以在运行时知道我的应用程序最初是从 App Store 的哪个区域下载的?

谢谢。

最佳答案

如何检查语言环境区域?这听起来很愚蠢而且很容易规避,但它可能足以满足中国的法律要求......内容如下:

// Chinese country codes
NSString *const MacauChinaCountryCode = @"MO";
NSString *const ChinaCountryCode = @"CN";
NSString *const HongKongChinaCountryCode = @"HK";

...

- (BOOL)isRegionSupportedByCallKit {
NSString *currentCountryCode = [NSLocale currentLocale].countryCode;
NSArray<NSString *> *chineseCountryCodes = @[MacauChinaCountryCode, ChinaCountryCode, HongKongChinaCountryCode];
return ![chineseCountryCodes containsObject:currentCountryCode];
}

关于ios - 我可以知道我的应用程序是从哪个 iOS App Store 区域下载的吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51053847/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com