简体   繁体   中英

How do I detect an app has been downloaded in China?

I am looking for a reliable mechanism to find out if my application has been downloaded in China. What are my options?

There is an appStoreReceiptURL method on NSBundle which points to a DER encoded receipt file. I understand this receipt may also contain the country of the App Store where it was downloaded. Does anyone know how reliable that information is?

Are there other options?

For iPhones you can use this

CTTelephonyNetworkInfo *network_Info = [CTTelephonyNetworkInfo new];
CTCarrier *carrier = network_Info.subscriberCellularProvider;

NSLog(@"country code is: %@", carrier.mobileCountryCode);

//will return the actual country code
NSLog(@"country code is: %@", carrier.isoCountryCode);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM