Reputation: 41
Is there a way for an iPhone app to determine which country's app store it was downloaded from? I need to disable a feature if the app is being used in certain countries. NSLocale and MKReverseGeocoder are both options, but both have limitations:
How to get user's country information
Basing the app's behavior on which app store it was downloaded from might be a better fit, if it's possible.
Upvotes: 1
Views: 282
Reputation: 18477
There is no API exposed to do that. You may consider creating separate targets. One with all the features, and another, with the specific features removed. You can then create a separate app ID and sell it within the designated countries that need the alterered version. Creating separate targets and controlling flow with compile time if
blocks will allow you to accomplish what you desire while maintaining a single codebase.
See also:
Building for multiple iPhone targets in XCode
Upvotes: 1