开发者

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 MKReverseGe开发者_运维百科ocoder 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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜