-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[google_maps_flutter] Add examples for different iOS versions #3757
[google_maps_flutter] Add examples for different iOS versions #3757
Conversation
This looks like a huge review, but the ios12/ and ios13/ folders are just exact copies of the ios11 folder with:
|
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.
LGTM
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.
- How is this building/running tests? Or is it? The flutter tool doesn't know anything about an
ios11
directory but would be looking for anios
directory. - Is there a way we can do this that just updates the minimum version instead of duplicating everything needed for the platform directory? For example, keep the single
ios
directory but have 3 app targets with different versions? Or set an environment variable the Podfile can parse like (I didn't test this):
min_ios_version = ENV["MINIMUM_IOS_VERSION"] || '11.0'
platform :ios, min_ios_version
plus maybe an xcconfig that can be set for the IPHONEOS_DEPLOYMENT_TARGET
?
packages/google_maps_flutter/google_maps_flutter_ios/example/ios11/README.md
Outdated
Show resolved
Hide resolved
The tooling sees that there are three examples, and reacts accordingly. For
We'd have to build bespoke tooling that knew how to set all of this up, and also run different sets of tests for each scenario (e.g., we don't want to run integration tests three times because it would add a bunch of CI time for minimal benefit). It's doable, but it seems like a lot more trouble than just having several copies of files that are almost all just boilerplate. I could extract the Dart for the example to a shared path-based package, so we don't have three copies of that. That would be easy, and since that part isn't boilerplate it would reduce maintenance if we need to update the examples. I was going back and forth on it because it'll make the structure a little weirder, but it's probably better on the whole to have the one copy. |
The Dart code is now shared, so what's copied is almost 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.
Thanks for the explanation @stuartmorgan, and for getting these tested. LGTM
8244aa1
to
f8ae53f
Compare
auto label is removed for flutter/packages, pr: 3757, due to - The status or check suite android-platform_tests CHANNEL:master PACKAGE_SHARDING:--shardIndex 0 --shardCount 7 has failed. Please fix the issues identified (or deflake) before re-applying this label.
|
auto label is removed for flutter/packages, pr: 3757, due to - The status or check suite android-platform_tests CHANNEL:master PACKAGE_SHARDING:--shardIndex 1 --shardCount 7 has failed. Please fix the issues identified (or deflake) before re-applying this label. |
flutter/packages@746750e...7e3f5da 2023-04-20 stuartmorgan@google.com [google_maps_flutter] Add examples for different iOS versions (flutter/packages#3757) 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,rmistry@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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
* main: (144 commits) Update test golden images for the latest Skia roll (flutter#3787) [various] Adds Android namespace (flutter#3791) [shared_preferences] Update gradle/agp in example apps (flutter#3809) [go_router] Adds name to TypedGoRoute (flutter#3702) [webview_flutter] Adds support to receive permission requests (flutter#3543) [google_sign_in] Fix Android Java warnings (flutter#3762) [local_auth] Fix enum return on Android (flutter#3780) [pigeon] Warn when trying to use enums in collections (flutter#3782) [webview_flutter_android] [webview_flutter_wkwebview] Platform implementations for supporting permission requests (flutter#3792) [pigeon] Update for compatibility with a future change to the analyzer. (flutter#3789) [camera_android] Fix Android lint warnings (flutter#3716) [webview_flutter_platform_interface] Adds method to receive permission requests (flutter#3767) [image_picker_ios] In unit test write and read kCGImagePropertyExifUserComment property (flutter#3783) [go_router_builder] Fixed the return value of the generated push method (flutter#3650) [image_picker] Mention `launchMode: singleInstance` in README (flutter#3759) Revert "[pigeon] Add an initial example app" (flutter#3785) [google_maps_flutter] Add examples for different iOS versions (flutter#3757) [pigeon] Add an initial example app (flutter#3761) [google_maps_flutter_web] Allow marker position updates (flutter#3697) [Tool] [Code Excerpt] allow excerpts in example readme (flutter#3758) ... # Conflicts: # packages/camera/camera/pubspec.yaml
…r#3757) Improves the way we specify and test the `GoogleMaps` SDK dependency on iOS. Currently as discussed in flutter/flutter#86820, we are allowing any version of the SDK, and CocoaPods will choose the best version that's compatible with the minimum iOS deployment version of the plugin client's app. However, clients are also subject to future breakage, since any new major SDK version could have compile-time incompatibility with the plugin's wrapping code. We also have no ability to test anything in CI that's newer than the SDK that supports our oldest supported version (currently that's iOS 11, and thus 5.x). This makes two changes: - Replaces the single example with N examples, each with a different minimum iOS version, corresponding to each point where the Google Maps SDK has bumped its minimum iOS requirement. Currently (as documented in the new README file) - The oldest example has all of the current testing. - The newest example has just XCTests (not integration or XCUITests). - Intervening examples have no tests. - Instead of the completely unpinned version, we allow anything up to the next major version (which should be the first one with breaking API changes). This gives us build coverage of each of the (latest at CI runtime) resolve points that clients can have. We retain the flexibility of allowing clients to get the best version that meets their app's constraints, except that we will need to explicitly test and enable new major versions, so that they won't randomly break clients. Fixes flutter/flutter#86820
Improves the way we specify and test the
GoogleMaps
SDK dependency on iOS. Currently as discussed in flutter/flutter#86820, we are allowing any version of the SDK, and CocoaPods will choose the best version that's compatible with the minimum iOS deployment version of the plugin client's app. However, clients are also subject to future breakage, since any new major SDK version could have compile-time incompatibility with the plugin's wrapping code. We also have no ability to test anything in CI that's newer than the SDK that supports our oldest supported version (currently that's iOS 11, and thus 5.x).This makes two changes:
This gives us build coverage of each of the (latest at CI runtime) resolve points that clients can have. We retain the flexibility of allowing clients to get the best version that meets their app's constraints, except that we will need to explicitly test and enable new major versions, so that they won't randomly break clients.
Fixes flutter/flutter#86820
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).