flutter / flutter/flutter

App fails to start after UISceneDelegate migration when using Swift 6

Open
#181,033 7 comments 0 reactions 1 assignee Claimed by @LongCatIsLooong View on GitHub
P1 platform-ios team-ios triaged-ios
Dominant language
Dart
Stars
179k
Forks
31.1k
PR merge metrics
PR metrics pending

Description

### Steps to reproduce

1. Initialize a new Flutter project.
2. Make sure it uses a unique app id and connect it to your Apple team.
3. Run `flutter run --device-id ` to verify it works
4. Run `flutter config --enable-uiscene-migration` or follow the manual instructions
5. Set `SWIFT_VERSION` to `6.0` (current default is `5.0`)
6. Run `flutter run --device-id `

### Expected results

App starts normally

### Actual results

App fails to build/start:

```
Could not build the precompiled application for the device.
ConformanceIsolation (Xcode): Conformance of 'AppDelegate' to protocol 'FlutterImplicitEngineDelegate' crosses into main actor-isolated code and can cause data races
/path/to/src/flutter_test_project/ios/Runner/AppDelegate.swift:4:45

Error launching application on .
```

### Code sample

Code sample

```swift
import Flutter
import UIKit

@main
@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}

func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
}
}
```

### Screenshots or Video

_No response_

### Logs

Logs

```console
❯ flutter run
Resolving dependencies...
Downloading packages...
characters 1.4.0 (1.4.1 available)
matcher 0.12.17 (0.12.18 available)
material_color_utilities 0.11.1 (0.13.0 available)
test_api 0.7.7 (0.7.9 available)
Got dependencies!
4 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Launching lib/main.dart on iPhone 12 van Bart in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: U8MH9G6VN9
Running Xcode build...
Xcode build done. 18.6s
Failed to build iOS app
Could not build the precompiled application for the device.
ConformanceIsolation (Xcode): Conformance of 'AppDelegate' to protocol 'FlutterImplicitEngineDelegate' crosses into main actor-isolated code and can cause data races
/path/to/src/flutter_test_project/ios/Runner/AppDelegate.swift:4:45

Error launching application on .
```

### Flutter Doctor output

Doctor output

```console
❯ flutter doctor -v
[✓] Flutter (Channel stable, 3.38.7, on macOS 15.7.3 24G419 darwin-x64, locale en-NL) [655ms]
• Flutter version 3.38.7 on channel stable at /Users/bart/src/sdks/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 3b62efc2a3 (2 days ago), 2026-01-13 13:47:42 -0800
• Engine revision 78fc3012e4
• Dart version 3.10.7
• DevTools version 2.51.1
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, enable-swift-package-manager, omit-legacy-version-file,
enable-lldb-debugging, enable-uiscene-migration

[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [3.3s]
• Android SDK at /Users/bart/Library/Android/sdk
• Emulator version 36.2.12.0 (build_id 14214601) (CL:N/A)
• Platform android-36.1, build-tools 36.0.0
• Java binary at: /Applications/Development/Android Studio.app/Contents/jbr/Contents/Home/bin/java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment (build 21.0.8+-14196175-b1038.72)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 26.2) [3.8s]
• Xcode at /Applications/Development/Xcode.app/Contents/Developer
• Build 17C52
• CocoaPods version 1.16.2

[✓] Chrome - develop for the web [35ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Connected device (3 available) [6.8s]
• iPhone 12 van Bart (mobile) • 00008101-0003791901B8001E • ios • iOS 26.2 23C55
• macOS (desktop) • macos • darwin-x64 • macOS 15.7.3 24G419 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 143.0.7499.193
! Error: Browsing on the local area network for iPhone XR van LZC dev. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources [388ms]
• All expected network resources are available.

• No issues found!

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.