title: iOS: App Store Sandbox Returning Wrong Currency for Test Users
body: <p>I have encountered a weird problem when testing my app in the iOS iTunes App Store Sandbox. I have two developer test accounts (set up via iTunes Connect) - one set to use the UK store, the other set to use the Ukrainian store.</p>
  
  <p>When the app launches, it obtains the list of available IAP items via a SKProductsRequest. It then displays the item price using the following code (it has been implemented as a category of SKProduct, so 'self' refers to an SKProduct instance):</p>
  
  <pre><code>   NSNumberFormatter *currencyFormatter = [[[NSNumberFormatter alloc] init] autorelease];
      [currencyFormatter setFormatterBehavior:NSNumberFormatterBehavior10_4];
      [currencyFormatter setNumberStyle:NSNumberFormatterCurrencyStyle];
      [currencyFormatter setLocale:self.priceLocale];
      return [currencyFormatter stringFromNumber:self.price];
  </code></pre>
  
  <p>As far as I am aware, this is pretty much Apple's recommended code for this task. And when I use the UK store account to test my in-app purchases, everything works fine, with the price being displayed in pounds. However, when I use the Ukranian test account, the price is displayed in US dollars, rather than the Ukranian hyrvnia.</p>
  
  <p>Looking into this a bit further, I tried printing out some of the priceLocale properties in the  debug console, as follows:</p>
  
  <pre><code>NSLog(@"PriceLocale country Code: %@, localeIdentifier %@", , [self.priceLocale objectForKey:NSLocaleCountryCode], [self.priceLocale localeIdentifier]);
  </code></pre>
  
  <p>The output from which was:</p>
  
  <pre><code>PriceLocale country Code: UA, localIdentifier en_UA@currency=USD
  </code></pre>
  
  <p>Reading up on locale identifiers it appears that the @ symbol is used to modify the locale to override certain settings, in this case it would seem that the currency is being set to USD. The thing is, I can't work out why. Can anyone offer any advice on what the problem might be, or how I might look into it further?</p>