Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BuySubscription not works in IOS #306

Closed
wesleymonaro opened this issue Oct 30, 2018 · 20 comments
Closed

BuySubscription not works in IOS #306

wesleymonaro opened this issue Oct 30, 2018 · 20 comments
Labels
🙏 help wanted Extra attention is needed 📱 iOS Related to iOS

Comments

@wesleymonaro
Copy link

Version of react-native-iap

2.3.13
"react": "16.2.0",
"react-native": "0.53.0",

Platforms you faced the error (IOS or Android or both?)

IOS only

Expected behavior

Call a window to confirm the subscription

Actual behavior

Not firing any windows or message

Tested environment (Emulator? Real Device?)

Both, iOS 11.4

Steps to reproduce the behavior

Hi!
I need to call a buySubscription method, but only in IOS not firing any message or error. I tried to change the react-native-iap version, since 1.4.0, but have the same

image

Is the first product in this app. Android works fine.

@wesleymonaro
Copy link
Author

Information, I included a catch, to see any error message, but nothing happens :/

@hyochan hyochan added 🙏 help wanted Extra attention is needed 📱 iOS Related to iOS labels Oct 30, 2018
@hyochan
Copy link
Member

hyochan commented Oct 30, 2018

@wesleymonaro Please try 2.3.17 and comeback. We've tried to resolve this from 2.3.16.

@wesleymonaro
Copy link
Author

@dooboolab Nothing :/
react-native-iap reinstaled, with link comand line, and i tried manually too. Same problem. Nothing is fired

@wesleymonaro
Copy link
Author

Question: Even though Apple has not yet approved the new version of the app with IAP, something should come up, right?

@hyochan
Copy link
Member

hyochan commented Oct 31, 2018

@JJMoon can you test this out for him?

@JJMoon
Copy link
Contributor

JJMoon commented Oct 31, 2018

Did you make sandbox tester and test with that account in real device ?

@wesleymonaro
Copy link
Author

@JJMoon Yes. I created a sandbox account, and the test was maked in a real device

@alorr10
Copy link

alorr10 commented Nov 5, 2018

Having this same problem too. Version 2.3.17. I call buyProduct(itemSKU) and no prompt comes up, the promise never gets resolved.

@JJMoon
Copy link
Contributor

JJMoon commented Nov 5, 2018

@wesleymonaro Did you try buyProduct or buySubscription? I hope you test at least twice. In sandbox mode, the first try doesn't work most of time.
@alorr10 If you tried buyProduct, this is another issue. I ask you to try with new sandbox tester and in real device.

@wesleymonaro
Copy link
Author

@JJMoon Both methods. The same problem

@JJMoon
Copy link
Contributor

JJMoon commented Nov 8, 2018

@wesleymonaro Would you test with the example of this module? It's tested.
Just change product names, bundle id, you are ready to test.

@ollyde
Copy link

ollyde commented Nov 8, 2018

Also Facing the same problem. IAP not working with RNIap.buySubscription('sub')

I can see the subscriptions with RNIap.getSubscriptions(itemSkus)

I get an unknown error which is very unhelpful

Error buying subscription Error: Cannot connect to iTunes Store
    at createErrorFromErrorData (dd63c188-0127-4d7b-bb0d-25aec5491f8a:2435)
    at dd63c188-0127-4d7b-bb0d-25aec5491f8a:2387
    at MessageQueue.__invokeCallback (dd63c188-0127-4d7b-bb0d-25aec5491f8a:2827)
    at dd63c188-0127-4d7b-bb0d-25aec5491f8a:2574
    at MessageQueue.__guard (dd63c188-0127-4d7b-bb0d-25aec5491f8a:2731)
    at MessageQueue.invokeCallbackAndReturnFlushedQueue (dd63c188-0127-4d7b-bb0d-25aec5491f8a:2573)
    at t (RNDebuggerWorker.js:1)

Completely stuck for now.

@hyochan
Copy link
Member

hyochan commented Nov 15, 2018

getSubscriptions should be called first before actually call buySubscription in ios. Also make sure you've done this.

@JulianKingman
Copy link

JulianKingman commented Nov 15, 2018

I'm getting this error when trying to change a subscription (buySubscription a second time with a different product ID).
Edit: Apparently my result is known and expected. Lots of Stack Overflow and Apple Support forum posts on the subject. I filed a bug report about it.

@hyochan
Copy link
Member

hyochan commented Dec 15, 2018

@JulianKingman This wasn't in my test case so it is hard for me to test out. Could you provide some example that I may look closer?

@JJMoon
Copy link
Contributor

JJMoon commented Dec 15, 2018

I tested yesterday, RNIap.buyProductWithoutFinishTransaction works. Can you share the source code?

@edo1493
Copy link

edo1493 commented Dec 21, 2018

I see this when trying to switch plans. For example I buy a subscription via buyProductWithoutFinishTransaction and then try to buy a different plan. I get the error on the second try.

@JulianKingman
Copy link

@hyochan I don't think there's a solution for this. As an example if you have 2 subscriptions in the same subscription group with different prices, purchase one, then upgrade to the other, then you get the error.

@hyochan
Copy link
Member

hyochan commented Dec 22, 2018

@JulianKingman Since your issue has a different personality compared to the previous one, I hope you to open a new issue. Also, since we are working on some other solutions, I hope you can try PRing too. Thanks.

@hyochan hyochan closed this as completed Dec 22, 2018
@hyochan
Copy link
Member

hyochan commented Dec 22, 2018

@JulianKingman Your issue may be followed up in #274.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙏 help wanted Extra attention is needed 📱 iOS Related to iOS
Projects
None yet
Development

No branches or pull requests

7 participants