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

[in_app_purchase_storekit] Add support to win back offers / promotional offers #8474

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

kaiquegazola
Copy link

@kaiquegazola kaiquegazola commented Jan 22, 2025

Adds StoreKit2 support for:

  • Win Back Offers (requires Xcode 16 or later)
    • New checkWinBackOfferEligibility method for eligibility checks
  • Promotional Offers
  • Fixes introductory pricing handling in promotional offers list
  • Fixes appAccountToken handling for StoreKit2 purchases

Fixes:
flutter/flutter#161393
flutter/flutter#160826

Pre-launch Checklist

Sorry, something went wrong.

Verified

This commit was signed with the committer’s verified signature. The key has expired.
kaiquegazola Kaique Gazola

Verified

This commit was signed with the committer’s verified signature. The key has expired.
kaiquegazola Kaique Gazola

Verified

This commit was signed with the committer’s verified signature. The key has expired.
kaiquegazola Kaique Gazola

Verified

This commit was signed with the committer’s verified signature. The key has expired.
kaiquegazola Kaique Gazola

Verified

This commit was signed with the committer’s verified signature. The key has expired.
kaiquegazola Kaique Gazola

Verified

This commit was signed with the committer’s verified signature. The key has expired.
kaiquegazola Kaique Gazola

Verified

This commit was signed with the committer’s verified signature. The key has expired.
kaiquegazola Kaique Gazola
kaiquegazola and others added 3 commits January 21, 2025 23:35

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…ffers

Verified

This commit was signed with the committer’s verified signature. The key has expired.
kaiquegazola Kaique Gazola

Verified

This commit was signed with the committer’s verified signature. The key has expired.
kaiquegazola Kaique Gazola
…2-win-back-offers' into feature/in-app-purchase-storekit2-win-back-offers
@LouiseHsu
Copy link
Contributor

Hey just letting you know Ive looked at your PR, and it looks really good! I've checked out your branch and it seems to work well locally. However our tests are failing to compile because currently they're running on ios 17.0. I'm taking a look to see if theres a way around this, but if you want to try building your branch on Xcode 15 or lower that would be really helpful too!

@kaiquegazola
Copy link
Author

Thanks for for testing it locally

It seems we’re currently blocked by flutter/flutter#148870. Also, I think we should add a CHANGELOG warning regarding this Xcode requirement.

Maybe an #if compiler directive could help here, but I haven’t tested it yet, so I’m not sure if it actually works. Let me know what you think

Verified

This commit was signed with the committer’s verified signature. The key has expired.
kaiquegazola Kaique Gazola
…se-storekit2-win-back-offers

# Conflicts:
#	packages/in_app_purchase/in_app_purchase_storekit/CHANGELOG.md
@kaiquegazola kaiquegazola marked this pull request as draft January 30, 2025 19:37
kaiquegazola and others added 8 commits January 30, 2025 21:58

Verified

This commit was signed with the committer’s verified signature. The key has expired.
kaiquegazola Kaique Gazola

Verified

This commit was signed with the committer’s verified signature. The key has expired.
kaiquegazola Kaique Gazola

Verified

This commit was signed with the committer’s verified signature. The key has expired.
kaiquegazola Kaique Gazola

Verified

This commit was signed with the committer’s verified signature. The key has expired.
kaiquegazola Kaique Gazola

Verified

This commit was signed with the committer’s verified signature. The key has expired.
kaiquegazola Kaique Gazola

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…ffers

Verified

This commit was signed with the committer’s verified signature. The key has expired.
kaiquegazola Kaique Gazola

Verified

This commit was signed with the committer’s verified signature. The key has expired.
kaiquegazola Kaique Gazola
@kaiquegazola kaiquegazola marked this pull request as ready for review January 31, 2025 03:14
@kaiquegazola
Copy link
Author

Hi @LouiseHsu, when you have a moment, could you please take a look at this PR? Thanks

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…ffers
@stuartmorgan stuartmorgan added the triage-ios Should be looked at in iOS triage label Mar 6, 2025
purchaseOptions.insert(.appAccountToken(accountTokenUUID))
}

#if compiler(>=6.0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe an #if compiler directive could help here, but I haven’t tested it yet, so I’m not sure if it actually works. Let me know what you think

We should not land code that does not compile in our CI. For example, we have no way of knowing whether these tests will actually pass in our CI, meaning they could block future Xcode updates, and we also aren't actually getting any test coverage that would prevent landing a future PR that breaks this new code or the associated tests.

If the feature requires an SDK version we don't yet have in CI, we need to wait for that SDK to be in CI to proceed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants