TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

Writing a MenuBar app in SwiftUI 2

Forums > macOS

Almost everything on SwiftUI 2 is about iOS and almost everything on macOS menu bar apps is on older SwiftUI.

I have a menu bar app which I started two years ago, when SwiftUI was new. I now want to redo it using modern SwirtUI.

Is there any information on creating a basic menu bar app with a single popup using SwiftUI 2? Everything I’ve seen so far is a sort of hybrid.

3      

Unfortunately SwiftUI do not embed menu bar. You have to use old NS code and App delegate. You can take a look at this project. Look in applicationDidFinishLaunching in AppDelegate file

https://github.com/Sebastien-Remy/HackingWithmacOS-10-TimeBuddy

Hope it can help you

3      

Hacking with Swift is sponsored by RevenueCat.

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.