-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[in_app_purchase_storekit] isIntroductoryOfferEligible implementation #9499
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
Merged
auto-submit
merged 17 commits into
flutter:main
from
givip:feature_isIntroductoryEligible
Jul 7, 2025
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
dec92ba
isIntroductoryEligible implementation
givip 614e68e
Added comments
givip fe4873b
Added tests
givip 52fa727
Fix format
givip 0804bb3
Fix
givip 8c03e8a
Added comment
givip 8471499
Merge branch 'main' into feature_isIntroductoryEligible
givip d2f5836
Added #available for iOS/macOS
givip a681eed
Merge branch 'main' into feature_isIntroductoryEligible
givip 80bf552
Merge branch 'main' into feature_isIntroductoryEligible
givip aba0a61
Fix according PR comments
givip 52302b3
Merge branch 'feature_isIntroductoryEligible' of github.com:givip/pac…
givip 0cbcd7c
Merge branch 'main' into feature_isIntroductoryEligible
givip 96fc326
Fixed typos
givip 2d73870
Merge branch 'feature_isIntroductoryEligible' of github.com:givip/pac…
givip ea93c81
Merge branch 'main' into feature_isIntroductoryEligible
givip 272adf4
Updated comment
givip File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
packages/in_app_purchase/in_app_purchase_storekit/CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
Hi @LouiseHsu it looks like the extension where
isIntroductoryOfferEligibleis defined has this availability annotation:packages/packages/in_app_purchase/in_app_purchase_storekit/darwin/in_app_purchase_storekit/Sources/in_app_purchase_storekit/StoreKit2/InAppPurchasePlugin+StoreKit2.swift
Lines 7 to 8 in 80bf552
Does this mean if the developer's app's target iOS version is < 15.0 they'll get a compile time error from the plugin code (even if they're not using these new APIs at all?)
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.
No, availability annotation on extensions will compile fine on lower device version, it just cannot reference any code inside that extension!
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 it looks like the
InAppPurchase2APIcalls are all placed inside anavailablecheck:So I guess if the application target's min iOS version is lower than 15 the caller would get a runtime error if they try to access methods defined in that extension, since the method channel is not set up?