-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[google_maps_flutter] Add examples for different iOS versions #3757
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
stuartmorgan-g:maps-ios-multi-os-examples
Apr 20, 2023
Merged
Changes from 13 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
344047a
Move existing example to subdirectory
stuartmorgan-g 7288b15
Add new top-level README
stuartmorgan-g ec6ec67
Add version to README
stuartmorgan-g c0b30e0
Add an iOS 12 copy without integration or XCUI tests
stuartmorgan-g b371337
Add an iOS 13 copy
stuartmorgan-g 81aa57c
Fix paths
stuartmorgan-g bbdbb20
Trim tests, update docs
stuartmorgan-g 752be0c
Re-run ios13 build with right version
stuartmorgan-g 18dde51
Add a partial version pin
stuartmorgan-g 5ee49d0
More docs
stuartmorgan-g 896d7cb
Version bump
stuartmorgan-g 7f432c8
Relax readme check slightly
stuartmorgan-g 006b8cf
Remove cruft from iOS 12 version's Podfile
stuartmorgan-g ac8ee27
Wording improvement
stuartmorgan-g 59a8caa
Share Dart code
stuartmorgan-g f8ae53f
Improve readmes
stuartmorgan-g bfb05b8
Merge branch 'main' into maps-ios-multi-os-examples
stuartmorgan-g 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
5 changes: 5 additions & 0 deletions
5
packages/google_maps_flutter/google_maps_flutter_ios/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
51 changes: 44 additions & 7 deletions
51
packages/google_maps_flutter/google_maps_flutter_ios/example/README.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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,46 @@ | ||
| # Platform Implementation Test App | ||
| # Platform Implementation Test Apps | ||
|
|
||
| This is a test app for manual testing and automated integration testing | ||
| of this platform implementation. It is not intended to demonstrate actual use of | ||
| this package, since the intent is that plugin clients use the app-facing | ||
| package. | ||
| These are test apps for manual testing and automated integration testing | ||
| of this platform implementation. They are not intended to demonstrate actual | ||
| use of this package, since the intent is that plugin clients use the | ||
| app-facing package. | ||
|
|
||
| Unless you are making changes to this implementation package, this example is | ||
| very unlikely to be relevant. | ||
| Unless you are making changes to this implementation package, these examples | ||
| are very unlikely to be relevant. | ||
|
|
||
| ## Structure | ||
|
|
||
| This package contains multiple exmaples, which are used to test different | ||
| versions of the Google Maps iOS SDK. Because the plugin's dependency | ||
| is loosely pinned, CocoaPods will pick the newest version that supports the | ||
| minimum targetted OS version of the application using the plugin. In | ||
| order to ensure that the plugin continues to compile against all | ||
| SDK versions that could resolve, there are multiple largely identical | ||
| examples, each with a different minimum target iOS version. | ||
|
|
||
| In order to avoid wasting CI resources, tests are mostly not duplicated. | ||
| The test structure is: | ||
| * The oldest version has all of the usual tests (Dart integration, | ||
| XCTest, XCUITest). | ||
| * The newest version has only XCTests (the cheapest tests), which | ||
| can be used to unit tests any code paths that are specific to | ||
| new SDKs (e.g., behind target OS `#if` checks). | ||
|
|
||
| This setup is based on the assumption (based on experience so far) that | ||
| the changes in the SDK are unlikely to break functionality at runtime, | ||
| but that we will want to have unit test coverage of new-SDK-only code. | ||
| New test types can be added to any example if needs change. | ||
|
|
||
| ## Updating Examples | ||
|
|
||
| * When a new major of the SDK comes out that raises the minimum | ||
| iOS deployment version, a new example with that minimum target | ||
| should be added to ensure that the plugin compiles with that | ||
| version of the SDK, and the range in the plugin's `podspec` file | ||
| should be bumped to the next major version. | ||
| * When the minimum supported version of Flutter (on `stable`) | ||
| reaches the point where the oldest example is for an SDK | ||
| that can no longer be resolved to, that example should be | ||
| removed, and all of its testing (Dart integration tests, | ||
| native unit tests, native UI tests) should be folded into | ||
| the next-oldest version. |
13 changes: 13 additions & 0 deletions
13
packages/google_maps_flutter/google_maps_flutter_ios/example/ios11/README.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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Platform Implementation Test App | ||
|
|
||
| This is a test app for manual testing and automated integration testing | ||
| of this platform implementation. It is not intended to demonstrate actual use of | ||
| this package, since the intent is that plugin clients use the app-facing | ||
| package. | ||
|
|
||
| Unless you are making changes to this implementation package, this example is | ||
| very unlikely to be relevant. | ||
|
|
||
| ## Versions | ||
|
|
||
| This example requires iOS 11, so will select a 5.x SDK version. | ||
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
13 changes: 13 additions & 0 deletions
13
packages/google_maps_flutter/google_maps_flutter_ios/example/ios12/README.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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Platform Implementation Test App | ||
|
|
||
| This is a test app for manual testing and automated integration testing | ||
| of this platform implementation. It is not intended to demonstrate actual use of | ||
| this package, since the intent is that plugin clients use the app-facing | ||
| package. | ||
|
|
||
| Unless you are making changes to this implementation package, this example is | ||
| very unlikely to be relevant. | ||
|
|
||
| ## Versions | ||
|
|
||
| This example requires iOS 12, so will select a 6.x SDK version. |
Binary file added
BIN
+304 Bytes
...e_maps_flutter/google_maps_flutter_ios/example/ios12/assets/2.0x/red_square.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+312 Bytes
...e_maps_flutter/google_maps_flutter_ios/example/ios12/assets/3.0x/red_square.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
162 changes: 162 additions & 0 deletions
162
packages/google_maps_flutter/google_maps_flutter_ios/example/ios12/assets/night_mode.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,162 @@ | ||
| [ | ||
| { | ||
| "elementType": "geometry", | ||
| "stylers": [ | ||
| { | ||
| "color": "#242f3e" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "elementType": "labels.text.fill", | ||
| "stylers": [ | ||
| { | ||
| "color": "#746855" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "elementType": "labels.text.stroke", | ||
| "stylers": [ | ||
| { | ||
| "color": "#242f3e" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "featureType": "administrative.locality", | ||
| "elementType": "labels.text.fill", | ||
| "stylers": [ | ||
| { | ||
| "color": "#d59563" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "featureType": "poi", | ||
| "elementType": "labels.text.fill", | ||
| "stylers": [ | ||
| { | ||
| "color": "#d59563" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "featureType": "poi.park", | ||
| "elementType": "geometry", | ||
| "stylers": [ | ||
| { | ||
| "color": "#263c3f" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "featureType": "poi.park", | ||
| "elementType": "labels.text.fill", | ||
| "stylers": [ | ||
| { | ||
| "color": "#6b9a76" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "featureType": "road", | ||
| "elementType": "geometry", | ||
| "stylers": [ | ||
| { | ||
| "color": "#38414e" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "featureType": "road", | ||
| "elementType": "geometry.stroke", | ||
| "stylers": [ | ||
| { | ||
| "color": "#212a37" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "featureType": "road", | ||
| "elementType": "labels.text.fill", | ||
| "stylers": [ | ||
| { | ||
| "color": "#9ca5b3" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "featureType": "road.highway", | ||
| "elementType": "geometry", | ||
| "stylers": [ | ||
| { | ||
| "color": "#746855" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "featureType": "road.highway", | ||
| "elementType": "geometry.stroke", | ||
| "stylers": [ | ||
| { | ||
| "color": "#1f2835" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "featureType": "road.highway", | ||
| "elementType": "labels.text.fill", | ||
| "stylers": [ | ||
| { | ||
| "color": "#f3d19c" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "featureType": "transit", | ||
| "elementType": "geometry", | ||
| "stylers": [ | ||
| { | ||
| "color": "#2f3948" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "featureType": "transit.station", | ||
| "elementType": "labels.text.fill", | ||
| "stylers": [ | ||
| { | ||
| "color": "#d59563" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "featureType": "water", | ||
| "elementType": "geometry", | ||
| "stylers": [ | ||
| { | ||
| "color": "#17263c" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "featureType": "water", | ||
| "elementType": "labels.text.fill", | ||
| "stylers": [ | ||
| { | ||
| "color": "#515c6d" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "featureType": "water", | ||
| "elementType": "labels.text.stroke", | ||
| "stylers": [ | ||
| { | ||
| "color": "#17263c" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
|
|
Binary file added
BIN
+195 Bytes
...google_maps_flutter/google_maps_flutter_ios/example/ios12/assets/red_square.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions
30
...gle_maps_flutter/google_maps_flutter_ios/example/ios12/ios/Flutter/AppFrameworkInfo.plist
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| <plist version="1.0"> | ||
| <dict> | ||
| <key>CFBundleDevelopmentRegion</key> | ||
| <string>en</string> | ||
| <key>CFBundleExecutable</key> | ||
| <string>App</string> | ||
| <key>CFBundleIdentifier</key> | ||
| <string>io.flutter.flutter.app</string> | ||
| <key>CFBundleInfoDictionaryVersion</key> | ||
| <string>6.0</string> | ||
| <key>CFBundleName</key> | ||
| <string>App</string> | ||
| <key>CFBundlePackageType</key> | ||
| <string>FMWK</string> | ||
| <key>CFBundleShortVersionString</key> | ||
| <string>1.0</string> | ||
| <key>CFBundleSignature</key> | ||
| <string>????</string> | ||
| <key>CFBundleVersion</key> | ||
| <string>1.0</string> | ||
| <key>UIRequiredDeviceCapabilities</key> | ||
| <array> | ||
| <string>arm64</string> | ||
| </array> | ||
| <key>MinimumOSVersion</key> | ||
| <string>12.0</string> | ||
| </dict> | ||
| </plist> |
2 changes: 2 additions & 0 deletions
2
...ages/google_maps_flutter/google_maps_flutter_ios/example/ios12/ios/Flutter/Debug.xcconfig
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" | ||
| #include "Generated.xcconfig" |
2 changes: 2 additions & 0 deletions
2
...es/google_maps_flutter/google_maps_flutter_ios/example/ios12/ios/Flutter/Release.xcconfig
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" | ||
| #include "Generated.xcconfig" |
41 changes: 41 additions & 0 deletions
41
packages/google_maps_flutter/google_maps_flutter_ios/example/ios12/ios/Podfile
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # Uncomment this line to define a global platform for your project | ||
| platform :ios, '12.0' | ||
|
|
||
| # CocoaPods analytics sends network stats synchronously affecting flutter build latency. | ||
| ENV['COCOAPODS_DISABLE_STATS'] = 'true' | ||
|
|
||
| project 'Runner', { | ||
| 'Debug' => :debug, | ||
| 'Profile' => :release, | ||
| 'Release' => :release, | ||
| } | ||
|
|
||
| def flutter_root | ||
| generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) | ||
| unless File.exist?(generated_xcode_build_settings_path) | ||
| raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" | ||
| end | ||
|
|
||
| File.foreach(generated_xcode_build_settings_path) do |line| | ||
| matches = line.match(/FLUTTER_ROOT\=(.*)/) | ||
| return matches[1].strip if matches | ||
| end | ||
| raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" | ||
| end | ||
|
|
||
| require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) | ||
|
|
||
| flutter_ios_podfile_setup | ||
|
|
||
| target 'Runner' do | ||
| flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) | ||
| end | ||
|
|
||
| post_install do |installer| | ||
| installer.pods_project.targets.each do |target| | ||
| flutter_additional_ios_build_settings(target) | ||
| target.build_configurations.each do |build_configuration| | ||
| build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64 i386' | ||
| end | ||
| end | ||
| end |
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.