Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to implement In-App Purchases only for a subset of countries?

Is there a way to use In-App Purchases such that they're NOT available in the USA, and at the same time figure out if they're available or not - and if not, perform special tasks for customers in the USA who can't use them?

like image 881
dontWatchMyProfile Avatar asked Nov 05 '22 09:11

dontWatchMyProfile


1 Answers

You could use CLLocationManager to find the users location and then use MKReverseGeocoder to figure out what country they are in.

Some people will deny access to location information. As a backup you could use the language that the current device is in (but there are some obvious issues with this approach):

NSString * language = [[NSLocale preferredLanguages] objectAtIndex:0];
http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

Then you just need to use a conditional statement:

if(in USA){ 
  do whatever, don't allow in-app purchases
} else {
  allow in app purchases
}
like image 83
Michael Frederick Avatar answered Nov 09 '22 12:11

Michael Frederick