Save the flames guys ... I know that to the Apple faithful this is going to be sacrilege ... so be it.
In my many years of Mac programming (back to 1984), I've come to see Apple's documentation as a hodge podge. XCode techniques that don't consistently work (e.g. command-option double click doesn't always bring up a class reference and option double click likewise doesn't always work). I've seen extensions to classes band aided on (e.g. categories). And whereas iOS could have been a superset to MacOS, it's not ... e.g. table views in the two systems are handled completely differently! Apple needs to take time out from trying to squeeze every last bit of dollars out of its AppStore, etc and put some librarians to work cleaning up the documentation jungle ... otherwise the whole thing will collapse under its own weight.
I spent a considerable amount of time trying to make sense out of the documentation. I'm going to summarize what I found. I would appreciate if some of the senior members here would correct any mistakes I've made and maybe append their own knowledge to this summary.
1. In my MBP the paths to the Frameworks are:
/System/Library/Frameworks (for MacOS)
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks (for iOS Simulator)
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks (for iOS)
I'm not sure if the various .h files for a given framework are the same in all three worlds, but clearly the binaries are different because of the different processors.
2. In the MacOS world it that the AppKit framework adds functionality to classes through the use of "categories" (indicated in parentheses below):
a) NSColor (NSQuartzCoreAdditions) in NSColor.h
b) NSColor (NSAppKitAdditions) in NSColor.h
c) NSCoder (NSAppKitColorExtensions) in NSColor.h
d) CIImage (NSAppKitAdditions) in NSCIImageRep.h
e) NSAffineTransform (NSAppKitAdditons) in NSAffineTransform.h
f) NSAppleScript(NSExtensions) in NSApplescript.h of the AppKit framework
g) NSAttributedString (NSAttributedStringKitAdditions) in NSAttributedString.h
h) NSAttributedString(NSStringDrawing) in NSStringDrawing.h
i) NSAttributedString (NSAttributedStringAttachmentConveniences) in NSTextAttachment.h
j) NSMutableAttributedString (NSMutableAttributedStringAttachmentConveniences) in NSTextAttachment.h
k) NSBundle(NSBundleHelpExtension) in NSHelpManager.h
l) NSBundle(NSBundleImageExtension) in NSImage.h
m) NSObject (NSNibAwaking) in NSNibLoading.h
n) NSBundle (NSBundleSoundExtensions) in NSSound.h
3. In the iOS world it appears that the UIKit framework adds functionality to the classes through the use of "categories":
a) NSObject(UINibLoadingAdditions) in UINibLoading.h
b) NSCoder (UIGeometryKeyedCoding) in UIGeometry.h
c) NSIndexPath (UITableView) in UITableView.h
d) NSObject(UINibLoadingAdditions) in UINibLoading.h
e) NSString(UIStringDrawing) in UIStringDrawing.h
f) NSValue (NSValueUIGeometryExtensions) in UIGeometry.h
g) NSCoder (UIGeometryKeyedCoding) in UIGeometry.h
4. Categories ... the big elephant in the room. I got to all the above class extensions in a very round about way. In fact, I'm sure there are other extensions using categories that I missed. I know how to use categories to extend the functionality of my own classes, but how can I know this week's extensions (band aids) of Apple's built in classes? (Cynicism intended.)
In my many years of Mac programming (back to 1984), I've come to see Apple's documentation as a hodge podge. XCode techniques that don't consistently work (e.g. command-option double click doesn't always bring up a class reference and option double click likewise doesn't always work). I've seen extensions to classes band aided on (e.g. categories). And whereas iOS could have been a superset to MacOS, it's not ... e.g. table views in the two systems are handled completely differently! Apple needs to take time out from trying to squeeze every last bit of dollars out of its AppStore, etc and put some librarians to work cleaning up the documentation jungle ... otherwise the whole thing will collapse under its own weight.
I spent a considerable amount of time trying to make sense out of the documentation. I'm going to summarize what I found. I would appreciate if some of the senior members here would correct any mistakes I've made and maybe append their own knowledge to this summary.
1. In my MBP the paths to the Frameworks are:
/System/Library/Frameworks (for MacOS)
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks (for iOS Simulator)
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks (for iOS)
I'm not sure if the various .h files for a given framework are the same in all three worlds, but clearly the binaries are different because of the different processors.
2. In the MacOS world it that the AppKit framework adds functionality to classes through the use of "categories" (indicated in parentheses below):
a) NSColor (NSQuartzCoreAdditions) in NSColor.h
b) NSColor (NSAppKitAdditions) in NSColor.h
c) NSCoder (NSAppKitColorExtensions) in NSColor.h
d) CIImage (NSAppKitAdditions) in NSCIImageRep.h
e) NSAffineTransform (NSAppKitAdditons) in NSAffineTransform.h
f) NSAppleScript(NSExtensions) in NSApplescript.h of the AppKit framework
g) NSAttributedString (NSAttributedStringKitAdditions) in NSAttributedString.h
h) NSAttributedString(NSStringDrawing) in NSStringDrawing.h
i) NSAttributedString (NSAttributedStringAttachmentConveniences) in NSTextAttachment.h
j) NSMutableAttributedString (NSMutableAttributedStringAttachmentConveniences) in NSTextAttachment.h
k) NSBundle(NSBundleHelpExtension) in NSHelpManager.h
l) NSBundle(NSBundleImageExtension) in NSImage.h
m) NSObject (NSNibAwaking) in NSNibLoading.h
n) NSBundle (NSBundleSoundExtensions) in NSSound.h
3. In the iOS world it appears that the UIKit framework adds functionality to the classes through the use of "categories":
a) NSObject(UINibLoadingAdditions) in UINibLoading.h
b) NSCoder (UIGeometryKeyedCoding) in UIGeometry.h
c) NSIndexPath (UITableView) in UITableView.h
d) NSObject(UINibLoadingAdditions) in UINibLoading.h
e) NSString(UIStringDrawing) in UIStringDrawing.h
f) NSValue (NSValueUIGeometryExtensions) in UIGeometry.h
g) NSCoder (UIGeometryKeyedCoding) in UIGeometry.h
4. Categories ... the big elephant in the room. I got to all the above class extensions in a very round about way. In fact, I'm sure there are other extensions using categories that I missed. I know how to use categories to extend the functionality of my own classes, but how can I know this week's extensions (band aids) of Apple's built in classes? (Cynicism intended.)
Last edited: