10

I am trying to make the help support for my mac application. I made the XHTML, HTML and the .helpIndex file. But I dont know how to make the .help file. My question is what is .help file? and how to make the .help file?

I am studying in the apple classreference for doing this. Below is the stuff I have copied this link

Creating a Basic Help Book

Once you create the HTML files containing your help content, you must organize them into a help book. To do this, create a help book folder and include the following items:

My Question: How to create a help book folder. I cant understand this. I have just create a folder with somename.help and copied the files to it. But that is not working. whether it is the correct way of creating a help folder.

Aravindhan
  • 15,608
  • 10
  • 56
  • 71

1 Answers1

12

The .help is the top level folder of your document set not a file. Like a Mac application is really a folder with a .app extension

At a base level you need to create your html based document set like you have done and then add the meta tag named AppleTitle into your top level .html file index.html (SurfWriter.html in the examples)

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="Content-Style-Type" content="text/css">
  <title>Foobar Help</title>
  <meta name="AppleTitle" content="Foobar Help">
</head>
  • add CFBundleHelpBookFolder with a value of the name of your folder (Surfwriter.help) to your plist

  • add CFBundleHelpBookName with a value of Foobar Help to your plist (matches the meta tag in your header)

  • add a custom copy phase to put your .help document folder structure into Resources

Should just work after that.

Warren Burton
  • 17,451
  • 3
  • 53
  • 73
  • What about `CFAppleHelpAncor`? Do we need set it in `plist` too? – CAMOBAP Oct 09 '12 at 06:36
  • 1
    Im using index.html as my root so no but if your root file isnt index then maybe you will need to set that key – Warren Burton Oct 09 '12 at 07:33
  • 1
    In Yosemite (10.10.3) it seems a little different from the answer above; the difference for me was that `CFBundleHelpBookName` needed to be in the form: `com.myCompany.myApp.help`. And just in case anyone's updating their app and needs to register a new help book, I also trashed the `com.apple.help*` files in `~/Library/Caches/` (and then emptied the Trash). – Todd Apr 19 '15 at 08:06
  • What if I need my help file to be in a framework to share it with an extension? Can't figure it out what help directory to write into the Info.plist. – Vitalii Vashchenko Apr 26 '21 at 11:56
  • @VitaliiVashchenko You probably need to ask a new question for that. – Warren Burton Apr 26 '21 at 13:57