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

Invalid duration of products - iOS SDK #94

Closed
saqibomer opened this issue Dec 13, 2020 · 3 comments
Closed

Invalid duration of products - iOS SDK #94

saqibomer opened this issue Dec 13, 2020 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@saqibomer
Copy link

saqibomer commented Dec 13, 2020

Product list shows invalid duration. I have an annual and quarterly product defined in product centre. Response shows duration as 2 and 4.

Qonversion.products { productsList, error in
     print(productsList)
}

And here is response

key: "premium_plan_quarterly", value: <QNProduct: id=premium_plan_quarterly,
storeID=premium_plan_quarterly,
type=1,
duration=2,
skProduct=<SKProduct: 0x28075ccf0>,
>
@smejl smejl added the bug Something isn't working label Dec 13, 2020
@suriksarkisyan suriksarkisyan removed the bug Something isn't working label Dec 14, 2020
@suriksarkisyan
Copy link
Contributor

suriksarkisyan commented Dec 14, 2020

Hi, @saqibomer
That's how Enum's works in Objective-C.
Obj-C supports only Int enums and as you can see in QNProductDuration, QNProductDurationAnnual is equal 4 and QNProductDuration3Months is equal 2.
But the misunderstanding is possible so in the next SDK update we will add more info for Enums printing in log. I think we can print string value and raw (int) value for Enums like QNProductDuration.

@saqibomer
Copy link
Author

I figured it out it was enum not actual duration. It would be good it instead of enums we get string and int values.

@suriksarkisyan
Copy link
Contributor

suriksarkisyan commented Dec 14, 2020

What reason do you need the string value for? To use in the code or to understand the code and logs?
We can not add a universal string value that can be used in code and UI for all of our users. Basically, developers are just checking enum value and configuring the text for UI by themselves.

@suriksarkisyan suriksarkisyan added the help wanted Extra attention is needed label Dec 24, 2020
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
Development

No branches or pull requests

3 participants