diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_ios/CHANGELOG.md
index 0c068b932c95..5bb452732d85 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios/CHANGELOG.md
+++ b/packages/google_maps_flutter/google_maps_flutter_ios/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 2.17.4
+
+* Adds UIScene compatibility.
+
## 2.17.3
* Adds a README section about Swift Package Manager and the new
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Runner.xcodeproj/project.pbxproj b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Runner.xcodeproj/project.pbxproj
index 0caf990b9847..60adbefd91db 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Runner.xcodeproj/project.pbxproj
+++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Runner.xcodeproj/project.pbxproj
@@ -283,7 +283,6 @@
F7151F0C265D7ED70028CB91 /* Sources */,
F7151F0D265D7ED70028CB91 /* Frameworks */,
F7151F0E265D7ED70028CB91 /* Resources */,
- DF182F6A1B9E41DA05BFCB87 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
@@ -482,24 +481,6 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
- DF182F6A1B9E41DA05BFCB87 /* [CP] Embed Pods Frameworks */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-RunnerTests/Pods-RunnerTests-frameworks.sh",
- "${BUILT_PRODUCTS_DIR}/OCMock/OCMock.framework",
- );
- name = "[CP] Embed Pods Frameworks";
- outputPaths = (
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OCMock.framework",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RunnerTests/Pods-RunnerTests-frameworks.sh\"\n";
- showEnvVarsInLog = 0;
- };
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@@ -708,6 +689,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_STRICT_CONCURRENCY = complete;
SWIFT_VERSION = 6.0;
};
name = Debug;
@@ -735,6 +717,7 @@
PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.plugins.googleMobileMapsExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_STRICT_CONCURRENCY = complete;
SWIFT_VERSION = 6.0;
};
name = Release;
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Runner/AppDelegate.swift b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Runner/AppDelegate.swift
index a382ba8b736e..38d3237c62a7 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Runner/AppDelegate.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Runner/AppDelegate.swift
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-import Flutter
+@preconcurrency import Flutter
import GoogleMaps
import UIKit
@main
-@objc class AppDelegate: FlutterAppDelegate {
+@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
@@ -15,7 +15,10 @@ import UIKit
var mapsApiKey = ProcessInfo.processInfo.environment["MAPS_API_KEY"] ?? "YOUR KEY HERE"
GMSServices.provideAPIKey(mapsApiKey)
- GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
+
+ func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
+ GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
+ }
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Runner/Info.plist b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Runner/Info.plist
index 6783ca935f1d..ddaf9dd8203b 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Runner/Info.plist
+++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Runner/Info.plist
@@ -49,5 +49,26 @@
UIApplicationSupportsIndirectInputEvents
+ UIApplicationSceneManifest
+
+ UIApplicationSupportsMultipleScenes
+
+ UISceneConfigurations
+
+ UIWindowSceneSessionRoleApplication
+
+
+ UISceneClassName
+ UIWindowScene
+ UISceneDelegateClassName
+ FlutterSceneDelegate
+ UISceneConfigurationName
+ flutter
+ UISceneStoryboardFile
+ Main
+
+
+
+
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_ios/example/pubspec.yaml
index 72b3f21ed9ca..a18c6cbbda84 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios/example/pubspec.yaml
+++ b/packages/google_maps_flutter/google_maps_flutter_ios/example/pubspec.yaml
@@ -3,8 +3,8 @@ description: Demonstrates how to use the google_maps_flutter plugin.
publish_to: none
environment:
- sdk: ^3.9.0
- flutter: ">=3.35.0"
+ sdk: ^3.10.0
+ flutter: ">=3.38.0"
dependencies:
cupertino_icons: ^1.0.5
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMImageUtils.m b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMImageUtils.m
index 8136bfd6f6e9..878e273ccca7 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMImageUtils.m
+++ b/packages/google_maps_flutter/google_maps_flutter_ios/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMImageUtils.m
@@ -80,8 +80,7 @@
// Refer to the flutter google_maps_flutter_platform_interface package for details.
FGMPlatformBitmapBytes *bitmapBytes = bitmap;
@try {
- CGFloat mainScreenScale = [[UIScreen mainScreen] scale];
- image = [UIImage imageWithData:bitmapBytes.byteData.data scale:mainScreenScale];
+ image = [UIImage imageWithData:bitmapBytes.byteData.data scale:screenScale];
} @catch (NSException *exception) {
@throw [NSException exceptionWithName:@"InvalidByteDescriptor"
reason:@"Unable to interpret bytes as a valid image."
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml
index 66906ce43a77..2d0747955a97 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml
+++ b/packages/google_maps_flutter/google_maps_flutter_ios/pubspec.yaml
@@ -2,11 +2,11 @@ name: google_maps_flutter_ios
description: iOS implementation of the google_maps_flutter plugin.
repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_ios
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22
-version: 2.17.3
+version: 2.17.4
environment:
- sdk: ^3.9.0
- flutter: ">=3.35.0"
+ sdk: ^3.10.0
+ flutter: ">=3.38.0"
flutter:
plugin:
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/Runner/AppDelegate.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/Runner/AppDelegate.swift
index a382ba8b736e..38d3237c62a7 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/Runner/AppDelegate.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/Runner/AppDelegate.swift
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-import Flutter
+@preconcurrency import Flutter
import GoogleMaps
import UIKit
@main
-@objc class AppDelegate: FlutterAppDelegate {
+@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
@@ -15,7 +15,10 @@ import UIKit
var mapsApiKey = ProcessInfo.processInfo.environment["MAPS_API_KEY"] ?? "YOUR KEY HERE"
GMSServices.provideAPIKey(mapsApiKey)
- GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
+
+ func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
+ GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
+ }
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMImageUtils.m b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMImageUtils.m
index 8136bfd6f6e9..878e273ccca7 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMImageUtils.m
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/FGMImageUtils.m
@@ -80,8 +80,7 @@
// Refer to the flutter google_maps_flutter_platform_interface package for details.
FGMPlatformBitmapBytes *bitmapBytes = bitmap;
@try {
- CGFloat mainScreenScale = [[UIScreen mainScreen] scale];
- image = [UIImage imageWithData:bitmapBytes.byteData.data scale:mainScreenScale];
+ image = [UIImage imageWithData:bitmapBytes.byteData.data scale:screenScale];
} @catch (NSException *exception) {
@throw [NSException exceptionWithName:@"InvalidByteDescriptor"
reason:@"Unable to interpret bytes as a valid image."