
This migrates Flutter to use the `@main` attribute introduced in Swift 5.3. The `@NSApplicationMain` attribute is deprecated and will be removed in Swift 6. See: https://github.com/apple/swift-evolution/blob/main/proposals/0383-deprecate-uiapplicationmain-and-nsapplicationmain.md This change is split into two commits: 1.a508d3e503
- This updates the macOS app template and adds a migration to replace `@NSApplicationMain` uses with `@main`. 2.f43482786e
- I ran `flutter run -d macos` on each Flutter macOS app in this repository to verify the app migrates and launches successfully. Follow-up to https://github.com/flutter/flutter/pull/146707 Fixes https://github.com/flutter/flutter/issues/143044
Example of embedding Flutter using FlutterView
This project demonstrates how to embed Flutter within an iOS or Android application. On iOS, the iOS and Flutter components are built with Xcode. On Android, the Android and Flutter components are built with Android Studio or Gradle.
You can read more about accessing platform and third-party services in Flutter.
iOS
You can open ios/Runner.xcworkspace
in Xcode and build the project as
usual.
Android
You can open android/
in Android Studio and build the project as usual.