I have a particular scenario in my application where some content (coming from service) needs to be displayed based on location or say country of the user.
There are two/three ways I figured out by which I could accomplish this but they have some disadvantages as mentioned below.
1) Using NSLocale
NSLocale *locale = [NSLocale currentLocale];
NSString *countryCode = [locale objectForKey: NSLocaleCountryCode];
Disadvantage:Can be changed by user, this is configurable from Setting->General ->International->Region Format
2)Using Core Location
Determine the latitude & longitude (CLLocationManager & CLLocation). From the latitude & longitude determine the country using Reverse Geocoding. Seems to me the most accurate way of serving my purpose.
Disadvantage:If the user doesn't allow core location services can't find lat & long, again user dependent.
Here are my couple of questions
1)I would like to know if there is an API available from APPLE that helps me know the Apple ID through which my application was purchased and in-turn the country to which this Apple ID belongs?
2)This one may be highly impossible considering Apple's secure environment, but still... Is it possible to get the country associated with the Credit card (if associated) against an Apple ID?
Waiting for response.
Thanks All.