Environment
iOS 18.1+
StoreKit External Purchase Link Entitlement (EU)
App distributed via App Store in France
Problem Summary
I'm implementing external purchase links for EU users using ExternalPurchaseCustomLink. While the implementation works correctly in my TestFlight testing, some production users experience token(for:) returning nil.
Implementation
Following Apple's documentation, my flow is:
Check eligibility using ExternalPurchaseCustomLink.isEligible
If eligible, call ExternalPurchaseCustomLink.token(for: "ACQUISITION")
Store the token for use in the external purchase flow
// Simplified implementation
guard #available(iOS 18.1, *) else { return }
let isEligible = await ExternalPurchaseCustomLink.isEligible
guard isEligible else { return }
// This returns nil for some users despite isEligible being true
let token = try await ExternalPurchaseCustomLink.token(for: "ACQUISITION")
Configuration
Entitlement: com.apple.developer.storekit.external-purchase-link is present
Info.plist: SKExternalPurchaseCustomLinkRegions set to ["fr"]
App is only available in France via App Store
Observed Behavior
For affected users:
ExternalPurchaseCustomLink.isEligible returns true
token(for:) returns nil (not throwing an error)
The token generation was never previously called for these users
Questions
Under what conditions does token(for:) return nil when isEligible is true?
Is there additional validation I should perform before calling token(for:)?
Are there known issues with token generation on specific iOS versions?
Any guidance on debugging this issue would be appreciated.
Topic:
App & System Services
SubTopic:
StoreKit