Documentation Framework like JavaDoc for Objective C - 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.

Related

an objc syntax highlighting library that supports multiple language?

I come from the ruby and python worlds where we have many libraries that can syntax highlight arbitrary code from many languages. I am looking for something similar in the objc ecosystem, but i can't seem to find such, is there one available?
The equivalent libraries in Ruby would be CodeRay and Pygments for Python,
thanks in advance!
Banister,
I myself have searched for a long time for a nice and robust Cocoa Syntax Highlighter, and since I'm currently building a code-oriented text editor myself, that would be a major part of the project.
So, I found out that there are plenty of Objective-C/Cocoa -friendly Syntax Highlighting libraries/components. For a starter (for something relatively basic, that is), I would suggest you have a look at :
OkudaKit (using CSS for styling)
UKSyntaxColoredTextDocument by Uli Kusterer (pretty nice try)
However, if you really need something POWERFUL, well-tested and still Cocoa-friendly, I would definitely suggest you to try the Scintilla component (for Cocoa). The code is great, and the community (at Scintilla-Interest Group) will gladly help you iron out any issues you may encounter.
In a few words :
I'm currently using on an about-to-be-release big project and it's working beautifully for me.
Scintilla
Scintilla is a free library that provides text-editing functions, with
an emphasis on advanced features for source code editing. SciTE
(cross-platform), Geany, Notepad++ (Windows), and Notepad2 (Windows)
are examples of standalone editors based on Scintilla.
Scintilla Editing Component in use (SciTe)
Features
Scintilla supports many features to make code editing easier in
addition to syntax highlighting. The highlighting method allows the
use of different fonts, colors, styles and background colors, and is
not limited to fixed-width fonts. The control supports error
indicators, line numbering in the margin, as well as line markers such
as code breakpoints. Other features such as code folding and
autocompletion can be added.
Download Scintilla (the Cocoa support has been integrated in the main project) : http://www.scintilla.org/SciTEDownload.html
Example project (integrating Scintilla with Cocoa) :
http://bazaar.launchpad.net/~mike-lischke/scintilla-cocoa/trunk/files/head:/cocoa/ScintillaTest/
For complete documentation, have a look at : Scintilla
Documentation
Fragaria may be useful for future reference.

What is the latest version of Objective-C?

Please can you tell me what is the last Objective-C version for now? and is there any official web-site for this language (like sunmicrosystems for JAVA) for which i can get information about this language?
The "official" Objective-C homepage is The Objective-C Programming Language, as pointed out in the objective-c tag info page.
The latest version of objective C is 2.0. I can't find any single website for the language, but Wikipedia article contains significant information with external links. The Objective-C Programming Language is considered the homepage for this language. You may also be interested in language variants section at Wikipedia. Please note that, though Obj-C 2.0 has garbage collector and iOS use Obj-C 2.0, it does not have GC.
Objective-C 2.0 was released in 2006, and, as of 2016, there is no 3.0. But that doesn't mean it hasn't changed.
You can find a list of the big Objective-C features supported by Xcode here. Sometimes detailed changes can be found in the Xcode release notes here. Other changes, like myobject->isa being replaced by object_getClass(myobject), are not advertised very well and you wind up discovering them through compiler warnings.
Five-year-old question, sure, but the answer constantly changes...
According to Apple's open-source web site, the version of Objective C 2.0 shipped with the latest version of OS X whose open-source components are available there (OS X 10.9.4 'Mavericks' as of this writing) is Objective-C 4, revision 551.1. (Feel free to leave a comment below if you can explain the discrepancy in Objective-C's version numbering between the documentation and the actual source code, would you?)
It's Objc4 now ! Objc source code here:
https://opensource.apple.com/tarballs/objc4/

Xcode 4 built-in help for your own files

Xcode 4 has a very nice built-in help/documentation that you can access e.g. by alt-clicking an identifier in the code, or by opening the help panel in the right sidebar. However, this only works for classes and methods provided by Apple. Is there a way to write some kind of documentation comments (e.g. like the Javadoc comments in Java) in your own code to make Xcode display them in those documentation panels?
http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/HeaderDoc/intro/intro.html
It's maintained by Apple so it should be well supported. I never actually used it, may try it later.
Ok, it looks like there's no good tool really... there are a few different ones, but they're imperfect and difficult to configure. I couldn't get Doxygen or Appledoc to work, and the tool mentioned by Avizzv92 is referred to as "a pile of poo" elsewhere, so I'd rather not try it... :)
Info that I've found:
How do you document your source code in Xcode?
http://wangling.me/2010/07/documentation-set-generation-tool-in-xcode-is-wanted/
http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
http://www.gentlebytes.com/home/appledocapp/
http://lists.apple.com/archives/xcode-users/2011/Apr/msg00238.html

What Doxygen alternative would Dave DeLong use?

Yesterday, Dave DeLong answered a question of mine. It wasn't the answer I was looking for, but in the question he mentioned an alternative way of generating doxygen-style documentation for Objective-C.
Before I could really look into it, someone (maybe Dave himself) noticed the answer didn't match the question that well and removed it. *poof* gone was the link to that documentation tool.
I can't remember the name, but I'm fairly certain it's neither HeaderDoc nor Doxygen itself.
Dave, you out there? What was that link again?
I'm clearly not Dave DeLong, but I'd use appledoc, it's pretty darn awesome!
Developer Page quote:
appledoc is command line tool that helps Objective-C developers generate
Apple-like source code documentation
from specially formatted source code
comments. It's designed to take as
readable source code comments as
possible for the input and use
comments as well as surrounding source
code to generate visually appealing
documentation in the form of HTML as
well as fully indexed and browsable
Xcode documentation set. Although
there are several tools that can
create HTML documentation for
Objective-C, all of those know to me
fall short in meeting the minimum of
goals described below.
Human readable source code appledoc is designed to keep source
code comments as readable as possible
even within your source code editor.
Cross references to objects and members Creating cross references to
classes, categories or protocols is
straightforward and automated as much
as possible.
Apple-like source code HTML documentation Generate appealing
HTML documentation with the same style
as Apple's.
Xcode documentation set creation Generate and install fully indexed and
browsable Xcode documentation sets.
Documentation set can also be
automatically installed to Xcode.
Single tool from sorce code to doc set Single tool to drive generation
from source code parsing to
documentation set installation
Easily customizable output appledoc gives you a lot of command
line switches so you can parameterize
output. If this is not enough, you can
change any or all of the template
files to suit your needs.
100% Objective-C implementation The whole appledoc is written in
Objective-C, so you can easily change
it using familiar language and tools.
This also make debugging much simpler
and effective.

Documentation for Objective C and Cocoa APIs?

Super-newbie question!
I've been looking for a list of all the classes that come with Objective-C and Cocoa but can't seem to find one.
Hoping that it has matching methods and syntax(?) as well.
Be gentle with me!
Thanks,
Spencer.
I would start here: http://developer.apple.com/referencelibrary/Cocoa/index.html
The system is broken up into frameworks, so you will not find a single listing. It depends on which frameworks you include with your project. good luck.
If you're using XCode, there's a documentation browser (Help -> Documentation) that's searchable. If you want to browse by classes you can also do so here. You might need to subscribe or download the documentation first though.
I'm finding this very convenient for iPhone development at least, since I can just type in a class or method name and get its documentation very quickly. YMMV for Mac OS X documentation though since I haven't used that at all.