Automatically run appledoc when you build a project in Xcode

327 views
Skip to first unread message

Ben Hirashima

unread,
Jan 18, 2013, 3:39:44 PM1/18/13
to appl...@googlegroups.com
i had a hard time figuring out how to get xcode to automatically run appledoc for me when i build. i finally figured it out, so here it is for anyone who needs it.

in the build scheme for my project, i set the following as a post-action script on the build action. see screenshot for illustration.

/usr/local/bin/appledoc $PROJECT_DIR/MyProjectName/AppledocSettings.plist $PROJECT_DIR /.

the hard part was figuring out that $PROJECT_DIR was needed to find the plist file, and to specify the target directory. obviously, this assumes that appledoc is installed at /usr/local/bin. change it if you installed it somewhere else. you may also have to tweak the path to AppledocSettings.plist if you have it somewhere else.

note: don't try to set up a similar script in the build phases of your project. any warnings generated by appledoc will cause the build to fail, which is probably not what you want. it will also force anyone else who checks out the project from source control to have appledoc installed, whereas the build scheme method won't be saved in your project file and won't affect other developers.
Screen Shot 2013-01-18 at 12.23.48 PM.png

Andy E

unread,
Sep 18, 2014, 5:43:14 PM9/18/14
to appl...@googlegroups.com
Hey Ben,

Thanks for the post! Your post allowed me to get to the furthest step possible. However, I've ran into an issue, maybe you can help?

Thanks in advance!

Error log:

NORMAL | Initializing...

NORMAL | Parsing source files...

Oops, something went wrong...

NSInvalidArgumentException: -[__NSCFString appendString:]: nil argument

  @ 0   CoreFoundation                      0x00007fff9535625c __exceptionPreprocess + 172

  @ 1   libobjc.A.dylib                     0x00007fff91ea0e75 objc_exception_throw + 43

  @ 2   CoreFoundation                      0x00007fff9535610c +[NSException raise:format:] + 204

  @ 3   CoreFoundation                      0x00007fff95325def mutateError + 159

  @ 4   appledoc                            0x0000000104ed38fd appledoc + 84221

  @ 5   appledoc                            0x0000000104edb153 appledoc + 115027

  @ 6   appledoc                            0x0000000104ed327c appledoc + 82556

  @ 7   appledoc                            0x0000000104ed2d15 appledoc + 81173

  @ 8   appledoc                            0x0000000104ecfe54 appledoc + 69204

  @ 9   appledoc                            0x0000000104ecdb73 appledoc + 60275

  @ 10  appledoc                            0x0000000104ecf181 appledoc + 65921

  @ 11  appledoc                            0x0000000104ecee2a appledoc + 65066

  @ 12  appledoc                            0x0000000104ecefd4 appledoc + 65492

  @ 13  appledoc                            0x0000000104ecefd4 appledoc + 65492

  @ 14  appledoc                            0x0000000104ecefd4 appledoc + 65492

  @ 15  appledoc                            0x0000000104ecea61 appledoc + 64097

  @ 16  appledoc                            0x0000000104ecd820 appledoc + 59424

  @ 17  appledoc                            0x0000000104ec2400 appledoc + 13312

  @ 18  appledoc                            0x0000000104ec0c17 appledoc + 7191

  @ 19  appledoc                            0x0000000104ec0d80 appledoc + 7552

  @ 20  appledoc                            0x0000000104ec0f0b appledoc + 7947

  @ 21  appledoc                            0x0000000104ec01c4 appledoc + 4548

Command /bin/sh failed with exit code 250

Ben Hirashima

unread,
Sep 18, 2014, 5:52:34 PM9/18/14
to appledoc on behalf of Andy E
sorry, that error doesn't tell me much. good luck.

--
You received this message because you are subscribed to a topic in the Google Groups "appledoc" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/appledoc/Tt3wLIzzn8I/unsubscribe.
To unsubscribe from this group and all its topics, send an email to appledoc+u...@googlegroups.com.
To post to this group, send email to appl...@googlegroups.com.
Visit this group at http://groups.google.com/group/appledoc.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages