Difference between Foundation Framework and Core Foundation Framework?

Objective CCocoaCocoa TouchFoundationCore Foundation

Objective C Problem Overview


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.

Objective C Solutions


Solution 1 - Objective C

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

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

Solution 2 - Objective C

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.

Solution 3 - Objective C

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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionopenfrogView Question on Stackoverflow
Solution 1 - Objective CamroxView Answer on Stackoverflow
Solution 2 - Objective CGeorg SchöllyView Answer on Stackoverflow
Solution 3 - Objective CTyler LiuView Answer on Stackoverflow