react-native-iap: Cannot connect to iTunes Store - should I be worried?
Version of react-native-iap
4.4.2
Version of react-native
0.61.4
Platforms you faced the error (IOS or Android or both?)
iOS
Expected behavior
No error should occur since I’m checking for network access and then attempt to connect to the store. So unless the App Store is unavailable, I wouldn’t expect this to happen.
Is this normal? Should I expect this to happen from time to time?
Actual behavior
I’m getting error “Cannot connect to iTunes Store”
Tested environment (Emulator? Real Device?)
I haven’t been able to reproduce the problem. I’m seeing this in logs from the production app, and quite a lot of people seem to be getting this error.
Code
initiatePurchase = async () => {
try {
const netState = await NetInfo.fetch()
if (!netState.isConnected) {
return this.stores.ui.alert('Purchase failed', connectionFailureMessage)
}
await requestPurchase(fullGameSku, false)
} catch (error) {
logger.warn(error)
}
}
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 24 (4 by maintainers)
@dan10gc and @anastely Uhm - you guys have kind of hi-jacked this issue 🙃
@DavideValdo for iOS you can test with a sandbox account on local debug as long as you are using a real device and not a simulator. Also you don’t really need a sandbox account when testing locally, I believe apple will use your apple ID and allow it to be used as a sandbox account.