BLACK FRIDAY SALE: Save big on all my Swift books and bundles! >>

How to add support for help menu in SwiftUI macOS app.

Forums > SwiftUI

Hello I am creating a macOS SwiftUI app using the SwiftUI app lifecycle. Normally, if you open any macOS app, it has the menu bar items on top with the last one being help. When I run my app right now and press help on the menu bar and then "(Application Name) help" it just says "Help isn't available for (Application Name)". I know about CommandGroup(replacing:) but that lets add a button with an action which wont let me display any view of some sort. How can I add support for the help button?

2      

Boy, I really wish there were better resources that were easily findable. The closest I've found so far is this:

https://wiki.lazarus.freepascal.org/Add_an_Apple_Help_Book_to_your_macOS_app

This page tells how to construct a "help book" out of a bunch of HTML pages, but it doesn't say how to tell Xcode to bundle that book together with the application code when building an application bundle.

   

Hacking with Swift is sponsored by RevenueCat

SPONSORED In-app subscriptions are a pain to implement, hard to test, and full of edge cases. RevenueCat makes it straightforward and reliable so you can get back to building your app. Oh, and it's free if your app makes less than $10k/mo.

Learn more

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

Reply to this topic…

You need to create an account or log in to reply.

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.