In regards to iPhone development, how do you now when your using a Cocoa vs pure Objective-C objects.
If you're not using anything but Objective-C in your app, then all Cocoa objects are Objective-C objects.
If you're using Python or Ruby, then your objects will be Python or Ruby objects. But as long as they inherit from Cocoa classes, they'll be accessible to other Cocoa objects whether or not they're written in Objective-C.
(There is Core Foundation, which provides objects that work fine in Cocoa but are not written in Objective-C. This is an implementation detail; don't worry about it.)
For example, the following are Objective-C:
- NSTimer
- NSString
- int, float
- NSMutableArray
Only NSTimer, NSString, and NSMutableArray are Objective-C classes. int and float are primitive types, not classes. And none of them come from Objective-C: int and float come from C, and the NS* classes all come from Cocoa.
As sebnow wrote while I was writing this, Cocoa is a framework, whereas Objective-C is a language. The NS* classes all come from the Cocoa framework, not the Objective-C language.
But these are Cocoa:
- UILabel
- UIColor(?)
- UIView
No, those are Cocoa Touch. They are not available in a Cocoa app. Likewise, Application Kit classes are not available in Cocoa Touch.
(Cocoa is Foundation + AppKit; Cocoa Touch is Foundation + UIKit.)
And to be clear, does
Cocoa Touch == iPhone development
Cocoa == Mac OS X development
Yes. Cocoa Touch is the iPhone framework; Cocoa is the Mac framework.