Skip to content

Conversation

@LouiseHsu
Copy link
Contributor

@LouiseHsu LouiseHsu commented Feb 11, 2026

Fixes flutter/flutter#174413

Pre-Review Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] page, which explains my responsibilities.
  • I read and followed the [relevant style guides] and ran [the auto-formatter].
  • I signed the [CLA].
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I [linked to at least one issue that this PR fixes] in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy], or I have commented below to indicate which [version change exemption] this PR falls under[^1].
  • I updated CHANGELOG.md to add a description of the change, [following repository CHANGELOG style], or I have commented below to indicate which [CHANGELOG exemption] this PR falls under[^1].
  • I updated/added any relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or I have commented below to indicate which [test exemption] this PR falls under[^1].
  • All existing and new tests are passing.

@LouiseHsu LouiseHsu changed the title Google maps ios uiscene [google_sign_in_ios] Migrate to UIScene Feb 11, 2026
@LouiseHsu LouiseHsu changed the title [google_sign_in_ios] Migrate to UIScene [google_maps_flutter_ios] Migrate to UIScene Feb 11, 2026
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}

nonisolated func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i had to add "nonisolated" to get rid of

/Volumes/Work/s/w/ir/x/w/packages/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Runner/AppDelegate.swift:20:7

Not sure if related to flutter/flutter#181033

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message doesn't seem to be complete.

The FlutterImplicitEngineDelegate protocol should be main actor isolated, so this method shouldn't be nonisolated (as the caller guarantees it will be called on the main queue).

Since this is an example app, maybe turn off concurrency checking for now? Change the flag specified here to minimal: https://www.swift.org/documentation/concurrency/

You can also do an isolated conformance but I suspect when we properly mark FlutterImplicitEngineBridge as main actor isolated it will be source breaking again.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oopsies.
the error was

Main actor-isolated instance method 'didInitializeImplicitFlutterEngine' cannot be used to satisfy nonisolated protocol requirement
/Volumes/Work/s/w/ir/x/w/packages/packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Runner/AppDelegate.swift:20:7

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @LongCatIsLooong, let's turn off concurrency check for now

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you can do it with an Xcode build setting: https://www.swift.org/documentation/concurrency/#using-xcode

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did try adding the build setting but same error 👀 any other options?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed from the triage meeting - the concurrency check setting is Swift 5 only, and is an intermediate measure for people to incrementally adopt Swift 6. Since our engine API is not Swift 6 friendly yet, we should revert back to Swift 5.

@LouiseHsu LouiseHsu marked this pull request as ready for review February 12, 2026 18:10
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request migrates the google_maps_flutter_ios package to be compatible with UIScene, which is the modern approach for managing UI lifecycle on iOS. The changes include updating the AppDelegate to handle implicit engine initialization, replacing the deprecated [UIScreen mainScreen] API, and updating the example app's Info.plist to declare scene support. The changes look good, but I've found an indentation issue in the Info.plist file that should be corrected.

image = [assetProvider imageNamed:[assetProvider lookupKeyForAsset:bitmapAssetImage.name]];
image = scaledImage(image, bitmapAssetImage.scale);
} else if ([bitmap isKindOfClass:[FGMPlatformBitmapBytes class]]) {
// Deprecated: This message handling for 'fromBytes' has been replaced by 'bytes'.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this code path is deprecated anyways, plus the screenScale is already nicely passed in

@LouiseHsu
Copy link
Contributor Author

i screwed up the merge lol one sec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[google_maps_flutter_ios][UIScene] Migrate to scene lifecycle

4 participants