IPHONE (in-app purchase): what do I need to do to get prices in local currency?

I create an application in 3 different languages: English, Spanish and French. I created in-app purchases in these 3 languages ​​and created users on the itunes sandbox for these 3 stores: France, USA and Spain.

Before the user can click the BUY button, even before the user logs in with his username and itunes password, I need to get prices for each product. This search is performed at the beginning of the application using the following lines:

SKProductsRequest *request= [[SKProductsRequest alloc] initWithProductIdentifiers:IDobjects];
request.delegate = self;
[request start];

In theory, this code should, among other things, receive the value of all objects in local currency. In local currency, I mean based on the language in which the user configured the iPhone, but in practice, does this code always extract the price in dollars?

What am I missing?

Another point: if the user has not logged into iTunes, he / she will always see the message in English and prices in dollars. After logging in, he will see the name of the in-app object in his language and the price in his currency, but the rest of the window will be in English. See the following image:

alt text

Thanks for any help.

Caixa is the name of the property in Spanish, 0.79 € is the correct price in local currency, but the rest of the window is in English !? This window should be completely in the user's language !!!!!

+3
source share
4 answers

The problem disappeared a few days ago. Something seems to be inside the apple.

0
source

? @ " ..." - : kPurchasePromptMessage, , iphone.

+1

Here is the code from Apple Docs:

NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init];
[numberFormatter setFormatterBehavior:NSNumberFormatterBehavior10_4];
[numberFormatter setNumberStyle:NSNumberFormatterCurrencyStyle];
[numberFormatter setLocale:product.priceLocale];
NSString *formattedString = [numberFormatter stringFromNumber:product.price];
+1
source

For this:

  • You have additional languages ​​in-app purchase management for each package.
  • create a test user. For this country.
  • check the purchase of your application in the application
  • enter your new test user for this country.
0
source

Source: https://habr.com/ru/post/1724199/


All Articles