Discussions

Ask a Question
Back to All

iOS purhcase failing with "Cannot connect to Itunes Store"

Hey there,

We are building a new app in react native with your platform to control payments and products. We have implemented everything according to your documentation and we are having some issues. On android everything is working fine but on iOS is not. We have added the bundle pack and the shared secret for iOS configuration, and we’ve also created the access level, the product with its Ids and the paywall containing the product.

We’ve followed your docs to implement the code which looks like this.

const { paywalls, products } = await adapty.paywalls.getPaywalls();
if (products?.length) {
const { receipt, purchaserInfo, product } =
await adapty.purchases.makePurchase(products[0]);
if (receipt) {
// after payment logic
}
}

We only have 1 product which is a monthly subscription with 1 week free trial. Everything on the app store is also configured and the product id was added to adapty.
When executing these lines of code on the app (on local enviroment on a real device via xcode), we get the following error: “Cannot connect to iTunes Store”. We are not sure if the error is this one exactly because we have the error in Spanish. In case its helpfull this is the exact error we get on the xcode console.
2023-02-16 17:46:58.827267+0100 workouts[1024:362090] [javascript] { [Error: Imposible conectarse a iTunes Store]
adaptyCode: ‘unknown’,
localizedDescription: ‘Imposible conectarse a iTunes Store’,
code: 0,
line: 1398,
column: 247,
sourceURL: ‘/var/containers/Bundle/Application/876BBA12-2CB5-4F8D-A9EB-8DBAE8932F04/workouts.app/main.jsbundle’ }

We are using version 1.4.1 of your SDK.
Thank you so much for your time.