What is the latest version of Objective-C? - 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/

Related

How does Objective-C get updated? Are there versioned releases? What is the current 'version'?

I have been trying to answer this question and looking at google/wikipedia etc but have not been able to determine this. On wikipedia I see a reference to Objective-C 2.0 but thats about it. I am curious for example in Xcode 7 there were some new features available for Objective-C like lightweight generics and __kindof. Did these exist before and they were just made available via Xcode in v7? Or did the language change? I tried to find a version history or information on releases but so far have come up with nothing. Swift is clearer on versions/releases and I keep asking myself if I am missing something related to Objective-C since I can't find this information. Does Objective-C update with Xcode releases or can the language evolve on its own?
in Xcode 7 there were some new features available for Objective-C like lightweight generics and __kindof. Did these exist before and they were just made available via Xcode in v7? Or did the language change?
To that extent, yes, the language did change.
The best way to research this sort of feature is by going through the Release Notes for Xcode. Thus, the features you are talking about appear here:
https://developer.apple.com/library/content/documentation/Xcode/Conceptual/RN-Xcode-Archive/Chapters/xc7_release_notes.html#//apple_ref/doc/uid/TP40016994-CH5-SW1
There is actually an Objective-C section with a subsection "Objective-C Language Changes". That pretty much tells you this was a change in the language!
Changes since then are listed here:
https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html
Of those, the most significant is probably the advent of class properties.
All these changes took place primarily to enhance Swift compatibility, and I think we may expect that all changes in Objective-C going forward will be for that purpose.
Objective-C is a very simple language. It's just a very thin layer on top of the C language. It's very important to realize that if C changes, Objective-C also changes. You can actually select which C dialect will be used for your Obj-C compiler. In that sense Objective-C changes all the time.
If we are speaking only about the object layer, there is no official specification, no discussion groups (e.g. as we have for Swift). It's not open-source. Practically speaking, current Obj-C features are exactly what the Apple's version of LLVM-Clang compiler has implemented (that is, what is shipped with Xcode). And LLVM documentation is where you can find the most interesting pieces of information about Obj-C features.
Obj-C changes a bit with every Xcode release although nowadays new features usually mean more attributes/annotations that can improve code analysis and provide more information to Swift. There is no official version number.
Objective-C has reached a state when it can't be really improved any more. It needs to support everything in C, it has to be backward compatible and its dynamicity makes it very hard to check types. That's exactly the reason why Apple has introduced a new language.

ObjC, Swift to WinObjC

I have an iOS app which includes both objective c and swift. Does the winobjc tool support converting the iOS apps which includes both objective c and swift code?
I work on the Windows Bridge for iOS at Microsoft. We're getting more and more questions about Swift support and it's clearly a top priority for the community. Now that Apple has open sourced large parts of Swift, we're considering our options and the technical implications of implementing it.
We regularly update our roadmap on our project wiki with our plans for the next month or two, so there is the best place to check for near-term plans. If you try out the bridge and have any questions, please don't hesitate to get in touch by filing an issue on Github. Thanks for checking out the bridge!
No, WinObjC only supports Objective-C but no Swift at this point.
It also doesn’t seem to be on their roadmap at this point.

Is "Modern Objective-C" really a new version, i.e. Objective-C 2.1?

In WWDC 2012 Apple introduced new syntax for NSNumber literals and Collection literals, in talk 405 named "Modern Objective-C". I have learned Objective-C from the book on Objective-C 2.0 by Stephen G. Kochan.
Is "Modern Objective-C" going to be Objective-C 2.1, or should the new syntax of Apple be considered as an alternative, Apple-specific syntax (shorthand) for existing constructs that are processed by the compiler?
(I did some research online, but found the terms "modern" and "legacy" only in the context of the Objective-C RunTime. I would like to understand what exactly is in the language, what are preprocessor instructions, and what are compiler directives.)
Objective-C is defined as an extension of C. Preprocessor instructions and compiler directives are exactly what they are for C.
There is no "formal" definition of the Objective-C language (no standard). Apple publishes a document that, more or less, explains it. There's also no real "version number" of the language. Apple sometimes adds a new feature and that's it. At a certain point Apple decided to promote a certain set of features as "Objective-C 2.0", but this does not mean that all previous versions had the same feature set nor it means that all subsequent versions will have the same feature set. The most recent moniker Apple has been using is "modern Objective-C" and refers to a language that supports all the currently defined features.
Note that some features are defined at the compiler level, others are defined at the library level, and others are a mix of both. If you use a feature that is completely implemented at the compiler level (like the new literals syntax), it will work for any program you write and compile with that compiler. But if you use a feature that is defined at the library level or that requires both compiler and library support, it will only work for programs that run on systems where a recent library is available (Apple does not let you statically link the language libraries). Examples are things like GC, ARC and the zeroing semantics attached to weak.
Therefore: yes, "modern Objective-C" is different enough from earlier Objective-C that you should consider it a new version, however no, there's no version number attached to it and it's perfectly possible that Apple will add new features to the language and still call it "modern Objective-C". Besides exactly what features are part of the language not only depends on the compiler but also on the target system you are compiling for. Therefore a "modern Objective-C" program targeting iOS 4 will be able to use a different set of features than a "modern Objective-C" program targeting OsX 10.8.

Objective-C source code

Where can I find the source code for the Objective-C language? Is it open-source or is there an open-sourced implementation of it available?
It really depends on what you mean by Objective-C, there are compilers, runtimes and libraries for it.
http://opensource.apple.com/ Contains much of Apple's source code for OS X and iOS.
you can also see http://clang.llvm.org/ for a compiler.
GNUstep is an open source implementation of OpenStep (Cocoa).
I think you are asking for Cocoa - and this is not open source. All you have are the header and reverse engineering tools.
Looking around, I've found several copies of Objective-C's source code. Apple maintains it at http://opensource.apple.com/source/objc4/, which is up to date as of OS X 10.9.x Mavericks at version 551.1, but I have also found several repositories GitHub that are copies of this main repository which people have made at various points in time, so they may or may not be as up to date as Apple's main repository. These include the GitHub repositories "opensource-apple/objc4" at version 532.2; "bavarious/objc4," which is up to date at version 551.1; "macmade/OBJC4-437.1-Runtime," which obviously includes just the Objective-C runtime at version 437.1; "Apple-FOSS-Mirror/objc4" at version 532.2; "aosm," which is up to date at version 551.1; "robertvojta/objc4," which is up to date at version 551.1; "j4n0/objc4-532," which is obviously at version 532.0; and "chenniaoc/objc4-551.1," which is obviously up to date at version 551.1. Personally, it seems to me that robertvojta/objc4 is the best repository from which you could possibly fork code due to the fact that it's got every single release from Apple's Open Source website so far copied over to it.
There is no one source code. There would be as many different versions as there are compilers for the language. They would likely be written in a low-level language such as assembly or C, and be vastly complicated. For whichever compiler you are interested in, you will need to confirm that it is open-source, which I find unlikely. Even then, it may be difficult.

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.