appledoc
Objective-c code Apple style documentation set generator.
Gentle Bytes - Crafting useful software
Apple documentation has cross reference for input parameters. You can see that NSStringEncoding
and NSError
are highlighted:
But when I use appledoc, there are no cross reference at all:
This is my config file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>--company-id</key>
<string>com.vk</string>
<key>--create-docset</key>
<false/>
<key>--create-html</key>
<true/>
<key>--ignore</key>
<array>
<string>ThirdParty</string>
<string>Libraries</string>
<string>Frameworks</string>
<string>Testing</string>
</array>
<key>--install-docset</key>
<false/>
<key>--docset-platform-family</key>
<string>iphoneos</string>
<key>--output</key>
<string>docs</string>
<key>--project-company</key>
<string>VK.com</string>
<key>--project-name</key>
<string>VK iOS SDK</string>
<key>--keep-undocumented-objects</key>
<true/>
<key>--keep-undocumented-members</key>
<true/>
<key>--warn-undocumented-object</key>
<false/>
<key>--warn-undocumented-member</key>
<false/>
<key>--warn-empty-description</key>
<true/>
<key>--warn-missing-arg</key>
<true/>
<key>--warn-unknown-directive</key>
<true/>
<key>--logformat</key>
<string>xcode</string>
<key>--exit-threshold</key>
<integer>2</integer>
</dict>
</plist>
What's wrong?
Source: (StackOverflow)
Cho-Yeung-Lam:gogopiao_v2 apple$ appledoc -o ./doc --project-name gogopiao_v2
as I type the command above, error occur:
At least one directory or file name path is required, use 'appledoc --help
'
gogopiao_v2 is the root directory of my project. Hope someone could help me with the problem.
Source: (StackOverflow)
As per In App Purchases Guide in apple's developer resources, it clearly says that we can offer free trial option.
But I couldn't able to see it anywhere when I am setting in App purchases in iTunesConnect. Are they still offering that? Where can I find it?
Here is the screen shot of what I see in my iTunesConnect
Source: (StackOverflow)
I downloaded apple researchkit last month and run its sample. It worked and every thing was fine. This week i tried to run it , i had build failed and the error is that i need to have appledoc:
error: appledoc is required for building ResearchKit's documentation. See http://appledoc.gentlebytes.com
I did some research and i found this page
[1]: https://github.com/tomaz/appledoc#quick-install
I downloaded the project and built it and i found my
build directory.
But, i didn't know what is the executable file in this directory and how can i add it to the path. Can someone help me ? thanks a lot.
Source: (StackOverflow)
I wanted to describe my code like this
/** Loads and parses the XML file*/
+(NSMutableArray *)loadXML:(NSString *)table;
But when I try to use the quick help for loadXML: Xcode crashes with this Error:
ASSERTION FAILURE in /SourceCache/IDEPlugins/IDEPlugins-5064/IDEQuickHelp/Models/IDEQuickHelpContentCreator.m:321
Details: Error creating XML document from clang-parsed comment block: Error Domain=NSXMLParserErrorDomain Code=73 "Line 1: invalid character in attribute value
Line 1: attributes construct error
Line 1: Couldn't find end of Start Tag Function
" UserInfo=0x7fc78fb98500 {NSLocalizedDescription=Line 1: invalid character in attribute value
Line 1: attributes construct error
Line 1: Couldn't find end of Start Tag Function
}
Could anyone help me please?
Sorry for my bad english
Source: (StackOverflow)
I have some code comments like this:
/**
How to use this method.
@discussion To use it, do something like the following
id hook = [[STDeallocHook alloc] initWithBlock:^{
// Do something when 'hook' is dealloced
}];
*/
So the code example is indented with 4 spaces. When I compile the docset with appledoc, it compiles correctly and shows the code as code in the API reference I generate. However back in XCode (Where I have appledoc creating warnings for issues in the doco) I get the warning:
Invalid [[STDeallocHook alloc] reference found hear STDeallocHook.h@16, unknown object: [STDeallocHook !
I think what's happening is that appledoc is looking for markdown links inside the code block.
How can I stop this warning from appearing?
Source: (StackOverflow)
So I'm following this tutorial for the appledoc generation (http://objcsharp.wordpress.com/2013/09/24/how-to-generate-beautiful-apple-style-documentation-in-xcode-5/). Nothing happens after the build. Here's the script:
#if [ ${CONFIGURATION} == "Release" ]; then
APPLEDOC_PATH=`which appledoc`
if [ $APPLEDOC_PATH ]; then
$APPLEDOC_PATH \
--project-name ${PRODUCT_NAME} \
--project-company "Your Name" \
--company-id "com.yourcompany" \
--output ${PRODUCT_NAME}Docs \
--keep-undocumented-objects \
--keep-undocumented-members \
--keep-intermediate-files \
--no-repeat-first-par \
--no-warn-invalid-crossref \
--exit-threshold 2 \
${PROJECT_DIR}/${PRODUCT_NAME}
fi;
#fi;
To make sure I install the appledoc correctly, I did the following from the terminal and the doc shows up fine.
appledoc --project-name BabelCPP --project-company "My Name" --company-id com.mycompany --no-create-docset --output ./doc/ ./CaterpillarCount/CaterpillarCount
Am I missing any critical step or setup in Xcode? It seems like the following part didn't execute correctly and it's what terminate this run script:
APPLEDOC_PATH=`which appledoc`
if [ $APPLEDOC_PATH ]; then
$APPLEDOC_PATH \
Source: (StackOverflow)
If I'm doing something stupid, I'm sorry in advance. But I cannot identify my error.
Here is the code (header file):
#import <Foundation/Foundation.h>
/**
Represents a cover image. It can be a game cover, a trophy image or even a player avatar.
It has three properties:
- **NSMutableString uri**: the link that points to the image.
- E.g.: [A Skyrim trophy image URI] (http://bit.ly/skyrimTrophyImageUri ).
- **UIImage img**: the actual image. That is, the bitmap.
- E.g.: 1A9A3826FB6B42C1B08824655A740620BC8E75F9.PNG
- **ResolutionType resolution**: the image resolution, which comes from an enumeration of this class called __"ResolutionType"__.
- E.g: SEN_75x41
*/
@interface NHOCCover : NSObject
The result:
I'm following these instructions (at "Custom link descriptions" section).
I also tried:
Maybe Xcode is messing up with the file? On a second related question, do you know if there is a way to block Xcode from automagically create links in its editor? (I mean to change the font color to blue and underline it).
Thanks in advance.
Source: (StackOverflow)
I'm working on a project that uses AppleDoc to generate documentation. I want to add some TODO comments in my code eg:
///TODO: Some stuff to be done
-(void)myMethod:(id)myParam{
[self doSomeFancyStuff];
}
The problem is that when I try to generate my project doc I get theses troublesome warnings :
/Users/Me/trunk/MyProject/MyProject/src/MyClass.m:119:
MyClass.m@119: Description for parameter 'myParam'
missing for -[MyClass
myMethod:]
Obviously I could get rid of my TODO comments but I'd like to keep them along with my beautyful doc. Does anybody know how to achieve that ?
Source: (StackOverflow)
could someone please explain what I am doing wrong when documenting my typedef NS_ENUM?
This is my syntax:
/** The different menu items
*/
typedef NS_ENUM(NSInteger, kMenuItem) {
/** The start page */
kMenuItemStartPage = 0,
/** The new round item */
kMenuItemNewRound,
/** The archive item */
kMenuItemArchive,
/** The participants item */
kMenuItemMyParticipants,
/** The locations item */
kMenuItemMyLocations,
/** The settings */
kMenuItemSettings,
/** The contact page */
kMenuItemContact,
/** The count */
kMenuItemTotal
};
/**
* This is the Menu View Controller.
*
* The menu view controller handles the menu the menu and its options. You can access the menu view controller using the `menuContainer` in the `ApplicationDelegate`
*
*/
@interface MenuTVC : UITableViewController
@end
My run script build phase:
APPLEDOC_PATH=`which appledoc`
if [ $APPLEDOC_PATH ]; then
echo "Generating docs!";
$APPLEDOC_PATH \
--project-name "${PRODUCT_NAME}" \
--project-company "Sogeti Sverige AB" \
--company-id "se.domain.project" \
--output "Docs" \
--no-install-docset \
--exit-threshold "2" \
--keep-undocumented-objects \
--keep-undocumented-members \
--keep-intermediate-files \
--ignore "Pods" \
--ignore ".m" \
--index-desc "${PROJECT_DIR}/Readme.md" \
${PROJECT_DIR}/Prevent
else
echo "AppleDoc not found or installed!"
fi;
The result:
And build result:
From the terminal:
$ which appledoc
/usr/bin/appledoc
$ appledoc --version
appledoc version: 2.2 (build 963)
I just can't seem to figure it out.
Thanks in advance!
Source: (StackOverflow)
In my iOS project, I added screenshot images to the documentation of some classes.
The documentation is generated with appledoc.
Basically, for the class TheViewController
, this would look like this:
/**
* A view controller: awesome and helpful class description.
*
* **iPhone Screenshot:**
* ![](../docs/documentation_data/ViewControllersScreenshotsGallery/screenshots/TheViewController_iPhone.png)
*
* **iPad Screenshot:**
* ![](../docs/documentation_data/ViewControllersScreenshotsGallery/screenshots/TheViewController_iPad.png)
*/
Is there any way to DRY this?
A macro, pre-processing (via preprocess-headerdoc
?), dynamic placeholder, script, options fed to appledoc?
Ideally, I would like to just have this:
/**
* A view controller: awesome and helpful class description.
*
* SCREENSHOTS_FOR_IPAD_AND_IPHONE
*/
Bonus point if I don't even have to add the line SCREENSHOTS_FOR_IPAD_AND_IPHONE
, and the content is only added if some condition is met (ie, if images are found where expected).
Source: (StackOverflow)
I created a method that has a block as a parameter. The block takes some arguments, so I would like to indent the documentation like Apple does in their methods that have a similar format...
An simple example how this would look in code is:
/** Loads a project from web service.
@param securityKey The security key.
@param block The block to execute after the web service returned all data. The block takes five arguments:
@param data The data.
@param fields Some fields.
*/
- (void)loadProjectWithSecurityKey:(NSString *)securityKey andCompletion:(void(^)(NSDictionary *data, NSDictionary *fields))completion;
But clearly this will only appear like this in the documentation:
How do I get data
and fields
to appear indented like Apple's method that takes a block with arguments?
I couldn't find how to do this in Apple's documentation on HeaderDoc
Source: (StackOverflow)
i'm working in generating docset for a ios project, but stumped.
as you known, we can write a sh script for the xcode build phases run script; and i want it run only when the project in release version & the software appledoc already installed, so i write it as follows:
# appledoc Xcode script
APPLEDOC_PATH=`which appledoc`
if [ $APPLEDOC_PATH ]; then
if [ "${CONFIGURATION}" = "Release" ]; then
#============================#
# some code here, omit! #
#============================#
fi
fi
it seems not work at all! and i know the problem is the command 'which appledoc' went wrong! so the question is:
how to check appledoc valid or not in the xcode build phases run script?
any ideas? please give a hand! thanks!
Source: (StackOverflow)
I created a custom behavior in Xcode 4 (Xcode > behaviors > edit behaviors > +) in order to launch a shell script (which is configured to be executable). I can invoke the behavior using the menu or my custom shortcut (console shows up as specified), but the script is not executed (no output in the console).
The script has been already tested in the terminal and it works fine! and I also created a dummy script with a simple echo and the result is the same... why? How can I debug this?
EDIT:
After solving the problem I realized what I had in mind, if you are interested read my post:
Generate beautiful code documentation with a simple shortcut using AppleDoc, Xcode custom behaviors and AppleScript!
Source: (StackOverflow)