iOS event.transaction.state == "failed" problem...

when testing the InApp-Purchasing on iOS I always get into the “failed” state of the transactionListener with event.transaction.errorType=unknown

and

event.transaction.errorString=connection to iTunes store not possible (or so)

But I have tested other apps and there everything is working fine.

Are there some “obvious” reasons for landing in the “failed” state maybe and I can’t see them because I have looked to long at this code now!? :slight_smile:

Any help and hints welcome!

One more question:

The product for iOS is purchased like this, right: store.purchase ({“ProductID”}) and on Google like this: store.purchase ("")?

I am asking because I can’t find any confirmation if this was changed lately in the docs… but with my other apps working I assume it still is like this, right?

I now have tested on another device and there it is working like this:

I have created a US tester in iTunes Connect and testing from Germany. So on an iPhone 6 with iOS 9.2 when purchasing I’m getting asked to enter the ID and PW… after this is done I am transfered to the US store because the purchase is not allowed in Germany for this tester. Once I am there in the US store I can get back to the app, try purchasing again and everything works as planned!

BUT: Same procedure on an iPad4 with iOS 10.3.3 and I get the error message from above. There shouldn’d be difference, but it seems there is somehow.

Any help welcome!

Hi Daniela,

I’m not sure what to advise, but Apple does change subtle things from iOS version to version. iOS 9.2 is now two full versions back (if you consider iOS 11 is now “technically available”. Also, your issue seems very much tied into the fact that it’s redirecting from the German store to the US store, which is something that Corona clearly doesn’t have any involvement in. I assume there are no issues when no redirect is necessary?

Have you searched sites like StackOverflow or Apple’s bug forums for people reporting a similar issue?

Brent

Thank you for the info Brent! I will search the sites you’ve mentioned.

BTW: I was not able to purchase when I already was directed to the US store AND had to fill out my tester name and PW completely from inside the app. Somehow the transactionCallback didn’t get into the “purchased” state and always ended with “failed”… but with a new tester account everything worked fine… so hopefully this will work now in the stores worldwide.

IAP worked?

i have a problem. too.

event.name : storeTransactionstate: failed

errorType: unknown

Somehow it worked after using another test account.
Check if you have put the InApp to your App in iTunes also.

Hi @repus,

IAP is a tricky animal by nature. Did you ever have the functionality working, or is this your first time implementing it? There are many reasons why you might be getting the “failed” state, some Corona-related, others not related to Corona at all. We would need a lot more information and probably some code to begin diagnosing why.

Best regards,

Brent

Hi @repus,

The error you’re getting back appears to be an Apple error… Corona is not generating the “Cannot connect to iTunes Store” error, so your code is at least reaching the Apple side of things. Did you check 100% that you’re building with a provisioning profile that’s set up for IAP, and not trying to use a “wildcard” app ID with Apple?

Brent

I receive a similar error:

We continue to find that your in-app purchase products exhibit bugs when reviewed on iPhone and iPad running iOS 11.0.1 on Wi-Fi connected to an IPv6 network.

The problem occurs no longer.

However, I tried creating a test account,

Finally, I have a testable environment.

Unfortunately, I did not know the exact problem.

I now have tested on another device and there it is working like this:

I have created a US tester in iTunes Connect and testing from Germany. So on an iPhone 6 with iOS 9.2 when purchasing I’m getting asked to enter the ID and PW… after this is done I am transfered to the US store because the purchase is not allowed in Germany for this tester. Once I am there in the US store I can get back to the app, try purchasing again and everything works as planned!

BUT: Same procedure on an iPad4 with iOS 10.3.3 and I get the error message from above. There shouldn’d be difference, but it seems there is somehow.

Any help welcome!

Hi Daniela,

I’m not sure what to advise, but Apple does change subtle things from iOS version to version. iOS 9.2 is now two full versions back (if you consider iOS 11 is now “technically available”. Also, your issue seems very much tied into the fact that it’s redirecting from the German store to the US store, which is something that Corona clearly doesn’t have any involvement in. I assume there are no issues when no redirect is necessary?

Have you searched sites like StackOverflow or Apple’s bug forums for people reporting a similar issue?

Brent

Thank you for the info Brent! I will search the sites you’ve mentioned.

BTW: I was not able to purchase when I already was directed to the US store AND had to fill out my tester name and PW completely from inside the app. Somehow the transactionCallback didn’t get into the “purchased” state and always ended with “failed”… but with a new tester account everything worked fine… so hopefully this will work now in the stores worldwide.

IAP worked?

i have a problem. too.

event.name : storeTransactionstate: failed

errorType: unknown

Somehow it worked after using another test account.
Check if you have put the InApp to your App in iTunes also.

Hi @repus,

IAP is a tricky animal by nature. Did you ever have the functionality working, or is this your first time implementing it? There are many reasons why you might be getting the “failed” state, some Corona-related, others not related to Corona at all. We would need a lot more information and probably some code to begin diagnosing why.

Best regards,

Brent

Hi @repus,

The error you’re getting back appears to be an Apple error… Corona is not generating the “Cannot connect to iTunes Store” error, so your code is at least reaching the Apple side of things. Did you check 100% that you’re building with a provisioning profile that’s set up for IAP, and not trying to use a “wildcard” app ID with Apple?

Brent

I receive a similar error:

We continue to find that your in-app purchase products exhibit bugs when reviewed on iPhone and iPad running iOS 11.0.1 on Wi-Fi connected to an IPv6 network.

The problem occurs no longer.

However, I tried creating a test account,

Finally, I have a testable environment.

Unfortunately, I did not know the exact problem.