Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

140
Visualizações
iOS in-app purchase subscription shows incorrect currency for locale

I'm using SwiftyStoreKit to handle IAP in my app. The issue is prices for IAP products will always show in USD currency like this: $9.99. No matter in what country people test the app.

I'm trying to change locale in Simulator like this (in scheme edit window). Using custom location won't give me another currency as well while Locale.current shows changed locale.

Trying both:

  1. SwiftyStoreKit's product.localizedPrice
  2. And directly from product object (which localizedPrice is actually is as extension to SKProduct)

    let numberFormatter = NumberFormatter()
    numberFormatter.numberStyle = .currency
    numberFormatter.locale = product.priceLocale
    let price = numberFormatter.string(from: product.price)
    

    price still $9.99 here in Denmark or Japan

Am I missing some magic locale setting in the project properties?

  • sandbox or production, won't make a difference
  • when IAP popup appears, currency is correct there but not in the app itself
  • using a bunch of other Pods in the project like Sentry and Beacon
over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

The price and the price locale is determined by the store association of the purchasing account, not the device locale.

i.e. Someone with an account linked to the US store will always see $US since that is how they will be charged, regardless of where they are physically in the world or the locale of their device.

To test internationalisation of the price you will need to use a sandbox tester with an appropriate App Store territory.

If you run the app before you have logged in with a Sandbox tester then you will see the $US price by default. Also, note that you can't really test IAP in the simulator; You need to use a real device.

over 4 years ago · Santiago Trujillo Relatório

0

Sandbox accounts got handled differently since iOS 12. When you're running a development build from Xcode, the app will prompt for a fake sandbox AppleID as soon you initiate a purchase. After that first login, the app will know the right locale and therefore can display the appropriate prices for your in-app purchases. Before that, it will always display the prices in USD.

Source: https://developer.apple.com/documentation/storekit/in-app_purchase/testing_in-app_purchases_with_sandbox

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda