jekyll-apple-help
jekyll-apple-help copied to clipboard
Setup instructions don't work in Xcode 7
Hi,
Thanks for this awesome project!
I've followed your setup instructions twice and I can't get this to build usable help. Everything works fine during build, but when I run, I get the message
The selected topic is currently unavailable.
The topic you were trying to view could not be found.
in the help window.
In the system console I see error messages like:
9/21/15 11:18:03.095 PM helpd[59516]: Couldn't find a URL for file named book-icon.png in bundle at path /Users/joel/Library/Developer/Xcode/DerivedData/HelpTest-fvgtqpyktrqaxwflhfatgngnsfhj/Build/Products/Debug/HelpTest.app/Contents/Resources/HelpTestHelp.help. Removing HPDBookIconPath from the Info.plist dictionary.
9/21/15 11:18:03.096 PM helpd[59516]: Couldn't find a URL for file named book-icon.png in bundle at path /Users/joel/Library/Developer/Xcode/DerivedData/HelpTest-fvgtqpyktrqaxwflhfatgngnsfhj/Build/Products/Debug/HelpTest.app/Contents/Resources/HelpTestHelp.help. Removing HPDBookIconPath from the Info.plist dictionary.
I can see when I look at the generated app, it generates the app and inside it contains the help bundle, but that help bundle doesn't contain the index.html. I can see that the input English.lproj contains index.md but that file doesn't get turned into index.html on output.
This is in Xcode Version 7.0 (7A220) on OS X 10.10.5.
Any ideas?
I'm unable to get help working with the current instructions. :-(
Hi, try checking that you can build the MyApp Example and view its help. I'll try to reproduce the error you're seeing...
Below is a clean build report of an app 'HelpTest' using Xcode 7. You should compare this to your own example app build report to see if anything is missing:
Hi @chuckhoupt thanks for responding!
I was unable to get this to work without making two changes to your instructions:
- Step 6. in Create MyAppHelp Bundle Target needed to be changed from
/usr/bin/make -C "$(dirname "$PRODUCT_SETTINGS_PATH")"
to/usr/bin/make --always-make -C "$(dirname "$PRODUCT_SETTINGS_PATH")"
, otherwise the build log would always just saymake: '/Users/joel/Library/Developer/Xcode/DerivedData/MySlideApp-agihlsjsvsyxnycurvnudaenjlng/Build/Products/Debug/MySlideAppHelp.help/Contents/Resources' is up to date.
so it was never being built. The--always-make
flag is heavy-handed, but it works. I guess something is wrong with the dependency checking? - Step 2. in Integrate Help into MyApp Target was a bit vague. MyAppHelp.help is already in Products. I had to add MyAppHelp.help to the Copy Bundle Resources phase of the MyApp target.
Then everything worked well. Otherwise I could never get the help to appear.
I've got it working now but any ideas why I had to make these changes?
I'd be happy to submit a pull request with the updated instructions if that works.
Thanks again for this awesome tool!
@chuckhoupt Can you share your latest Xcode 7 project? I'm having trouble getting the help bundle to register properly.
Also is there a way to get the help integrated into the app without having to do the hdiutil so that Xcode does the search.helpindex
build?
I updated the projects for Xcode 7.2 last month, and the test MyApp project builds ok -- you might compare your settings with the MyApp project. For help registration, I believe the important thing is for the app's info.plist/CFBundleHelpBookName to match the help bundles info.plist/CFBundleIdentifier -- double-check those in your Products dir.
I am working on a new version (on the branch sub-proj), which puts the help bundle in its own sub-project. The hope is to simplify the setup a bit, but it is currently a work-in-progress, so doc isn't updated, etc.
About hdiutil: If you've setup the Run-Script Build-Phase (step 6), then Xcode will call make, which will use hdiutil to build search.helpindex. I don't think there is a more direct or efficient way to do it. The makefile will only run hdiutil if it has rebuild the help. Maybe I am misunderstanding?
I figured out a big part of my issue was also linked to renaming some of the project files. Jekyll needs all folders to be with _
otherwise index breaks.
Having the --always-make
helped quite a bit.
As a separate mod, I also updated my makefile to use Docker (preventing the need for a separate install of jekyll on the local machine:
Add after HELP :=
DOCKER := $(shell command -v docker)
Then replace the Jekyll logic with:
$(DOCKER) run --rm --label=jekyll --volume="$(CURDIR)":/srv/jekyll --volume=$(HELP):/srv/jekyll/build jekyll/jekyll jekyll build --destination /srv/jekyll/build
Hello,
thanks for this awesome project! I was finally able to make it work, but I was missing one step not mentioned in the doc, the one mentioned by @iosdev-republicofapps : =>MyAppHelp.help is already in Products. I had to add MyAppHelp.help to the Copy Bundle Resources phase of the MyApp target.
Hello again,
the
--always-make
helped when modifications had been made and help would not display properly (unable to find ...)