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.
Related
We started a new OS X project based on Swift, only to find out that the management doesn't really like that just through the use of Swift, we cannot sell the application to users before 10.9, even if 30% of the market still has older OS X versions.
Reimplementing the software in Objective-C seems to be the only solution. As Apple advertised Swift to be binary-compatible with Obj-C, I'm wondering if a translation of Swift source code to Obj-C source code is theoretically possible, and if so, if you know about any implementation of that idea.
Couldn't find anything about this topic on the web so far, everyone seems to be searching for the other direction at the moment.
Of course it's possible. But I am afraid there's no tools to do that. You should rewrite all the codes manually.
As you mentioned, Swift and Objective-C codes can work together perfectly. So I think rewrite the codes one class/file by one should be a good way.
Apple's document Using Swift with Cocoa and Objective-C https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/BuildingCocoaApps/ should be help.
Apple has provided good documentation on the protocols for IMServicePlugin.framework, but provides literally zero documentation on how this is compiled, in what format, what keys for the services plist are what, etc. Has anyone had experience with this? If so, are you aware of any documentation on the subject?
Apple has a sample plugin that implements IRC, you can find it here. I know that it says that it's legacy, but that's the only sample code you'll find I'm afraid.
If you want to build one from scratch, it's actually quite "simple": In Xcode, create a new project and select Bundle, link against the IMServicePlugIn.framework and make sure that your Principal Class conforms to the IMServicePlugIn. Then, well, do whatever you need to do. When in doubt about anything, the documentation is pretty extensive (but it seems like you've already found out about that).
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
I'm using GNUstep to begin with learning Objective-C.
I could find the header files for all, but don't know where to find its implementation files.
I was thinking, with that I can understand the whole programming style and many more.
I am working without mac , so if some body knows about any good tutorials , that i can use to identify structure of every Classes.
For instance, i have to parse an xml file, just to learn,
but don't know where to start.
Without IDE its hard to find out the sequence, and I don't have got access to any tutorials that best explains this, ( all that i get is in accordance with i-Phone and Cocoa. )
I'm concentrating on console programs, so that I can be thorough with the syntax and language.
Pls help me.
http://gnustep.org/ is the best resource for GNUstep related information, including source and documentation.
GNUStep has some tutorials and definitely the source code available.
You will find that there are small bits and pieces where Cocoa has moved on so GNUStep will not recognize new methods and things like properties or any new objective-2.0 stuff and so on.
Where ever you have the source installed, you can find NSString.m here
/path_to_my_src/gnustep/modules/core/base/Source/NSString.m
I believe i can learn thing or two if i can see the implementation files (.m files). Is there any way the i can view NSString.m or NSNumber.m files? and others? If i try to find these files using spotlight, i get nothing.
No, most (all?) of the Cocoa library implementations are only distributed in a compiled binary form. You could disassemble them, but that's probably against the Mac OS X EULA, and it also wouldn't help you understand them at all.
You could take a look at Cocotron, which is an open-source implementation of Cocoa. It won't be exactly the same, but at least for the core classes, it will be virtually identical.
Many of the basic cocoa classes, like NSString and NSNumber, are implemented in core foundation and "toll-free bridged" to objective-c classes. Core foundation is a C (not ObjC) API and the source is available as part of the Darwin open-source project.
So, to see how NSString or NSNumber is implemented under the hood, follow the link above and take a look at CFString and CFNumber, respectively (you'll need an Apple developer account, but registration is free).
Also worth looking at the mySTEP sources.
This helped me when doing something that subclassed NSMatrix some time ago.
I would guess they are already compiled into libraries.
I just did a quick check on my mac and could not find a NSString.m file as well. Are you utilizing Xcode's documentation? I find it has most everything I need.