Skip to content

Commit 66cc739

Browse files
[google_maps_flutter] Add README section about SDK versions (#11005)
Updates the iOS section of the app-facing package's README to discuss the new `google_maps_flutter_ios_sdk*` packages and how to select between them. Also removes the Obj-C part of the delegate update example, since at this point it's extremely unlikely that new developers are using Obj-C, and if they are they are making a deliberate choice to do so and so can be reasonably expected to know how to translate to Obj-C. Fixes flutter/flutter#146920 ## 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.
1 parent 9cac057 commit 66cc739

File tree

3 files changed

+38
-23
lines changed

3 files changed

+38
-23
lines changed

packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.14.2
2+
3+
* Updates README with discussion of the new `google_maps_flutter_ios_sdk*` packages.
4+
15
## 2.14.1
26

37
* Replaces internal use of deprecated methods.

packages/google_maps_flutter/google_maps_flutter/README.md

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -53,26 +53,7 @@ For more details, see [Getting started with Google Maps Platform](https://develo
5353

5454
### iOS
5555

56-
1. Specify your API key in the application delegate `ios/Runner/AppDelegate.m`:
57-
58-
```objectivec
59-
#include "AppDelegate.h"
60-
#include "GeneratedPluginRegistrant.h"
61-
#import "GoogleMaps/GoogleMaps.h"
62-
63-
@implementation AppDelegate
64-
65-
- (BOOL)application:(UIApplication *)application
66-
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
67-
[GMSServices provideAPIKey:@"YOUR KEY HERE"];
68-
[GeneratedPluginRegistrant registerWithRegistry:self];
69-
return [super application:application didFinishLaunchingWithOptions:launchOptions];
70-
}
71-
@end
72-
```
73-
74-
Or in your Swift code, specify your API key
75-
in the application delegate `ios/Runner/AppDelegate.swift`:
56+
1. Specify your API key in the application delegate `ios/Runner/AppDelegate.swift`:
7657

7758
```swift
7859
import UIKit
@@ -92,8 +73,38 @@ For more details, see [Getting started with Google Maps Platform](https://develo
9273
}
9374
```
9475

95-
2. Read about iOS-specific features and limitations in the
96-
[`google_maps_flutter_ios` README](https://pub.dev/packages/google_maps_flutter_ios).
76+
2. Select an SDK version. The Google Maps SDK for iOS usually releases a new
77+
major version once per year, dropping support for an older version of iOS
78+
with each major release; see
79+
[the SDK release notes](https://developers.google.com/maps/documentation/ios-sdk/releases)
80+
for details of the minimum supported iOS version for each release. There is a
81+
pub package for each SDK release.
82+
- By default, this plugin uses [`google_maps_flutter_ios`](https://pub.dev/packages/google_maps_flutter_ios),
83+
which will automatically select the latest SDK release that is compatible
84+
with your project's minimum iOS version, up to version 10.x. This
85+
functionality relies on CocoaPods, so this implementation is not compatible
86+
with [Swift Package Manager](https://docs.flutter.dev/packages-and-plugins/swift-package-manager/for-app-developers).
87+
Because the Google Maps SDK [will not be releasing future versions via
88+
CocoaPods](https://developers.google.com/maps/documentation/ios-sdk/release-notes#August_18_2025)
89+
this implementation will not support SDK releases past 10.x.
90+
- To use a specific SDK release, add a dependency on the corresponding
91+
package to your `pubspec.yaml` file. All of the SDK-specific packages
92+
support Swift Package Manager. In general, you should use the latest SDK
93+
release that is compatible with your project's minimum iOS version:
94+
- [`google_maps_flutter_ios_sdk9`](https://pub.dev/packages/google_maps_flutter_ios_sdk9)
95+
requires iOS 15.0 or higher.
96+
- [`google_maps_flutter_ios_sdk10`](https://pub.dev/packages/google_maps_flutter_ios_sdk10)
97+
requires iOS 16.0 or higher.
98+
- Future major SDK versions will be available as new packages.
99+
100+
**Important:** Package authors depending on `google_maps_flutter`
101+
**should not** depend on a specific implementation package, as that will
102+
prevent application developers from selecting the appropriate SDK version for
103+
their project. Instead, just depend on `google_maps_flutter` as usual, and
104+
leave the choice of SDK version to application developers.
105+
106+
3. Read about iOS-specific features and limitations in the README for the
107+
package you selected in step 2.
97108

98109
### Web
99110

packages/google_maps_flutter/google_maps_flutter/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: google_maps_flutter
22
description: A Flutter plugin for integrating Google Maps in iOS and Android applications.
33
repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22
5-
version: 2.14.1
5+
version: 2.14.2
66

77
environment:
88
sdk: ^3.8.0

0 commit comments

Comments
 (0)