UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

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 Essential Developer

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until April 28th.

Click to save your free spot now

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.