smallseo.info

appledoc

Objective-c code Apple style documentation set generator. Gentle Bytes - Crafting useful software

How to check appledoc valid or not in the xcode build phases run script?

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)

Xcode 4: custom behavior does not execute my sh script?

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?

enter image description here

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)

AutoRenewable subscription in app purchases didn't have free trial

As per In App Purchases Guide in apple's developer resources, it clearly says that we can offer free trial option. In App Purchases Guide Table 12-5 from Apple Developer Docs.

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 enter image description here


Source: (StackOverflow)

Doxygen / AppleDoc and Jenkins with Objective-C: where should the Doxygen / AppleDoc output live?

Currently our team is using an SVN repository to manage our code on Server A, and changes to this repository trigger builds via Jenkins to be kicked off on Server B (so server B has a workspace that mirrors the repository on Server A). Now, we wish to use a document generator like doxygen or appledoc, but I am unsure where the resulting documentation should live.

For example, Jenkins has a doxygen plug in; but since jenkins build commands only have access to the current workspace, this implies that the doxyfile to be accessed by the jenkins plugin must exist in the workspace, and thus be under source control (coming from the repository). This is fine, but the resulting doxygen output should not really be source controlled, so does that mean the doxyfile should specify the output to be created somewhere on server B that is outside the workspace?

Furthermore, the overall goal would be to have docksets generated to be used seamlessly via our individual team member's Xcodes; but this seems like it would imply that the resulting dockets / makefiles etc do indeed need to be somehow part of the workspace (so that the individual team members can receive the results via SVN updates)...but this seems clunky, and I am not even sure if it is kosher to have folders/files created in a workspace that isn't coming from the SVN repository (since the workspace is meant to be a mirror).

Basically I am looking for a way to have documentation/docsets generated via Jenkins as a part of the build process, and for our individual team members to have Xcode option-click goodness to that resulting documentation (ideally without any manual steps required). Is this possible?

Thank you.


Source: (StackOverflow)

Integrating Facebook Docset with Xcode

So I downloaded the latest 3.1 Facebook iOS sdk and under the scripts I found a build_documentation.sh which I ran. It completed and generated a com.facebook.Facebook-SDK-3_0-for-iOS.docset file. I am trying to get it to integrate nicely with XCode. I know that apple docs can create documentation that shows up in the quick help panel. My own custom documentation works great.

Does anyone know what I have to do to get the same kind of documentation integration with Facebook?


EDIT: I tried adding the docset to the corresponding folder according to the instructions here and restarted Xcode but it didn't work


Source: (StackOverflow)

Use appledoc to generate documentation for some particular classes

I have written a simple reusable control and on looking for a way to document its functions and properties, I found this useful tool named - appledoc.

I have created a demo project to show the capabilities of my control. Now when I use appledoc to genetate document, its creating the references for demo classes also. I dont want this. I'm expecting appledoc to generate documentation for my reusable class only. How could I do that?

My runscript is like this:

APPLEDOC_PATH=`which appledoc`
if [ $APPLEDOC_PATH ]; then
$APPLEDOC_PATH \
--project-name "MyControl" \
--project-company "Company Name" \
--company-id "" \
--output ${PRODUCT_NAME}Docs \
--keep-undocumented-objects \
--keep-undocumented-members \
--keep-intermediate-files \
--no-repeat-first-par \
--no-warn-invalid-crossref \
--ignore "*.m,AppDelegate.h,ViewController.h" \
--exit-threshold 2 \
${PROJECT_DIR}/${PRODUCT_NAME}
fi;

Tried adding my AppDelegate and ViewController class in --ignore tag, but it doesn't seems working. Is there anything I'm missing here?


Source: (StackOverflow)

How to create documentation for instance variable and methods in Xcode?

I'd like to be able to Alt-Click an instance variable (or a method) as part of the program i created and read what it's purpose is.

The fact that Xcode is telling me the class variable is declared at - is nice but not enough. In this case i'd like to see custom text i typed to describe what an asset really is. Additionally type of the ivar would also be useful to know.

How can this be done? In this case, i wonder what exactly did i mean by assets

I specifically wonder if this information can be viewed from inside Xcode, similar to how Eclipse shows JavaDoc content.

enter image description here


Source: (StackOverflow)

Appledoc crashes on every use

I hope this isn't a duplicate but after browsing the other issues I think its ok bring up the several issues I have been having with the Appledoc 2.2-963. I installed using brew which worked great, and apple doc has been generating me awesome documentation and what not, however it feels wrong to me that the software seg faults and breaks everytime i run it. Below is the script I use to run appledoc inside my working directory with the project files.

#! /bin/bash
appledoc \
--project-name "GSFDataCollector" \
--project-company "GSF SDP Team" \
--company-id "com.sdpllnl" \
--docset-feed-url "https://github.com/mbaptist23/open-fusion-ios" \
--docset-package-url "https://github.com/mbaptist23/open-fusion-ios" \
--docset-fallback-url "https://github.com/mbaptist23/open-fusion-ios" \
--output "~/help" \
--publish-docset \
--logformat xcode \
--keep-undocumented-objects \
--keep-undocumented-members \
--no-repeat-first-par \
--ignore "*.m" \
--ignore "*.mm" \
--ignore "GoogleMaps.bundle" \
--ignore "GoogleMaps.framework" \
--ignore "GSFDataCollecter.*" \
--ignore "Pods" \
--ignore "Podfile" \
--ignore "Podfile.lock" \
--ignore "LICENCE" \
--index-desc "./README.md" \
"."

In addition I am using the VVDocumenter found here: https://github.com/onevcat/VVDocumenter-Xcode.

Everything seems to generate fine, however here are some errors i get. Segmentation fault: 11 and also the other error is something went wrong. (couldnt reproduce it for this quick issue). Anyway you get the point. It is crashing with every use.

Also here is an example of my documenting using VV

//
//  GSFSpinner.h
//  GSFDataCollecter
//
//  Created by Michael Baptist on 3/13/14.
//  Copyright (c) 2014 Michael Baptist - LLNL. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface GSFSpinner : UIView

/**
 *  Creates a default spinner in the middle of the screen. 
 *
 *  @return A new GSFSpinner.
 */
- (id)init;

/**
 *  Creates a spinner with custom size and custom location.
 *
 *  @param frame The frame for the new GSFSpinner to be used.
 *
 *  @return A new GSFSpinner with custom frame.
 */
- (id)initWithFrame:(CGRect)frame;

/**
 *  The actual spinner itself that is inside the custom view. Since this is a regular UIActivity spinner. The developer can customize it how ever they want.
 */
@property (nonatomic) UIActivityIndicatorView *spinner;

/**
 *  Label that says why the spinner is spinning.
 */
@property (nonatomic) UILabel *label;

/**
 *  Width of the view containing the spinner.
 */
@property (nonatomic) NSUInteger width;

/**
 *  Height of the view containing the spinner.
 */
@property (nonatomic) NSUInteger height;

// sets the label text to white system font of size 14
/**
 *  Sets the label tetx to white system font of size 14.
 *
 *  @param text The text to be inserted into the label.
 */
- (void)setLabelText:(NSString*)text;

@end

I guess my question is, am I doing this correctly even though it is half working? Also is there a way to generate the documentation as html in my working directory so I can push it to github as well (or is that not good practice)? I am just trying to learn this and there seems to be very little good usage examples out there except for the provided --help option and a few blogs that are pretty subpar IMO.

Anyway, thanks a lot hopefully others find this post helpful, because I do know others who have seen similar issues but just gave up, and I think this is a user error.

-- Michael Baptist

edit:

Also i forgot to mention that is also says that all of my classes are undocumented such as the example provided above. It this because I didn't finish or something or I'm doing it incorrectly.

ahh.. one last thing is there a way to link foundation classes into the docs as well. such as using a NSArray in a function and have that NSArray linkable to the main docsets.

Thanks again.

EDIT: 4/7/2014

here is a typical crash report.

2014-04-07 11:38:50.555 appledoc[69348:507] -[__NSCFArray errorHandleDataReceived:]: unrecognized selector sent to instance 0x7fce10289f90
Oops, something went wrong...
NSInvalidArgumentException: -[__NSCFArray errorHandleDataReceived:]: unrecognized selector sent to instance 0x7fce10289f90
@ 0   CoreFoundation                      0x00007fff8399725c __exceptionPreprocess + 172
@ 1   libobjc.A.dylib                     0x00007fff857cae75 objc_exception_throw + 43
@ 2   CoreFoundation                      0x00007fff8399a12d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
@ 3   CoreFoundation                      0x00007fff838f53f2 ___forwarding___ + 1010
@ 4   CoreFoundation                      0x00007fff838f4f78 _CF_forwarding_prep_0 + 120
@ 5   CoreFoundation                      0x00007fff83965e0c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
@ 6   CoreFoundation                      0x00007fff83859a6d _CFXNotificationPost + 2893
@ 7   Foundation                          0x00007fff863947ba -[NSNotificationCenter postNotificationName:object:userInfo:] + 68
@ 8   Foundation                          0x00007fff8648d450 _performFileHandleSource + 1548
@ 9   CoreFoundation                      0x00007fff838c8731 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
@ 10  CoreFoundation                      0x00007fff838b9f69 __CFRunLoopDoSources0 + 441
@ 11  CoreFoundation                      0x00007fff838b962f __CFRunLoopRun + 831
@ 12  CoreFoundation                      0x00007fff838b90b5 CFRunLoopRunSpecific + 309
@ 13  HIToolbox                           0x00007fff892cba0d RunCurrentEventLoopInMode + 226
@ 14  HIToolbox                           0x00007fff89417a81 GetNextEventMatchingMask + 349
@ 15  HIToolbox                           0x00007fff8941787a WNEInternal + 168
@ 16  HIToolbox                           0x00007fff894177c6 WaitNextEvent + 52
@ 17  AppleScript                         0x000000010beefaf9 _Z19AEDefaultActiveProcPv + 131
@ 18  AppleScript                         0x000000010bef4400 _Z23InternalComponentActivej + 82
@ 19  AppleScript                         0x000000010bf229eb _Z13UASRemoteSendhhhhhPh + 653
@ 20  AppleScript                         0x000000010bf2dfdb _Z13UASValue_Sendhh14TUASClassIndexh + 329
@ 21  AppleScript                         0x000000010bf0950b _Z11UASExecute1v + 321
@ 22  AppleScript                         0x000000010bf09378 _Z10UASExecuteh + 188
@ 23  AppleScript                         0x000000010bed95ba _Z9ASExecutejjiPj + 460
@ 24  AppleScript                         0x000000010bed530d AppleScriptComponent + 845
@ 25  AppleScript                         0x000000010beef523 _ZN12AGenericCall8DelegateEP23ComponentInstanceRecord + 37
@ 26  AppleScript                         0x000000010beef4e9 _ZN15AGenericManager13HandleOSACallEP19ComponentParameters + 57
@ 27  AppleScript                         0x000000010beeeaf8 GenericComponent + 104
@ 28  OpenScripting                       0x00007fff8fc7bff1 OSAExecute + 72
@ 29  Foundation                          0x00007fff86455ae2 -[NSAppleScript(NSPrivate) _executeWithMode:andReturnError:] + 127
@ 30  appledoc                            0x00000001091223c4 appledoc + 304068
@ 31  appledoc                            0x0000000109109648 appledoc + 202312
@ 32  CoreFoundation                      0x00007fff838cb479 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 137
@ 33  CoreFoundation                      0x00007fff838cac1f -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 319
@ 34  appledoc                            0x0000000109109465 appledoc + 201829
@ 35  appledoc                            0x00000001090dbf9a appledoc + 16282
@ 36  appledoc                            0x00000001090da756 appledoc + 10070
@ 37  appledoc                            0x00000001090da956 appledoc + 10582
@ 38  appledoc                            0x00000001090d9e74 appledoc + 7796
@ 39  ???                                 0x000000000000002c 0x0 + 44

Source: (StackOverflow)

Appledoc inline code in Xcode Quick Help panel?

How can I indicate inline code blocks like this in Appledoc comments?

Backticks just read as backticks in Xcode Quick Help panel.

enter image description here

I'd really love to have NSStringFromClass codified somehow.


Source: (StackOverflow)

how to use appledoc to generate an Apple-like documentations

I am reading on the article how to generate an Apple-like HTML documentation at here. My questions are what the command lines are used for. How can we combine command lines and appledoc xcode project to generate a HTML.


Source: (StackOverflow)

Objective-C Documentation Generators: HeaderDoc vs. Doxygen vs. AppleDoc

I need to implement a documentation generation solution for my workplace and have narrowed it down to the three mentioned in the title. I have been able to find very little information in the way of formalized comparisons between these solutions, and I'm hoping that those of you with experience in one or more of the above can weigh in:

Here is what I have been able to glean from my initial pass:

HeaderDoc Pros: Consistent with apple's existing docs, compatibility with making apple docsets
HeaderDoc Cons: Difficult to modify behavior, project is not actively worked on, many have switched away from it (meaning there must be something deficient, though I can't quantify it).

Doxygen Pros: Active support community b/c of wide use base, very customizable, most output types (like latex etc)
Doxygen Cons: Takes work to make it look/behave consistent with apples docs, compatibility with apple docsets is not as simple

AppleDoc Pros: Looks consistent with apple's existing docs, compatibility with making apple docsets,
AppleDoc Cons: Issue with documentation of typedefs, enums, and functions, actively being developed

Does this sound accurate? Our desired solution will have:

  • Consistent look and feel with apples objective-c class reference
  • Ability for option-click to pull up documentation reference from within Xcode, and then link to the doc (just like apple's classes)
  • Smart handling of categories, extensions, and the like (even custom categories of apple's classes)
  • Ability to create our own reference pages (like this page: Loading… that can include images, and be linkable from generated class references seamlessly, like how apple's UIViewController class reference links to the linked page.
  • Easy to run command line commands that can be integrated into build scripts
  • Graceful handling of very large codebase

Based on all of the information above, are any of the above solutions clearly better than the others? Any suggestions or information to add would be extremely appreciated.


Source: (StackOverflow)

Is there any way to generate documentation using appledoc in AppCode?

Or is there any way (using other docs generators) to make it work in AppCode ?


Source: (StackOverflow)

Appledoc reference to input parameter class

Apple documentation has cross reference for input parameters. You can see that NSStringEncoding and NSError are highlighted: enter image description here

But when I use appledoc, there are no cross reference at all: enter image description here

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)

what is the extension of an executable file in an xcode project

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)

Xcode 5 Documentation Error

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)