Hi all,
I've been trying to work on getting my paywall set up prior to launching on the App Store and I seem to have an issue with the way my pricing appears.
In the Premium Paywall View where I display my monthly and yearly options, the costs seem to appear in USD (even though my Apple ID is UK based.)
I also added some diagnostics that confirm that I am using the US Store front.
Having said that, when I tap on an option and the StoreKit payment confirmation pop up appears, the price is displayed in GBP (as it should be).
I have attached some screenshots below and a brief code snippet from my StoreKit file detailing how I determine the pricing and how I load the products.
func loadProducts() async {
guard !isLoadingProducts else { return }
isLoadingProducts = true
defer { isLoadingProducts = false }
do {
let loadedProducts = try await Product.products(for: Self.premiumProductIDs)
products = loadedProducts.sorted { lhs, rhs in
let lhsIndex = Self.premiumProductIDs.firstIndex(of: lhs.id) ?? .max
let rhsIndex = Self.premiumProductIDs.firstIndex(of: rhs.id) ?? .max
return lhsIndex < rhsIndex
}
if let storefront = await Storefront.current {
let currency = storefront.currency?.identifier ?? "nil"
storefrontDiagnostic = "StoreKit storefront: \(storefront.countryCode), currency: \(currency), id: \(storefront.id)"
} else {
storefrontDiagnostic = "StoreKit storefront: nil"
}
} catch {
alertMessage = storeKitErrorMessage(for: error)
}
}
func displayPrice(for productID: String) -> String? {
product(withID: productID)?.displayPrice
}