Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Foundation Kit
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Fundamental Objective-C framework within OpenStep specification}} {{More references|date=December 2009}} The '''Foundation Kit''', or just '''Foundation''' for short, is an [[Objective-C]] [[Software framework|framework]] in the [[OpenStep]] specification described by [[NeXT Computer, Inc.]]. It provides basic classes such as wrapper classes and data structure classes. This framework uses the prefix NS (for [[NeXTSTEP]]<ref>{{cite web |last1=Bumgarner |first1=Bill |title=The NS prefix predated Sun signing on to implement the OpenStep spec by quite a bit. |url=https://twitter.com/bbum/status/1260304075305791488}}</ref>). It is also part of [[Cocoa (API)|Cocoa]] and of the [[Swift (programming language)|Swift]] standard library. ==Classes== {{Expand list|date=March 2017}} ===NSObject=== This class is the most common base class for [[Objective-C]] hierarchies and provides standard methods for working with objects by [[Memory management|managing the memory]] associated with them and querying them. ===NSString and NSMutableString=== A class used for [[String (computer science)|string]] manipulation, representing a [[Unicode]] string (most typically using UTF-16 as its internal format). NSString is immutable, and thus can only be initialized but not modified. NSMutableString is a modifiable version. ===NSValue and NSNumber=== NSValue is a wrapper class for [[C variable types and declarations|C data types]], and NSNumber is a wrapper class for [[C (programming language)|C]] number data types such as '''int''', '''double''', and '''float'''. The [[data structure]]s in Foundation Kit can only hold objects, not primitive types, so wrappers such as NSValue and NSNumber are used in those data structures. ===NSArray and NSMutableArray=== A dynamic array of objects, supporting constant-time indexing. NSArray is an immutable version that can only be initialized with objects but not modified. NSMutableArray may be modified by adding and removing objects. ===NSDictionary and NSMutableDictionary=== An associative data container of key-value pairs with unique keys. Searching and element addition and removal (in the case of NSMutableDictionary) is faster-than-linear. However, the order of the elements within the container is not guaranteed. ===NSSet and NSMutableSet=== An associative container of unique keys, similar to NSDictionary, with the difference that members do not contain a data object. ===NSData and NSMutableData=== A wrapper for raw byte data. An object of this type can dynamically allocate and manage its data, or it can refer to data owned by and managed by something else (such as a static numeric array). ===NSDate, NSTimeZone and NSCalendar=== Classes that store times and dates and represent calendrical information. They offer methods for calculating date and time differences. Together with NSLocale, they provide methods for displaying dates and times in many formats, and for adjusting times and dates based on location in the world. ==Major implementations== ===macOS and iOS === The Foundation Kit is part of the macOS [[Cocoa (API)|Cocoa]] API. Beginning as the successor to [[OPENSTEP#OPENSTEP.2FMach|OPENSTEP/Mach]], this framework has deviated from [[OpenStep]] compliance, and is in some places incompatible. The Foundation Kit is in the iOS [[Cocoa Touch]] API. This framework is based on the macOS Cocoa. ===GNUstep=== The Foundation Kit is implemented in [[GNUstep]]'s Base Package (libs-base). This implementation is mostly comparable (4 classes are missing) and aims to be comparable with both the [[OpenStep]] API and later [[macOS]] additions. The missing classes have been dropped by Apple as well.<ref>{{cite web |title=OpenStep Compliance |url=http://www.gnustep.org/resources/documentation/Developer/Base/General/OpenStepCompliance.html |website=GNUstep (Base) |accessdate=17 February 2020}}</ref> ===Cocotron=== The Foundation Kit is implemented in [http://www.cocotron.org/ Cocotron], an open-source implementation of Cocoa. It is also a part of [[Darling (software)|Darling]]. ===PureFoundation=== [https://code.google.com/p/purefoundation/ PureFoundation] is an open-source implementation of Foundation that implements Foundation by wrapping [[Core Foundation]], just like in Cocoa, rather than create a separate Foundation from scratch like GNUstep and Cocotron. ===SwiftFoundation=== SwiftFoundation (swift-corelibs-foundation) is Apple's open-source [[Swift (programming language)|Swift]] implementation of the Foundation API for platforms where there is no Objective-C runtime. It also includes an implementation of [[Core Foundation]].<ref>{{cite web |title=swift-corelibs-foundation|website=GitHub|url=https://github.com/apple/swift-corelibs-foundation}}</ref> ===ApportableFoundation=== ApportableFoundation is an implementation of Foundation Kit (Foundation, CoreFoundation, and CFNetwork) based on Apple's CFLite release. It works on [[Android (operating system)|Android]] and other [[Linux]] systems, and makes up part of the Darling macOS translation layer for Linux. ==See also== * [[OpenStep]] * [[Application Kit]] * [[UIKit]] * [[GNUstep]] * [[Cocoa (API)]] ==References== {{Reflist}} ==External links== * [http://www.gnustep.org/resources/documentation/Developer/Base/Reference/Base.html GNUstep Base] * [https://developer.apple.com/documentation/foundation Apple Foundation Framework Reference] * [https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/CocoaFundamentals/WhatIsCocoa/WhatIsCocoa.html#//apple_ref/doc/uid/TP40002974-CH3-SW20 Foundation section in the Cocoa Fundamentals Guide] * [http://www.gnustep.org/resources/OpenStepSpec/FoundationKit/Classes/index.html List of Classes] in OpenStep specification * [https://www.levenez.com/NeXTSTEP/OpenStepSpec.pdf OPENSTEP SPECIFICATION] [[Category:NeXT]] [[Category:macOS APIs]] [[Category:MacOS programming tools]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite web
(
edit
)
Template:Expand list
(
edit
)
Template:More references
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)