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 Superwall.

SPONSORED Superwall lets you build & test paywalls without shipping updates. Run experiments, offer sales, segment users, update locked features and more at the click of button. Best part? It's FREE for up to 250 conversions / mo and the Superwall team builds out 100% custom paywalls – free of charge.

Learn More

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.