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

Is there a way to check if user is eligible for a trial on iOS? #309

Open
MrJohn10 opened this issue Feb 1, 2025 · 1 comment
Open

Is there a way to check if user is eligible for a trial on iOS? #309

MrJohn10 opened this issue Feb 1, 2025 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@MrJohn10
Copy link

MrJohn10 commented Feb 1, 2025

I want to check if the user is eligible for trial for a given offering. Is there a way to call checkTrialOrIntroDiscountEligibility from the iOS sdk or another way I can get that data?

this is my code right now.:

        return when (getPlatform().os) {
            OS.Android -> {
                if (offering?.availablePackages?.any { it.storeProduct.subscriptionOptions?.freeTrial != null } == true) {
                    offering
                } else {
                    null
                }
            }

            OS.Ios -> {
                // todo
            }
        }
@MrJohn10 MrJohn10 added the enhancement New feature or request label Feb 1, 2025
@JayShortway
Copy link
Member

Hi, thanks for raising this! It seems like this api is indeed missing from purchases-kmp. We'll work on getting it added, and keep this issue updated. Stay tuned!

@JayShortway JayShortway self-assigned this Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants