New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AppDelegate.swift:4:1 'UIApplicationMain' is deprecated; this is an error in Swift 6 #143044
Comments
Looks like for our use case they are the same (we don't have a custom main class to annotate) |
cc @eliasyishak |
Also from: https://forums.swift.org/t/se-0383-deprecate-uiapplicationmain-and-nsapplicationmain/62375/9
If we wanted to, we could guard against this by checking if the app delegate has something that looks like More details can be found in this proposal: https://github.com/apple/swift-evolution/blob/main/proposals/0383-deprecate-uiapplicationmain-and-nsapplicationmain.md |
This migrates Flutter to use the `@main` attribute introduced in Swift 5.3. The `@UIApplicationMain` 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. ad18797 - This updates the iOS app template and adds a migration to replace `@UIApplicationMain` uses with `@main`. 2. 8ecbb2f - I ran `flutter run` on each Flutter iOS app in this repository to verify the app migrates and launches successfully. Part of #143044
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. a508d3e - This updates the macOS app template and adds a migration to replace `@NSApplicationMain` uses with `@main`. 2. f434827 - 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 #146707 Fixes #143044
This migrates Flutter to use the `@main` attribute introduced in Swift 5.3. The `@UIApplicationMain` 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. flutter@ad18797 - This updates the iOS app template and adds a migration to replace `@UIApplicationMain` uses with `@main`. 2. flutter@8ecbb2f - I ran `flutter run` on each Flutter iOS app in this repository to verify the app migrates and launches successfully. Part of flutter#143044
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. flutter@a508d3e - This updates the macOS app template and adds a migration to replace `@NSApplicationMain` uses with `@main`. 2. flutter@f434827 - 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 flutter#146707 Fixes flutter#143044
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
In Xcode 15.3 beta I see a deprecation warning in a newly created Flutter iOS Xcode project.
@UIApplicationMain
was renamed to@main
in Swift 5.3.flutter/packages/flutter_tools/templates/app_shared/ios-swift.tmpl/Runner/AppDelegate.swift
Line 4 in db141ec
We already require Xcode 14, and Swift 5.3 was introduced in Xcode 12.
I bet the same is needed for
@NSApplicationMain
but I didn't check.flutter/packages/flutter_tools/templates/app_shared/macos.tmpl/Runner/AppDelegate.swift
Line 4 in db141ec
I'm not sure if there are other implications to using
@main
instead of@UIApplicationMain
(scene delegates?)The text was updated successfully, but these errors were encountered: