How to test setting different locales for SKProductsRequest

僤鯓⒐⒋嵵緔 提交于 2019-12-21 12:32:52

问题


I am implementing IAP in an iPhone app and am working in the sandbox environment. I have my code setup to process SKProducts returned by an SKProductsRequest to get pricing information. I would like to test retrieving price values in different locales (e.g. Euros or Yen) to test my formatting code. How can I get SKProductsRequest to return different locales?


回答1:


Answering my own question here. You can test this by creating IAP test users in different stores on iTunes connect.




回答2:


We get the product price based on the user's registered iTunes connect account locale.

You can only get different locales manually by using NSNumberFormatter as described in SkProduct class reference here



来源:https://stackoverflow.com/questions/6048634/how-to-test-setting-different-locales-for-skproductsrequest

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!