Repository navigation
[in_app_purchase_storekit] Suppress StoreKit 1 deprecation warnings - #13301
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If both you and the PR author believe this PR qualifies for a test exemption, escalate to the tech lead for the changed area to review and apply the |
There was a problem hiding this comment.
Code Review
This pull request suppresses deprecation warnings for StoreKit 1 APIs in the Objective-C codebase of the 'in_app_purchase_storekit' package using clang diagnostic pragmas. It also updates the Swift translator to use 'Locale.currency?.identifier' instead of the deprecated 'Locale.currencyCode' on iOS 16.0+ and macOS 13.0+. Finally, the package version is bumped to '0.4.13+4'. There are no review comments, and I have no feedback to provide.
|
autosubmit label was removed for flutter/packages/13301, because - This pull request has the |
|
text-exempting myself: refactor with no semantic change The |
StoreKit 1 is intentionally used as the fallback on iOS < 18 and macOS < 15. With SWIFT_TREAT_WARNINGS_AS_ERRORS enabled, the Swift compiler builds the in_app_purchase_storekit_objc Clang module at the SDK triple with -Werror, so the iOS 18 deprecations of SKProduct et al. in the public headers fail the build. Wrap the StoreKit 1 ObjC sources in -Wdeprecated-declarations suppression.
Locale.currencyCode was deprecated in iOS 16 / macOS 13. With SWIFT_TREAT_WARNINGS_AS_ERRORS and CI's --ios-min-version=16.0 this fails analyze. Use Locale.currency on those versions and keep the old accessor only for the older fallback.
8389002 to
36e8ce0
Compare
flutter/packages@10a178c...618afba 2026-10-20 [email protected] [pigeon] add version checking for objective_c and jni dependencies (flutter/packages#13283) 2026-10-19 [email protected] [go_router_builder] Adopt shared analyzer helpers from source_helper: ^1.4.0 (flutter/packages#13337) 2026-10-19 [email protected] [pigeon] fix instance manager test flake (flutter/packages#13303) 2026-10-19 [email protected] [vector_graphics] Don't report a handled loading error as unhandled (flutter/packages#13315) 2026-10-19 [email protected] [file_selector_macos] Drop deprecated allowedFileTypes code path (flutter/packages#13302) 2026-10-19 [email protected] [shared_preferences_android] Update androidx.datastore:datastore to 1.2.1 (flutter/packages#13334) 2026-10-19 [email protected] [in_app_purchase_storekit] Suppress StoreKit 1 deprecation warnings (flutter/packages#13301) 2026-10-19 [email protected] [camera_avfoundation] Fix Swift analyzer issue _captureSessionQueue (flutter/packages#13332) 2026-10-19 [email protected] [material_ui] Unskip web tests that pass on CanvasKit and Skwasm: color_scheme_test, elevated_button_test, filled_button_test, icon_button_test (flutter/packages#13327) 2026-10-19 [email protected] [in_app_purchase_android] Update to Play Billing Library 9.1.0 (flutter/packages#12781) 2026-10-19 [email protected] [webview_flutter_wkwebview] Require iOS 15 / macOS 12 and drop deprecated SecTrustGetCertificateAtIndex code path (flutter/packages#13294) If this roll has caused a breakage, revert this CL and set the roller to dry run mode 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
flutter/packages@10a178c...618afba 2026-10-20 [email protected] [pigeon] add version checking for objective_c and jni dependencies (flutter/packages#13283) 2026-10-19 [email protected] [go_router_builder] Adopt shared analyzer helpers from source_helper: ^1.4.0 (flutter/packages#13337) 2026-10-19 [email protected] [pigeon] fix instance manager test flake (flutter/packages#13303) 2026-10-19 [email protected] [vector_graphics] Don't report a handled loading error as unhandled (flutter/packages#13315) 2026-10-19 [email protected] [file_selector_macos] Drop deprecated allowedFileTypes code path (flutter/packages#13302) 2026-10-19 [email protected] [shared_preferences_android] Update androidx.datastore:datastore to 1.2.1 (flutter/packages#13334) 2026-10-19 [email protected] [in_app_purchase_storekit] Suppress StoreKit 1 deprecation warnings (flutter/packages#13301) 2026-10-19 [email protected] [camera_avfoundation] Fix Swift analyzer issue _captureSessionQueue (flutter/packages#13332) 2026-10-19 [email protected] [material_ui] Unskip web tests that pass on CanvasKit and Skwasm: color_scheme_test, elevated_button_test, filled_button_test, icon_button_test (flutter/packages#13327) 2026-10-19 [email protected] [in_app_purchase_android] Update to Play Billing Library 9.1.0 (flutter/packages#12781) 2026-10-19 [email protected] [webview_flutter_wkwebview] Require iOS 15 / macOS 12 and drop deprecated SecTrustGetCertificateAtIndex code path (flutter/packages#13294) If this roll has caused a breakage, revert this CL and set the roller to dry run mode 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
StoreKit 1 is intentionally used as the fallback on iOS < 15 and macOS < 12. With
SWIFT_TREAT_WARNINGS_AS_ERRORSenabled, the in_app_purchase_storekit_objc module is built with -Werror, so the iOS 18 deprecations of StoreKit1 in the public headers fail the build. Wrap the StoreKit 1 ObjC sources in -Wdeprecated-declarations suppression.Also wrap deprecated
Locale.currencyCodein availability.This wasn't showing up in CI due to flutter/flutter#194517.
Fixes flutter/flutter#170442
Pre-Review Checklist
[shared_preferences]///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.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