How to change the localization of the In-App priceLocale product in iOS Simulator? I always get a prices in EUR, and I can't change it into USD.
Example:
- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
{
NSArray *Books = response.products;
if ([SKPaymentQueue canMakePayments] && [response.products count]>0) {
}
for (SKProduct *book in Books) {
NSLocale *locat=[NSLocale currentLocale];
NSString *strlocate=[locat objectForKey:NSLocaleCountryCode];
NSLog(@"\n\n\n Device country== %@ \n\n\n",strlocate);
NSLocale* storeLocale = book.priceLocale;
NSString *storeCountry = (NSString*)CFLocaleGetValue((CFLocaleRef)storeLocale, kCFLocaleCountryCode);
NSLog(@"\n\n\n Store country== %@ \n\n\n",storeCountry);
}
}
Device country== US
Store country== DE ( always DE and I can't change it )
iOS simulator makes it impossible to select the current AppStore. Is there any solution to the problem of select country of the AppStore in iOS Simulator?
First of all, the store isn't supported in the simulator at all. Are you really sure you're running this in the iOS Simulator (the app that runs on your Mac)?
The price locale actually is dictated by the store country of the Apple ID you're using since that's the currency the user will be billed in. So you cannot enforce "always show this in USD" or anything like that (simply changing the currency symbol would be wrong, obviously).
But for development, you can change the currency for your sandbox account (or better yet: create a new account so you can test with different currencies). See the "Viewing, Editing, and Deleting iTunes Connect Users" section in the "iTunes Connect Developer Guide":
To Set your Preferred Currency
- Click on your name at the top right of the page.
- Select Personal Details.
- Choose your desired currency from the Preferred Currency dropdown.
- Click Save.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With