Uh oh!
There was an error while loading. Please reload this page.
[in_app_purchase_storekit] isIntroductoryOfferEligible implementation - #9499
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| isIntroductoryOfferEligibleChannel.setMessageHandler { message, reply in | ||
| let args = message as! [Any?] | ||
| let productIdArg = args[0] as! String | ||
| api.isIntroductoryOfferEligible(productId: productIdArg) { result in |
There was a problem hiding this comment.
Hi @LouiseHsu it looks like the extension where isIntroductoryOfferEligible is defined has this availability annotation:
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.
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.
Ah it looks like the InAppPurchase2API calls are all placed inside an available check:
if #available(iOS 15.0, macOS 12.0, *) {
InAppPurchase2APISetup.setUp(binaryMessenger: messenger, api: instance)
}
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?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
givip
commented
Jul 7, 2025
@LouiseHsu could you check PR please? |
LouiseHsu
left a comment
There was a problem hiding this comment.
lgtm, sorry for the delay!
flutter/packages@e4fd6c0...2c52f24 2025-07-07 pataridzegivi@gmail.com [in_app_purchase_storekit] isIntroductoryOfferEligible implementation (flutter/packages#9499) 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 flutter-ecosystem@google.com 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
flutter/packages@e4fd6c0...2c52f24 2025-07-07 pataridzegivi@gmail.com [in_app_purchase_storekit] isIntroductoryOfferEligible implementation (flutter/packages#9499) 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 flutter-ecosystem@google.com 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
flutter/packages@e4fd6c0...2c52f24 2025-07-07 pataridzegivi@gmail.com [in_app_purchase_storekit] isIntroductoryOfferEligible implementation (flutter/packages#9499) 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 flutter-ecosystem@google.com 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
…flutter#9499) Added `isEligibleForIntroOffer` method support https://developer.apple.com/documentation/storekit/product/subscriptioninfo/iseligibleforintrooffer ## Pre-Review Checklist [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
flutter/packages@e4fd6c0...2c52f24 2025-07-07 pataridzegivi@gmail.com [in_app_purchase_storekit] isIntroductoryOfferEligible implementation (flutter/packages#9499) 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 flutter-ecosystem@google.com 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
…flutter#9499) Added `isEligibleForIntroOffer` method support https://developer.apple.com/documentation/storekit/product/subscriptioninfo/iseligibleforintrooffer ## Pre-Review Checklist [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
…flutter#9499) Added `isEligibleForIntroOffer` method support https://developer.apple.com/documentation/storekit/product/subscriptioninfo/iseligibleforintrooffer ## Pre-Review Checklist [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
Added
isEligibleForIntroOffermethod supporthttps://developer.apple.com/documentation/storekit/product/subscriptioninfo/iseligibleforintrooffer
Pre-Review Checklist
[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩↩2↩3