Dave S.
Dave S.

Reputation: 41

Can I determine what app store my iPhone app was downloaded from?

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

Answers (1)

Wayne Hartman
Wayne Hartman

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

Related Questions