-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[in_app_purchase_storekit] Add support to win back offers / promotional offers #8474
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
Conversation
…2-win-back-offers' into feature/in-app-purchase-storekit2-win-back-offers
|
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! |
|
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 |
…se-storekit2-win-back-offers # Conflicts: # packages/in_app_purchase/in_app_purchase_storekit/CHANGELOG.md
|
Hi @LouiseHsu, when you have a moment, could you please take a look at this PR? Thanks |
…se-storekit2-win-back-offers # Conflicts: # packages/in_app_purchase/in_app_purchase_storekit/CHANGELOG.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation! LGTM (with nits and a few more questions).
...ages/in_app_purchase/in_app_purchase_storekit/lib/src/in_app_purchase_storekit_platform.dart
Outdated
Show resolved
Hide resolved
|
|
||
| var nonceAsUUID: UUID { | ||
| guard let uuid = UUID(uuidString: nonce) else { | ||
| fatalError("Invalid UUID format for nonce: \(nonce)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I didn't know it was an existing pattern. In that case if there's a better way to handle these errors more gracefully we can refactor those later.
..._app_purchase_storekit/Sources/in_app_purchase_storekit/StoreKit2/StoreKit2Translators.swift
Show resolved
Hide resolved
| Future<bool> buyNonConsumable({required PurchaseParam purchaseParam}) async { | ||
| if (_useStoreKit2) { | ||
| final SK2ProductPurchaseOptions options = SK2ProductPurchaseOptions( | ||
| late SK2ProductPurchaseOptions options; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(This doesnt seem to have been addressed).
| final SK2ProductPurchaseOptions options = SK2ProductPurchaseOptions( | ||
| late SK2ProductPurchaseOptions options; | ||
|
|
||
| if (purchaseParam is Sk2PurchaseParam) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the detailed explanation! That sounds good to me. From reading the docs it seems that store_kit_2_wrappers and store_kit_wrappers are supposed to reflect the store kit 2 and store kit 1 API and the platform agnostic abstraction happens in in-app-purchase and in-app-purchase-storekit, I believe that's inline with what you said.
So with this patch developers would be able to use win back offers, but only with in_app_purchase_storekit / store_kit_2_wrappers?
|
autosubmit label was removed for flutter/packages/8474, because This PR has not met approval requirements for merging. Changes were requested by {stuartmorgan-g}, please make the needed changes and resubmit this PR.
|
|
@stuartmorgan-g do you have any outstanding concerns about this PR? |
|
Sorry, I didn't realize I still had a blocking request on this. |
… promotional offers (flutter/packages#8474)
flutter/packages@4463066...1765c95 2025-06-03 [email protected] [video_player] Platform view support (flutter/packages#8810) 2025-06-02 [email protected] [in_app_purchase_storekit] Add support to win back offers / promotional offers (flutter/packages#8474) 2025-06-02 [email protected] [two_dimensional_scrollables] Enable multi-cell/single-cell text selection in Simple Table example (flutter/packages#8189) 2025-05-30 [email protected] [all_packages] Bump `compileSdk` version to 35 (flutter/packages#9168) 2025-05-30 [email protected] Roll Flutter (stable) from be698c4 to b25305a (11 revisions) (flutter/packages#9342) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…al offers (flutter#8474) **Adds StoreKit2 support for**: - **Win Back Offers** (requires Xcode 16 or later) - New `isWinBackOfferEligible` 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
…al offers (flutter#8474) **Adds StoreKit2 support for**: - **Win Back Offers** (requires Xcode 16 or later) - New `isWinBackOfferEligible` 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
Adds StoreKit2 support for:
isWinBackOfferEligiblemethod for eligibility checksappAccountTokenhandling for StoreKit2 purchasesFixes:
flutter/flutter#161393
flutter/flutter#160826
Pre-launch Checklist
dart format.)[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or this PR is exempt from CHANGELOG changes.///).