Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

relation between foundation and cocoa frameworks

I want to know how foundation framework and cocoa framework are related.

who is super set of who?

what properties each framework provides?,

how these two frameworks are wrapped together?

like image 376
Vinayaka Karjigi Avatar asked Oct 20 '25 04:10

Vinayaka Karjigi


1 Answers

Foundation is, as its name suggests, the base foundation of everything. It provides common objects and storage classes such as NSString, NSArray, and all :

The Foundation framework defines a base layer of Objective-C classes. In addition to providing a set of useful primitive object classes, it introduces several paradigms that define functionality not covered by the Objective-C language. The Foundation framework is designed with these goals in mind:

  • Provide a small set of basic utility classes. Make software development easier by introducing consistent conventions for things such as deallocation.
  • Support Unicode strings, object persistence, and object distribution.
  • Provide a level of OS independence, to enhance portability.

The Foundation framework includes the root object class, classes representing basic data types such as strings and byte arrays, collection classes for storing other objects, classes representing system information such as dates, and classes representing communication ports.

[from Foundation doc at Apple]

Cocoa (and Cocoa Touch, closely related to UIKit) are build atop of Foundation and provide much higher-level objects (views, touches, ...). See the documentation on Cocoa Touch and the one on Cocoa.

like image 92
Cyrille Avatar answered Oct 22 '25 01:10

Cyrille



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!