AlexDisler / cordova-plugin-inapppurchase

A lightweight cordova plugin for in app purchases on iOS/Android
316 stars 191 forks source link

Apple Reviewer said that In-App purchase causes „Cannot connect to iTunes Store“ #201

Closed danielplappert closed 6 years ago

danielplappert commented 6 years ago

I wrote an Ionic 3 app for iOS and use the native in app purchase. I know, that in app purchase (IAP) is only working on a real device.

The problem is, that I submitted my app to Apple and they rejected the app because IAP isn't working. Only the error "Cannot connect to iTunes Stores" shows up.

And, of course, before I submitted my app to Apple I tested my app using TestFlight on multiple devices. And, what should I say, IAP works like a charm.

The problem now is that I can not reproduce this error. I wrote to Apple multiple times to get more info and explained that they have to test on a real device. The answer was every time the same. They are testing on an iPad using iOS 11.2. and so on.

So, here I am. Anybody experienced the same problem and was able to solve it? I've no clue what to do now. Are there other things that cause this error?

Your code / steps to reproduce

Same as here https://ionicframework.com/docs/native/in-app-purchase/

Type of product you are working with consumable/non-consumable/subscription

Non-consumable

Version of cordova

Cordova CLI 8.0.0 Cordova platforms iOS 4.5.4

Version of iOS/Android

iOS 11.2.2

Screeze commented 6 years ago

I can't really help you, despite telling you that it must be something with your Setup, not the plugin, as my app has the same setup using ionic, but passed the review always without any issue.

thestevenmellor commented 6 years ago

my app passed the review process, but errors on in-app purchasing. Just had it released today. Followed your standard implementation as well.

danielplappert commented 6 years ago

Thanks for your replies. My problem is that I am not able to reproduce this error, because when using TestFlight I am able to simulate the purchase. I also released an Android version of this app and In-App purchase is not a problem. The error message doesn‘t give a clue what to do, because „cannot connect to iTunes Store“ sounds like a network problem to me.

@Screeze you wrote it must be something with my setup. I set the app ID and added the correct product IDs (like I said before, buying with TestFlight works). Do you have something in mind what can be wrong?

thestevenmellor commented 6 years ago

@danielplappert I’m experiencing the same thing. It works just like you said with TestFlight but with the live iOS app in the AppStore it just fails with an error message.

I’m stumped.

danielplappert commented 6 years ago

There must be a way to find out what causes this message. Is there anyone how could say whether this message came from the plugin or Apple? In app purchases don’t work in a simulator. But what if I install the App via iTunes on a real device? I’m not talking about TestFlight. What I mean is the possibility to install Apps on a specific device for testing. Should in app purchase work this way! This plugin is part of Ionic native. I can’t believe that there is no one how could help. In app purchase is an important feature. If this doesn’t work I‘ve to use a different plugin or framework. But this isn’t what I want...

Screeze commented 6 years ago

I can confirm that IAP works on real device installed via app store. My ionic app passed the review and is available in app store. I can confirm there is money incoming ;)

Also it works by dropping a generated IAP file via iTunes onto my test iPhone. iAP works there (but the iphones account is an app test account, so no real purchase tested here)

Screeze commented 6 years ago

Do you have completed all the apple contract stuff? Do you have regional limitation activated somehow if thats possible? What does the status of the in app purchases say in this apple management website?

danielplappert commented 6 years ago

Yes, I think I completed all the Apple contract stuff (without it I wasn't able to submit the App to Apple). I don't have any regional limitations. All in app purchases are marked red and the status is "developer action necessary". But if I click on one item, there is nothing I can do. I think this message is because the App was rejected by Apple. But, what is the benefit of TestFlight if the behavior of the App is other than on the device of a Apple reviewer? And even the Apple reviewer isn't able to say what causes this message. The only think I can try is to install the App on a real device (without TestFlight) and test / debug again.

danielplappert commented 6 years ago

Problem solved. Because the in-app purchases weren’t reviewed and approved by Apple, it wasn’t possible to buy them. The reviewer didn’t see that and approved the in-app purchases. After pointing them to this issue, they approved the purchases, retested the app and approved the app too. @Screeze thanks for pointing to me to the in-app purchase status.

FlawaCLV commented 6 years ago

I have a weird issue. The Apple reviewer said that the IAP works on iPhone but not on an iPad running iOS 11.2.6. Any idea ? What are the iOS lowest compatibility of this plugin ?