Question

I try to get the hang of it, but for now both seem the same thing to me. However, Xcode allows to create an Console App with choice of using "Core Foundation" or just "Foundation". Maybe someone can point out the differences.

Was it helpful?

Solution

Core Foundation is the C-level API, which provides CFString, CFDictionary and the like.

Foundation is Objective-C, which provides NSString, NSDictionary, etc.

OTHER TIPS

CoreFoundation is written in C while Foundation is written in Objective-C;

Foundation has a lot more classes;

CoreFoundation is the common base of Foundation and Carbon.

A little history

Ref: http://ridiculousfish.com/blog/posts/bridge.html

Mac OS 9 and NEXTSTEP merged to create Mac OS X. And Core Foundation was created as a common ground for classic Mac toolbox and OPENSTEP(Which I believe is the toolbox for NEXTSTEP).

Classic Mac toolbox evolved and became Carbon.

OPENSTEP evolved and became Cocoa which includes Foundation.

So I conclude that, Core Foundation has much longer history and it is the foundation of Foundation. Since Foundation is kind of high-level and modern, I will stick to it unless I need to handle some historic issues which requires Core Foundation.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top