Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I setup the "Help" menu option for an iPad app being ported to the Mac using Mac Catalyst?

By default, Mac Catalyst creates a menu titled "Help" that is supposed to include help for the application. However, I found no documentation on how to implement Help. For standard Mac apps, you can use a Help book. However, there is no mention on how to use a help book with Mac Catalyst. I attempted to add the HelpBookDirectoryName to info.plist but this did not work. Is there a way of making help books work with Mac Catalyst?

like image 798
Ken Roe Avatar asked Oct 03 '19 20:10

Ken Roe


People also ask

How to make iOS app in Macbook?

What You Need to Develop Apple Apps. In order to develop Apple apps, you'll need a Mac computer running the latest version of macOS. You'll need to download Xcode from the Mac App Store or from the Apple developer site. Once you have Xcode installed, you can begin writing code.

What is Apple catalyst?

Mac Catalyst is the technology that lets you bring your existing iOS applications to macOS, allowing them to take full advantage of the Mac's larger display, integrated keyboard, and mouse or trackpad.


1 Answers

We use a web-based help system for our iOS app and adding this to the appropriate UIViewControllers seems to work to connect the Help menu command for our Catalyst version:

    // Show some help.
@IBAction func showHelp(_ sender: Any) {
    UIApplication.shared.open(URL(string: "http://www.ourapp.com/faq")!)
}

// Return whether action can be performed.
override func canPerformAction(_ action: Selector, withSender sender: Any?) -> Bool {

    if action == #selector(self.showHelp(_:)) {
        return true
    } else {
        return super.canPerformAction(action, withSender: sender)
    }
}
like image 145
LenK Avatar answered Sep 23 '22 23:09

LenK