我可以确定我的 iPhone 应用程序是从哪个应用程序商店下载的吗?

发布于 2024-10-09 19:25:12 字数 287 浏览 0 评论 0原文

iPhone 应用程序是否有办法确定它是从哪个国家/地区的应用程序商店下载的?如果该应用程序在某些国家/地区使用,我需要禁用某项功能。 NSLocale 和 MKReverseGeocoder 都是选项,但都有局限性:

如何获取用户的国家/地区信息

如果可能的话,将应用程序的行为基于从哪个应用程序商店下载可能更合适。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我们只是彼此的过ke 2024-10-16 19:25:12

没有公开的 API 可以执行此操作。您可以考虑创建单独的目标。一种具有所有功能,另一种则删除了特定功能。然后,您可以创建一个单独的应用程序 ID 并将其在需要更改版本的指定国家/地区内销售。创建单独的目标并使用编译时 if 块控制流程将允许您在维护单个代码库的同时完成您想要的任务。

另请参阅:

在 XCode 中构建多个 iPhone 目标

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文