From 7fab5f8070815e779301225b3ef32f90df96d552 Mon Sep 17 00:00:00 2001 From: Roman Podymov Date: Sun, 3 Jan 2021 11:16:58 +0100 Subject: [PATCH] Using @main (#2222) * @main * Update CHANGELOG.md * Update CHANGELOG.md * Update AppDelegate.stencil --- CHANGELOG.md | 4 ++++ Templates/default/AppDelegate.stencil | 4 ++-- Templates/swiftui/AppDelegate.stencil | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cba057732..f58b6cf71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,10 @@ Please, check out guidelines: https://keepachangelog.com/en/1.0.0/ - Support `.s` source files [#2199](https://github.com/tuist/tuist/pull/2199) by[ @dcvz](https://github.com/dcvz). - Support for printing from the manifest files [#2215](https://github.com/tuist/tuist/pull/2215) by @pepibumur](https://github.com/pepibumur). +### Changed + +- Replace `@UIApplicationMain` and `@NSApplicationMain` with `@main` [#2222](https://github.com/tuist/tuist/pull/2222) by [@RomanPodymov](https://github.com/RomanPodymov). + ## 1.29.0 - Tutu ### Fixed diff --git a/Templates/default/AppDelegate.stencil b/Templates/default/AppDelegate.stencil index 7f1ea4f93..99814119a 100644 --- a/Templates/default/AppDelegate.stencil +++ b/Templates/default/AppDelegate.stencil @@ -2,7 +2,7 @@ import {{ name }}Kit import {{ name }}UI -@NSApplicationMain +@main class AppDelegate: NSObject, NSApplicationDelegate { @IBOutlet weak var window: NSWindow! @@ -19,7 +19,7 @@ class AppDelegate: NSObject, NSApplicationDelegate { import {{ name }}Kit import {{ name }}UI -@UIApplicationMain +@main class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? diff --git a/Templates/swiftui/AppDelegate.stencil b/Templates/swiftui/AppDelegate.stencil index dd1ca88aa..5776ffb0d 100644 --- a/Templates/swiftui/AppDelegate.stencil +++ b/Templates/swiftui/AppDelegate.stencil @@ -31,7 +31,7 @@ class AppDelegate: NSObject, NSApplicationDelegate { import {{ name }}Kit import {{ name }}UI -@UIApplicationMain +@main class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch.