layout | title |
---|---|
page |
Foundation on Linux |
As a core library which underpins many Swift packages, the Foundation project is a key part of the overall swift.org
ecosystem. Foundation provides a baseline of fundamental types and functionality which is useful to all applications and can be implemented on a broad range of platforms and operating systems.
Since Swift became open source in 2015 the community has worked together to improve the implementation of Foundation on Linux and the project has progessed significantly.
(Data generated from git
using this script)
Development of Foundation is coordinated on the swift-corelibs-dev mailing list, where the community can help new contributors.
The tables below show the current status of each component in Foundation. Areas particularly suited to new contributors are highlighted in bold, and contributions from the community are actively encouraged.
-
Runtime: base functionality.
The classes and methods in this group provide an interface for interoperability between C code and Swift. They also provide common layers used throughout the framework such as the root class
NSObject
.Name Status Notes NSEnumerator
Complete NSGetSizeAndAlignment
Complete NSStringFromClass
andNSClassFromString
Mostly complete NSObject
Complete -
URL: Networking primitives.
Functionality for manipulating URLs and paths via a common model object. The group also has classes for creating and receiving network connections.
Entity Name Status Notes URLAuthenticationChallenge
Unimplemented URLCache
Unimplemented URLCredential
Complete URLCredentialStorage
Unimplemented NSURLError*
Complete URLProtectionSpace
Unimplemented URLProtocol
Unimplemented URLProtocolClient
Unimplemented NSURLRequest
Mostly Complete NSMutableURLRequest
Mostly Complete URLResponse
Mostly Complete NSHTTPURLResponse
Mostly Complete NSURL
Mostly Complete Resource values are unimplemented NSURLQueryItem
Mostly Complete URLResourceKey
Complete URLFileResourceType
Complete URL
Complete URLResourceValues
Complete URLComponents
Complete URLRequest
Complete HTTPCookie
Complete HTTPCookiePropertyKey
Complete HTTPCookieStorage
Unimplemented Host
Complete URLSession
Mostly Complete shared
, invalidation, resetting, flushing, getting tasks, and others are unimplementedURLSessionConfiguration
Mostly Complete ephemeral
andbackground(withIdentifier:)
are unimplementedURLSessionDelegate
Complete URLSessionTask
Mostly Complete cancel()
,createTransferState(url:)
with streams, and others are unimplementedURLSessionDataTask
Complete URLSessionUploadTask
Complete URLSessionDownloadTask
Incomplete cancel(byProducingResumeData:)
is unimplementedURLSessionStreamTask
Unimplemented -
Formatters: Locale and language-correct formatted values.
This group contains the is the base
NSFormatter
class and its subclasses. These formatters can be used for dates, numbers, sizes, energy, and many other types.Entity Name Status Notes DateComponentFormatter
Unimplemented DateIntervalFormatter
Unimplemented EnergyFormatter
Unimplemented ISO8601DateFormatter
Complete LengthFormatter
Complete MassFormatter
Complete NumberFormatter
Mostly Complete objectValue(_:range:)
remains unimplementedPersonNameComponentsFormatter
Unimplemented ByteCountFormatter
Complete DateFormatter
Mostly Complete objectValue(_:range:)
remain unimplementedFormatter
Complete MeasurementFormatter
Unimplemented -
Predicates: Base functionality for building queries.
This is the base class and subclasses for
NSPredicate
andNSExpression
.Entity Name Status Notes NSExpression
Unimplemented NSComparisonPredicate
Unimplemented NSCompoundPredicate
Complete NSPredicate
Incomplete Only boolean and block evaluations are implemented; all else remains unimplemented -
Serialization: Serialization and deserialization functionality.
The classes in this group perform tasks like parsing and writing JSON, property lists and binary archives.
Entity Name Status Notes NSJSONSerialization
Mostly Complete jsonObject(with:options:)
with streams remains unimplementedNSKeyedArchiver
Complete NSKeyedUnarchiver
Mostly Complete decodingFailurePolicy.set
remains unimplementedNSCoder
Incomplete Decoding methods which require a concrete implementation are unimplemented PropertyListSerialization
Complete -
XML: A group of classes for parsing and representing XML documents and elements.
The classes provided in this group are responsible for parsing and validating XML. They should be an interface for representing libxml2 in a more object-oriented manner.
Entity Name Status Notes XMLDocument
Mostly Complete init()
,replacementClass(for:)
, andobject(byApplyingXSLT...)
are unimplementedXMLDTD
Mostly Complete init()
is unimplementedXMLDTDNode
Complete XMLElement
Incomplete init(xmlString:)
,elements(forLocalName:uri:)
,attribute(forLocalName:uri:)
, namespace support, and others are unimplementedXMLNode
Incomplete localName(forName:)
,prefix(forName:)
,predefinedNamespace(forPrefix:)
, and others are unimplementedXMLParser
Complete -
Collections: A group of classes to contain objects.
The classes provided in this group provide basic collections. The primary role for these classes is to provide an interface layer between the CoreFoundation implementations and the standard library implementations. Additionally, they have useful extras like serialization support. There are also additional collection types that the standard library does not support.
Note: See Known Issues for more information about bridging between Foundation collection types and Swift standard library collection types.
Entity Name Status Notes NSOrderedSet
Mostly Complete NS[Mutable]Copying
, andarray
&set
(and associated indexing methods) are unimplementedNSMutableOrderedSet
Mostly Complete NSCoding
andsortRange(_:options:, usingComparator:)
with non-empty options remain unimplementedNSIndexSet
Mostly Complete NSCoding
,NSCopying
, and concurrentenumerateWithOptions(_:range:paramType:returnType:block:)
remain unimplementedNSMutableIndexSet
Mostly Complete shiftIndexesStarting(at:by:)
remains unimplementedIndexSet
Complete NSIndexPath
Mostly Complete NSCoding
,NSCopying
,getIndexes(_:)
remain unimplementedIndexPath
Complete NSArray
Mostly Complete Reading/writing to files/URLs, concurrent enumerateObjects(at:options:using:)
, andsortedArray(from:options:usingComparator:)
with options remain unimplementedNSMutableArray
Mostly Complete exchangeObject(at:withObjectAt:)
andreplaceObjects(in:withObjectsFromArray:)
remain unimplemented for types other thanNSMutableArray
NSDictionary
Mostly Complete NSCoding
with non-keyed-coding archivers,descriptionInStringsFileFormat
,sharedKeySet(forKeys:)
, and reading/writing to files/URLs remain unimplementedNSMutableDictionary
Mostly Complete descriptionInStringsFileFormat
,sharedKeySet(forKeys:)
, and reading/writing to files/URLs remain unimplementedNSSet
Mostly Complete description(withLocale:)
andcustomMirror
remain unimplementedNSMutableSet
Mostly Complete NSCountedSet
Mostly Complete NSCache
Complete NSSortDescriptor
Unimplemented -
RunLoop: Timers, streams and run loops.
The classes in this group provide support for scheduling work and acting upon input from external sources.
Entity Name Status Notes Port
Unimplemented MessagePort
Unimplemented SocketPort
Unimplemented PortMessage
Unimplemented RunLoop
Mostly Complete add(_:forMode:)
andremove(_:forMode:)
are unimplementedNSStream
Mostly Complete Stream
Unimplemented Methods which require a concrete implementation remain unimplemented InputStream
Mostly Complete getBuffer(_:length:)
remains unimplementedNSOutputStream
Complete Timer
Complete -
String: A set of classes for scanning, manipulating and storing string values.
The NSString implementation is present to provide an interface layer between CoreFoundation and Swift, but it also adds additional functionality on top of the Swift standard library String type. Other classes in this group provide mechanisms to scan, match regular expressions, store attributes in run arrays attached to strings, and represent sets of characters.
Note: See Known Issues for more information about bridging between the Foundation NSString types and Swift standard library String type.
Entity Name Status Notes NSRegularExpression
Complete Scanner
Mostly Complete NSTextCheckingResult
Mostly Complete NSAttributedString
Incomplete NSMutableAttributedString
Unimplemented NSCharacterSet
Mostly Complete NSMutableCharacterSet
Mostly Complete CharacterSet
Complete NSString
Mostly Complete init(contentsOf:usedEncoding:)
,enumerateSubstrings(in:options:using:)
are unimplementedNSStringEncodings
Complete NSStringAPI
N/A ExtraStringAPIs
Complete -
Number: A set of classes and methods for representing numeric values and structures.
Entity Name Status Notes NSRange
Complete Decimal
Unimplemented NSDecimalNumber
Unimplemented NSDecimalNumberHandler
Unimplemented CGPoint
Complete CGSize
Complete CGRect
Complete NSEdgeInsets
Mostly Complete NSGeometry
Mostly Complete CGFloat
Complete AffineTransform
Complete NSAffineTransform
Complete NSNumber
Complete NSValue
Complete NSMeasurement
Unimplemented Measurement
Complete UnitConverter
Complete UnitConverterLinear
Complete Unit
Complete Dimension
Complete UnitAcceleration
Complete UnitAngle
Complete UnitArea
Complete UnitConcentrationMass
Complete UnitDispersion
Complete UnitDuration
Complete UnitElectricCharge
Complete UnitElectricCurrent
Complete UnitElectricPotentialDifference
Complete UnitElectricResistance
Complete UnitEnergy
Complete UnitFrequency
Complete UnitFuelEfficiency
Complete UnitLength
Complete UnitIlluminance
Complete UnitMass
Complete UnitPower
Complete UnitPressure
Complete UnitSpeed
Complete UnitTemperature
Complete UnitVolume
Complete -
UserDefaults: A mechanism for storing values to persist as user settings and local.
Entity Name Status Notes UserDefaults
Incomplete Domain support, and forced objects are unimplemented. Unit tests are currently commented out NSLocale
Complete Locale
Complete -
OS: Mechanisms for interacting with the operating system on a file system level as well as process and thread level
Entity Name Status Notes FileHandle
Mostly Complete NSCoding
, and background operations are unimplementedPipe
Complete FileManager
Incomplete URL searches, relationship lookups, item copying, cross-device moving, recursive linking, and others are unimplemented Process
Mostly Complete interrupt()
,terminate()
,suspend()
, andresume()
are unimplementedBundle
Mostly Complete allBundles
,init(for:)
,classNamed()
, andprincipalClass
remain unimplementedProcessInfo
Complete Thread
Complete Operation
Complete BlockOperation
Complete OperationQueue
Complete Lock
Mostly Complete lock(before:)
remains unimplementedConditionLock
Complete RecursiveLock
Mostly Complete lock(before:)
remains unimplementedCondition
Complete -
DateTime: Classes for representing dates, timezones, and calendars.
Entity Name Status Notes NSCalendar
Complete autoupdatingCurrent
andenumerateDates
are unimplementedNSDateComponents
Complete Calendar
Complete DateComponents
Complete NSDate
Complete NSDateInterval
Complete DateInterval
Complete Date
Complete NSTimeZone
Mostly Complete local
,timeZoneDataVersion
and settingabbreviationDictionary
remain unimplementedTimeZone
Complete -
Notifications: Classes for loosely coupling events from a set of many observers.
Entity Name Status Notes NSNotification
Complete NotificationCenter
Mostly Complete Adding observers to non- nil
queues remains unimplementedNotification
Complete NotificationQueue
Complete -
Model: Representations for abstract model elements like null, data, and errors.
Entity Name Status Notes NSNull
Complete NSData
Complete NSMutableData
Complete Data
Complete NSProgress
Complete NSError
Complete NSUUID
Complete UUID
Complete NSPersonNameComponents
Complete PersonNameComponents
Complete