AppStore 应用内购买:如何获取用户支付的货币?
我有一个使用应用内购买的 iOS 应用程序,可以满足国际受众的需求,因此我希望以不同的货币(美元、欧元、人民币……您可以从 AppStore 定价矩阵中了解它们)进行付款。当然,我想显示用用户当地货币购买的物品,但我真的不知道如何做。
使用用户的区域或语言似乎是一个不好的指标,因为货币取决于用户正在使用的 AppStore 帐户的区域,而不是设备设置。
我如何知道用户将使用哪种货币付款?
I have an iOS app using In-App-Purchase that caters to an international audience, so I expect payments in different currencies (USD, EUR, CNY, ... you know them from the AppStore Pricing Matrix). Of course I would like to show the items for purchase with the user's local currency, but I don't really know how.
Using the region or language of a user seems like a bad indicator, as the currency depends on the region of the AppStore account the user is using and not on the device settings.
How can I find out which currency a user will pay in?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
获取 SKProduct 对象后,您可以根据价格和 PriceLocale 属性构建其本地化价格。这是来自 苹果文档 如何做到这一点:
Once you have SKProduct object fetched you can construct its localized price from price and priceLocale properties. Here's copy-paste from apple docs how to do that: