JavaDoc-like documentation for Objective-C in Xcode? [duplicate] - objective-c

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
How to do the documentation in objective C?
Is it possible to write class/method documentation in Objective-C in a way that Xcode 4 displays them in the quick help, and/or generates a doc document from it in the style of Apple's own documentation?

Displaying it live - not that I know of.
But as for generating Apple like documentation, the best I have found is appledoc which I've been using for a year now. If accepts a wide range of commenting styles including Javadoc styles and can generate very Apple like documentation which it can also install directly into your Xcode help system.

I don't know if it still works for Xcode 4 but for Xcode 3 you could generate API doc sets using doxygen.
Apple has a set by step guide: Using doxygen to Create Xcode Documentation Sets on how to do it.

There is also the appledoc tool available from GitHub. Makes nice docsets.

Related

How to use Objective-C visualizer in Swift [duplicate]

This question already has answers here:
How do I call Objective-C code from Swift?
(17 answers)
Closed 2 years ago.
I am trying to implement audio visualizer to AVAudioPlayer from many days, tried different libraries but not succeeded. Now I found a library displayers but the problem is it's in Objective-C, now I don't know how to use it in the swift code. Here is the link of library https://github.com/agilie/DisPlayers-Audio-Visualizers. Please guide me in this regard or suggest me a good visualizer in Swift.
In order to use objective-c libraries or classes in a swift project you must use the bridging headers.
There's the apple documentation of importing this kind of project into a swift project:
https://developer.apple.com/documentation/swift/imported_c_and_objective-c_apis/importing_objective-c_into_swift
If you're still stuck you should follow this tutorial:
https://medium.com/ios-os-x-development/swift-and-objective-c-interoperability-2add8e6d6887

How do I convert HTML to Markdown in iOS/OS X? Any way to use pandoc in the app?

I have an HTML string that I'd like to convert to markdown. The best tool I've found to do this is pandoc, which is written in Haskell. How can I get pandoc to run inside a Mac/iOS app? I've heard of compiling Haskell to ARM for incorporation into an iOS project, but I have no idea how to actually get pandoc to compile and work inside an Objective-C app.
Thanks,
Robert
I will attempt to help you on how you use pandoc from objective-c part of your question. Objective-C is a superset of C, or so I have been told, meaning valid C code is valid Objective-C code.
So you question could have been worded how do I call haskell from C, which there is a nice wiki page about.
How you get all of this working on IOS and arm is another ball of yarn and would be more likely to be answered when broken into another question.

objective-c tags file for vim

I'd like to use Vim for editing sources and Xcode for all other purposes like managing, debugging etc. I've installed cocoa.vim plugin and it helps with highlighting, but I still need a way to navigate around the code. In java project I used ctags for the purpose, but it doesn't support obj-c.
So the question is: what is the easiest way to generate vi-compatible tags file for Objective-C sources?
I'm the author of the second link that jelera pointed to and must say it is now out of date.
I would follow the advice in the accepted answer of Alternatives to Ctags/Cscope with Objective-c? in order to get full Obj-C parser support in ctags.
If you use tagbar, this post will help get the new ctags binary working with it:
http://bastibe.de/2011-12-04-how-to-make-tagbar-work-with-objective-c.html
This is pretty much the setup I now use.

How to do the documentation in objective C? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
Could anyone share the the ways to do the documentation in objective C? Is there any standard way like it is in java?
Good news for all! :D Finally after waiting a long time Apple has introduced a parser comments for our projects. According to the new features in XCode 5:
Project documentation from framework API reference documentation and
structured comments in your own source code are displayed in the quick
help panel and in code completion popover views. Doxygen and HeaderDoc
structured comments are supported formats.
and from the Clang 3.2 release notes:
Clang parses the comments and can detect syntactic and semantic errors
in comments. These warnings are off by default. Pass -Wdocumentation
flag to enable warnings about documentation comments.
If you want to see an example of this new feature I recommend you take a look at the following article: Documentation in Xcode 5
I don't know what IDE you're using but doxygen lets you generate documentation from comments in Objective-C (as well as C, C++, Java, and some others).
If you're using Xcode (just assuming, since you're using Objective-C), there does seem to be some level of integration (not tested by me, just found on Google): http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
The standard way, as #DiegoPalomar suggested, is to use HeaderDoc, Apple's own tool for embedding structured comments in source code.
It comes with Xcode, so no installation required. It comes with a command-line script that generates HTML output of your documentation.
Docs for HeaderDoc:
Introduction
HeaderDoc command-line tool
HeaderDoc markup
Here's an example:
/*!
* Takes in a number and adds 4 to it.
*
* #param myNumber a number of type NSInteger.
*
* #return The number with 4 added to it.
*/
- (NSInteger)addFour:(NSInteger)myNumber {
return myNumber + 4;
}
Big plus: when you alt-click on your documented method, your doc appears in the balloon:
HeaderDoc is open-source too: http://www.opensource.apple.com/source/headerdoc/
I think you're looking for Doxygen.

Documentation Framework like JavaDoc for Objective C

Does Objective C have a documentation framework similar to JavaDoc where documentation can be generated from the source code?
Doxygen! You can use it for many languages, including Objective-c
Good news for all! :D Finally after waiting a long time Apple has introduced a parser comments for our projects. According to the new features in XCode 5:
Project documentation from framework API reference documentation and
structured comments in your own source code are displayed in the quick
help panel and in code completion popover views. Doxygen and HeaderDoc
structured comments are supported formats.
and from the Clang 3.2 release notes:
Clang parses the comments and can detect syntactic and semantic errors
in comments. These warnings are off by default. Pass -Wdocumentation
flag to enable warnings about documentation comments.
If you want to see an example of this new feature I recommend you take a look at the following article: Documentation in Xcode 5
Doxygen is quite popular among Obj-C developers.
You could have a look to HeaderDoc wich is the apple documentation framework similar to Java.
Appledoc has become very popular. . . version 1 was based on Doxygen, whereas version 2 was written from the ground up.
It doesn't quite have all the features of Doxygen (charts, enums, C++ classes, etc), but what it does offer is beautifully formatted docs in HTML of IDE integrated format.
Also interesting to note is the following:
The CocoaPods tool includes Appledoc documentation for the libraries that it installs. Quite handy.