Challenge: Menu bar extras with SwiftUI

Menu bar symbol and swift logo symbol on a dark background

And now, a brief message from your friend, the Mac menu bar:

Hi! 👋🏻 I’m the menu bar! I always love making File → New Friends. We might have first met in the early 1980s, but I’ve only gotten more powerful and helpful (Format → Font → Humble Brag).

I’ve always had opinions. During the 90s, I was the one who told you you were exceptional every night (Special → Sleep). I have constant viewpoints about what time it is. And I don’t mean to Window → Minimize my contributions, but even Siri wants to hang out with me.

I have enjoyed capturing your full attention for some years. But now I’ve decided to share the Spotlight. Menu bar extras have arrived in SwiftUI!

So here's your challenge: Build me a menu bar extra in SwiftUI that I’d wear with pride. I’d drop down with joy if you’d make a little utility for me, and I'd be a click above ecstatic if you gave me the honor of hosting a small portion of your app.

Begin the challenge

To help you build a menu bar extra and complete the Mac menu bar's challenge, we've compiled a few resources to help you get started:

Bring multiple windows to your SwiftUI app

Discover the latest SwiftUI APIs to help you present windows within your app’s scenes. We’ll explore how scene types like MenuBarExtra can help you easily build more kinds of apps using SwiftUI. We’ll also show you how to use modifiers that customize the presentation and behavior of your app...

Watch now

MenuBarExtra

Human Interface Guidelines: The menu bar

We welcome you to visit the SwiftUI Study Hall to collaborate on this challenge! Ask questions, connect with other developers, and share your creations.

Study Hall: Menu bar extras with SwiftUI

Today's challenge comes straight from the menu bar itself: It's time to File → New Challenge and use SwiftUI to build a menu bar extra for your app. Visit the SwiftUI Study Hall to collaborate on the “Menu bar extras with SwiftUI” coding challenge. Ask questions, connect with other...

View now

And to close out this challenge, one more note from the menu bar:

Make sure you File → Share with me what you did on Twitter with the hashtag #WWDC22Challenges. We hope you’ve had a great Edit → Select All → WWDC22!