-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/packages
#8900Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Fluttergood first issueRelatively approachable for first-time contributorsRelatively approachable for first-time contributorsp: in_app_purchasePlugin for in-app purchasePlugin for in-app purchasepackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-iosiOS applications specificallyiOS applications specificallyteam-iosOwned by iOS platform teamOwned by iOS platform teamtriaged-iosTriaged by iOS platform teamTriaged by iOS platform team
Description
Steps to reproduce
InAppPurchase.instance.countryCode() uses SKStorefront, which is deprecated.
StoreFront should be used instead.
Expected results
As official Flutter package, this should update to latest standard to avoid any future inconveniences and bugs.
Actual results
Package uses deprecated Classes.
Code sample
Code sample
/// Returns the user's country.
///
/// Android:
/// Returns Play billing country code based on ISO-3166-1 alpha2 format.
///
/// See: https://developer.android.com/reference/com/android/billingclient/api/BillingConfig
/// See: https://unicode.org/cldr/charts/latest/supplemental/territory_containment_un_m_49.html
///
/// iOS:
/// Returns the country code from SKStoreFrontWrapper.
///
/// See: https://developer.apple.com/documentation/storekit/skstorefront?language=objc
///
///
Future<String> countryCode() => InAppPurchasePlatform.instance.countryCode();Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.24.4, on macOS 15.3.1 24D70 darwin-arm64, locale de-DE)
• Flutter version 3.24.4 on channel stable at /Users/christiankonnerth/fvm/versions/3.24.4
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 603104015d (5 months ago), 2024-10-24 08:01:25 -0700
• Engine revision db49896cf2
• Dart version 3.5.4
• DevTools version 2.37.3
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/to/macos-android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[✓] Xcode - develop for iOS and macOS (Xcode 16.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16B40
• CocoaPods version 1.16.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[!] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.dev/to/macos-android-setup for detailed instructions).
[✓] Connected device (5 available)
• iPhone von Chris (mobile) • 00008120-000E20E43E44C01E • ios • iOS 18.1.1 22B91
• iPhone 16 Pro (mobile) • A70C6685-6F1B-478E-942C-512E33DB11CD • ios •
com.apple.CoreSimulator.SimRuntime.iOS-18-1 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 15.3.1 24D70 darwin-arm64
• Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 15.3.1 24D70 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 134.0.6998.118
[✓] Network resources
• All expected network resources are available.
! Doctor found issues in 2 categories.Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Fluttergood first issueRelatively approachable for first-time contributorsRelatively approachable for first-time contributorsp: in_app_purchasePlugin for in-app purchasePlugin for in-app purchasepackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-iosiOS applications specificallyiOS applications specificallyteam-iosOwned by iOS platform teamOwned by iOS platform teamtriaged-iosTriaged by iOS platform teamTriaged by iOS platform team