Hi,
We're experiencing inconsistent and unexpected values returned by Storefront.current?.countryCode when running our app via TestFlight.
In our case:
- The device region and locale are set to Poland
- The App Store account (Media & Purchases) is also set to Poland
However, when running a TestFlight build, Storefront.current?.countryCode sometimes returns a completely different value (e.g. "NO" for Norway), which does not match the current App Store account configuration.
Here's the code we're using:
if #available(iOS 15.0, *) {
let code = await Storefront.current?.countryCode
print("Storefront countryCode:", code ?? "nil")
}
What's particularly confusing:
- Across different devices logged into the same App Store account, we sometimes receive different
countryCodevalues - The returned value does not seem to reflect the current App Store region or device settings
We understand that Storefront reflects the App Store storefront and not the device locale, but in this case the value appears stale or incorrect even with a properly configured App Store account.
Questions:
- Is
Storefront.current?.countryCodeexpected to behave differently in TestFlight vs. production builds? - Are there known caching or propagation delays for storefront updates across devices?
- Can TestFlight builds return outdated or inconsistent storefront values?
- What is the recommended way to reliably determine the user's App Store region in this scenario?
We rely on storefront to determine regional availability of features, so understanding this behavior is important for us.
Thanks in advance for any clarification!