adaptyteam / AdaptySDK-React-Native

React Native SDK for growing in-app subscriptions
https://docs.adapty.io/docs/quickstart
MIT License
125 stars 12 forks source link

Issue about getProductsIntroductoryOfferEligibility #86

Closed cheuchheang closed 1 year ago

cheuchheang commented 1 year ago

Description

Dear Adapty team,

I have a question regarding a new method that is just available in version 2.6.0 getProductsIntroductoryOfferEligibility. I would you to use it to check if the users are eligible for the trial or not, but I faced the issue: Following the doc, using this line of codeadapty.getProductsIntroductoryOfferEligibility(products), it shows me the error as attached file. Could you check why this error happens?

Note: There are products with the trial and products without the trial in the paywall.

code

Simulator Screen Shot - iPhone 14 Pro - 2023-09-14 at 14 10 21

divanc commented 1 year ago

Hey, @cheuchheang! How do you evaded pull request form? :D I can see it is iOS, I bet it is ios-only, and presumably not Expo

Can you tell me your RN version?

divanc commented 1 year ago

I just checked with our native dev team, we must not fire native callbacks twice, so this is not ok at all

Is this reproducible at your side? If yes, I will need your help!

We need verbose native logs to understand why function tries to return response two times.

That is done via: 1) When you call activate, set log level to verbose like:

await adapty.activate('MY_KEY', {
  logLevel: 'verbose',
});

2) Run your app via Xcode and open Xcode logs 3) Try to reproduce behavior and just export the log file. You might have some confidential data there, so it is best to send it to Adapty support and just say that you are the issue guy, they'll fetch me :)

divanc commented 1 year ago

I hope, your issue is resolved without our assistance by now, we will close issue and thoroughly check double responses possibilities.

Please feel free to re-open if you still experience any problem like this