It is pain in the neck to deal with Help Viewer cache when developing your Help documents. After updating your indexes with Help Indexer, you may find Help Viewer refusing to open your Help Documents, links do not work, or show empty pages. This happens because more often than not the version number of your help document in the plist is not bumped up.
To fix this problem, I wrote the following bash script to clear several cache repositories Help Viewer and Help Indexer is using.
Create a text file using the text editor pico from the command line:
pico ./hvfix
Edit your text file, then save on exit:
rm -rf ~/Library/Caches/com.apple.help*
rm -rf ~/Library/Preferences/com.apple.help*
rm -rf ~/.Trash/*
killall helpd
defaults write com.apple.helpindexer IndexAnchors YES
Before you run the script make sure to give executable permissions to your script like this
chmod +x hvfix
./hvfix
Then run your script:
./hvfix
This script also automatically sets "Index anchor information in all files" checkbox (which is normally needed for anchor indexing) before you run the Help Indexer next time.
Subscribe to:
Post Comments (Atom)
How to recover from Mac Book Pro catastrophes
Synopsis DISCLAIMER: This article applies to Intel based MacBook Pro 4th generation models with a Touch Bar (2006-2020.) The methodology giv...
-
It is pain in the neck to deal with Help Viewer cache when developing your Help documents. After updating your indexes with Help Indexer, yo...
-
In this tutorial I am going to demonstrate how to detect memory leaks in your OS X applications. We are going to use XCode development envi...
-
The target-action approach to event-driven systems allows for a much greater deal of dynamism when compared to other, more static approaches...
No comments:
Post a Comment