iOS内购(IAP)订阅无法获取设备设置地区本地货币价格问题咨询
Hey there, I’ve run into this exact issue before, so let’s walk through why this is happening and how to get your Indian Rupee pricing showing up correctly.
Why This Is Happening
The core confusion here comes from the difference between device region and App Store account storefront:
SKCloudServiceControllerreturns the region set for Apple’s cloud services (like Apple Music), which matches your device’s "Region" setting.SKPaymentQueue().storefrontreturns the region tied to your logged-in App Store account—this is the value that actually determines what currency your in-app subscriptions are displayed in.
So even if your device is set to India, if your App Store account (or sandbox test account) is registered in the US, you’ll always get USD pricing.
Step-by-Step Fixes
1. Verify Your App Store Account Region
- On your test device, go to Settings > [Your Name] > Media & Purchases > View Account > Country/Region.
- Make sure this is set to India. If not, update it to India (you may need a valid Indian address; for sandbox testing, use an Indian-region sandbox account instead of a personal account).
- If using a sandbox account, log out of your personal App Store account first, then log in via Settings > App Store > Sandbox Account.
2. Confirm Pricing Configuration in App Store Connect
- Log into App Store Connect, navigate to your app’s Subscriptions section.
- For each subscription product, check that you’ve explicitly set a price for the India region (don’t rely solely on "Equalized Pricing" if you want a specific INR amount).
- Wait 1-2 hours after updating pricing—changes can take time to propagate to App Store servers globally.
3. Adjust Code for Reliable Storefront Checks
SKPaymentQueue().storefront might not load immediately on app launch. Try querying it right before you fetch products, rather than during initial setup:
public func requestProducts(_ completionHandler: @escaping ProductsRequestCompletionHandler) { // Check storefront right before requesting products if let storefront = SKPaymentQueue().storefront { print("Current App Store Storefront: \(storefront.countryCode)") // If this isn't 'IN', prompt the user to check their App Store account region } else { print("Storefront not loaded yet—retrying in 1 second") DispatchQueue.main.asyncAfter(deadline: .now() + 1) { self.requestProducts(completionHandler) } return } productsRequest?.cancel() productsRequestCompletionHandler = completionHandler productsRequest = SKProductsRequest(productIdentifiers: productIdentifiers) productsRequest!.delegate = self productsRequest!.start() }
4. Refresh App Store Cache
Sometimes the App Store caches the storefront region. Restart your device, fully close and reopen your app, then test again to refresh this data.
Final Notes
- Sandbox testing requires sandbox accounts matching the region you want to test. Create an Indian-region sandbox account in App Store Connect under Users and Access > Sandbox Testers.
- If you still see USD pricing, double-check that you’re not accidentally using a US-region sandbox account, or that your App Store account hasn’t reverted to the US region (this can happen if payment method details are invalid).
内容的提问来源于stack exchange,提问作者Swapnil Deshmukh

