[google_maps_flutter_ios] Migrate to UIScene#11001
[google_maps_flutter_ios] Migrate to UIScene#11001LouiseHsu wants to merge 15 commits intoflutter:mainfrom
Conversation
…es into google-maps-ios-uiscene
| return super.application(application, didFinishLaunchingWithOptions: launchOptions) | ||
| } | ||
|
|
||
| nonisolated func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
I agree with @LongCatIsLooong, let's turn off concurrency check for now
There was a problem hiding this comment.
Looks like you can do it with an Xcode build setting: https://www.swift.org/documentation/concurrency/#using-xcode
There was a problem hiding this comment.
I did try adding the build setting but same error 👀 any other options?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
packages/google_maps_flutter/google_maps_flutter_ios/example/ios/Runner/Info.plist
Outdated
Show resolved
Hide resolved
| 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'. |
There was a problem hiding this comment.
this code path is deprecated anyways, plus the screenScale is already nicely passed in
|
i screwed up the merge lol one sec |
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
Fixes flutter/flutter#174413
Also downgrades the example app back to Swift 5.
Pre-Review Checklist
[shared_preferences]pubspec.yamlwith 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].CHANGELOG.mdto 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].///).