Skip to content

Disable launch window for swiftUI on macOS. Especially for macOS 15.

License

Notifications You must be signed in to change notification settings

boybeak/NoLaunchWin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NoLaunchWin

If you want to make a pure menubar app, you do not need the launch window. But under the swiftUI framework, you must provide a WindowGroup at the app's entry like this.

@main
struct MyApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}

You can just replace WindowGroup and ContentView with Settings to hide the launch window before macOS 15.

@main
struct MyApp: App {
    var body: some Scene {
        Settings {}
    }
}

But start with macOS 15, this doesn't work. You can use this library to disable launch window.

Installation

Open your project in XCode, File -> Add Package Dependencies, copy and paste https://github.com/boybeak/NoLaunchWin.git into the search input, then search library info and Add Package.

Usage

It's very easy to use.

import NoLaunchWin

@main
struct MyApp: App {
    var body: some Scene {
        WindowGroup {
            NoLaunchWinView()
        }
    }
}

More

If you're making a pure menubar app. You can take a look at the Tray library. It helps you to make a menubar app easily.

About

Disable launch window for swiftUI on macOS. Especially for macOS 15.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages