π |
AttributedString
init()
init(stringLiteral: String)
init(markdown: String)
init(localized keyAndValue: String.LocalizationValue, table: String? = nil, bundle: Bundle? = nil, locale: Locale? = nil, comment: String? = nil)
init(localized key: String, table: String? = nil, bundle: Bundle? = nil, locale: Locale = Locale.current, comment: String? = nil)
|
π‘ |
Bundle
static var main: Bundle
static var module: Bundle
init?(path: String)
init?(url: URL)
init(for forClass: AnyClass)
init()
var bundleURL: URL
var resourceURL: URL?
var bundlePath: String
var resourcePath: String?
func url(forResource: String? = nil, withExtension: String? = nil, subdirectory: String? = nil, localization: String? = nil) -> URL?
func path(forResource: String? = nil, ofType: String? = nil, inDirectory: String? = nil, forLocalization: String? = nil) -> String?
var developmentLocalization: String
var localizations: [String]
func localizedString(forKey key: String, value: String?, table tableName: String?) -> String
var localizations: [String]
|
π‘ |
Calendar
- Only
.gregorian and .iso8601 identifiers are supported
init(identifier: Calendar.Identifier)
static var current: Calendar
var locale: Locale
var timeZone: TimeZone
var identifier: Calendar.Identifier
var eraSymbols: [String]
var monthSymbols: [String]
var shortMonthSymbols: [String]
var weekdaySymbols: [String]
var shortWeekdaySymbols: [String]
var amSymbol: String
var pmSymbol: String
func date(from components: DateComponents) -> Date?
func dateComponents(in zone: TimeZone? = nil, from date: Date) -> DateComponents
func dateComponents(_ components: Set<Calendar.Component>, from start: Date, to end: Date) -> DateComponents
func dateComponents(_ components: Set<Calendar.Component>, from date: Date) -> DateComponents
func component(_ component: Calendar.Component, from date: Date) -> Int
func date(byAdding components: DateComponents, to date: Date, wrappingComponents: Bool = false) -> Date?
func date(byAdding component: Calendar.Component, value: Int, to date: Date, wrappingComponents: Bool = false) -> Date?
func isDateInWeekend(_ date: Date) -> Bool
|
π |
CharacterSet
- Vended character sets are not complete
static var whitespaces: CharacterSet
static var whitespacesAndNewlines: CharacterSet
static var newlines: CharacterSet
static var urlHostAllowed: CharacterSet
static var urlFragmentAllowed: CharacterSet
static var urlPathAllowed: CharacterSet
static var urlQueryAllowed: CharacterSet
init()
init(charactersIn: String)
func insert(_ character: Unicode.Scalar) -> (inserted: Bool, memberAfterInsert: Unicode.Scalar)
mutating func insert(charactersIn: String)
func update(with character: Unicode.Scalar) -> Unicode.Scalar?
func remove(_ character: Unicode.Scalar) -> Unicode.Scalar?
mutating func remove(charactersIn: String)
func contains(_ member: Unicode.Scalar) -> Bool
func union(_ other: CharacterSet) -> CharacterSet
mutating func formUnion(_ other: CharacterSet)
func intersection(_ other: CharacterSet) -> CharacterSet
mutating func formIntersection(_ other: CharacterSet)
func subtracting(_ other: CharacterSet)
mutating func subtract(_ other: CharacterSet)
func symmetricDifference(_ other: CharacterSet) -> CharacterSet
mutating func formSymmetricDifference(_ other: CharacterSet)
func isSuperset(of other: CharacterSet) -> Bool
func isSubset(of other: CharacterSet) -> Bool
func isDisjoint(with other: CharacterSet) -> Bool
func isStrictSubset(of other: CharacterSet) -> Bool
func isStrictSuperset(of other: CharacterSet) -> Bool
var isEmpty: Bool
|
β
|
CocoaError |
β
|
ComparisonResult |
π |
CryptoKit
- See the CryptoKit topic for details on supported API.
|
β
|
CustomNSError |
π‘ |
Data
Data does not conform to Collection protocols
init()
init(count: Int)
init(capacity: Int)
init(_ data: Data)
init(_ bytes: [UInt8], length: Int? = nil)
init(_ checksum: Digest)
init?(base64Encoded: String, options: Data.Base64DecodingOptions = [])
init(contentsOfFile filePath: String) throws
init(contentsOf url: URL, options: Data.ReadingOptions = [])
var count: Int
var isEmpty: Bool
var bytes: [UInt8]
var utf8String: String?
func base64EncodedString() -> String
func sha256() -> Data
func hex() -> String
mutating func reserveCapacity(_ minimumCapacity: Int)
mutating func append(_ other: Data)
mutating func append(contentsOf bytes: [UInt8])
mutating func append(contentsOf data: Data)
subscript(index: Int) -> UInt8
func write(to url: URL, options: Data.WritingOptions = []) throws
|
π‘ |
Date
- Formatting functions not supported with the exception of:
func ISO8601Format(_ style: Date.ISO8601FormatStyle = .iso8601) -> String
|
π’ |
DateComponents
nanosecond , weekdayOrdinal , quarter , yearForWeekOfYear are not supported
|
π‘ |
DateFormatter
var dateStyle: DateFormatter.Style
var timeStyle: DateFormatter.Style
var isLenient: Bool
var dateFormat: String
func setLocalizedDateFormatFromTemplate(dateFormatTemplate: String)
static func dateFormat(fromTemplate: String, options: Int, locale: Locale?) -> String?
static func localizedString(from date: Date, dateStyle: DateFormatter.Style, timeStyle: DateFormatter.Style) -> String
var timeZone: TimeZone?
var locale: Locale?
var calendar: Calendar?
func date(from string: String) -> Date?
func string(from date: Date) -> String
func string(for obj: Any?) -> String?
|
β
|
DateInterval |
π |
Decimal
- Aliased to
java.math.BigDecimal
|
π |
DispatchQueue
static let main: DispatchQueue
func async(execute: () -> Void)
func asyncAfter(deadline: DispatchTime, execute: () -> Void)
func asyncAfter(wallDeadline: DispatchWallTime, execute: () -> Void)
|
π’ |
FileManager
static let `default`: FileManager
let temporaryDirectory: URL
let currentDirectoryPath: String
func createSymbolicLink(at url: URL, withDestinationURL destinationURL: URL) throws
func createSymbolicLink(atPath path: String, withDestinationPath destinationPath: String) throws
func createDirectory(at url: URL, withIntermediateDirectories: Bool, attributes: [FileAttributeKey : Any]? = nil) throws
func createDirectory(atPath path: String, withIntermediateDirectories: Bool, attributes: [FileAttributeKey : Any]? = nil) throws
func destinationOfSymbolicLink(atPath path: String) throws
func attributesOfItem(atPath path: String) throws -> [FileAttributeKey: Any]
func setAttributes(_ attributes: [FileAttributeKey : Any], ofItemAtPath path: String) throws
func createFile(atPath path: String, contents: Data? = nil, attributes: [FileAttributeKey : Any]? = nil) -> Bool
func copyItem(atPath path: String, toPath: String) throws
func copyItem(at url: URL, to: URL) throws
func moveItem(atPath path: String, toPath: String) throws
func moveItem(at path: URL, to: URL) throws
func subpathsOfDirectory(atPath path: String) throws -> [String]
func subpaths(atPath path: String) -> [String]?
func removeItem(atPath path: String) throws
func removeItem(at url: URL) throws
func fileExists(atPath path: String) -> Bool
func isReadableFile(atPath path: String) -> Bool
func isExecutableFile(atPath path: String) -> Bool
func isDeletableFile(atPath path: String) -> Bool
func isWritableFile(atPath path: String) -> Bool
func contentsOfDirectory(at url: URL, includingPropertiesForKeys: [URLResourceKey]?) throws -> [URL]
func contentsOfDirectory(atPath path: String) throws -> [String]
func url(for directory: FileManager.SearchPathDirectory, in domain: FileManager.SearchPathDomainMask, appropriateFor url: URL?, create shouldCreate: Bool) throws -> URL
|
β
|
HTTPURLResponse |
π’ |
IndexPath
- Cannot assign from an array literal
- Cannot assign to a range subscript
|
π‘ |
IndexSet
- This is an inefficient implementation using an internal
Set
init(integersIn range: any RangeExpression<Int>)
init(integer: Int)
init()
func integerGreaterThan(_ integer: Int) -> Int?
func integerLessThan(_ integer: Int) -> Int?
func integerGreaterThanOrEqualTo(_ integer: Int) -> Int?
func integerLessThanOrEqualTo(_ integer: Int) -> Int?
func count(in range: any RangeExpression<Int>) -> Int
func contains(integersIn range: any RangeExpression<Int>) -> Bool
func contains(integersIn indexSet: IntSet) -> Bool
func intersects(integersIn range: any RangeExpression<Int>) -> Bool
mutating func insert(integersIn range: any RangeExpression<Int>)
mutating func remove(integersIn range: any RangeExpression<Int>)
func filteredIndexSet(in range: any RangeExpression<Int>, includeInteger: (Int) throws -> Bool) rethrows -> IndexSet
func filteredIndexSet(includeInteger: (Int) throws -> Bool) rethrows -> IndexSet
- Supports the full
SetAlgebra protocol
|
π‘ |
ISO8601DateFormatter
static func string(from date: Date, timeZone: TimeZone) -> String
var timeZone: TimeZone?
func date(from string: String) -> Date?
func string(from date: Date) -> String
func string(for obj: Any?) -> String?
|
β
|
JSONDecoder |
β
|
JSONEncoder |
β
|
JSONSerialization |
β
|
Locale |
β
|
LocalizedError |
β
|
LocalizedStringResource |
β
|
Logger |
β
|
Notification |
π‘ |
NotificationCenter
static let default: NotificationCenter
func addObserver(forName name: Notification.Name?, object: Any?, queue: OperationQueue?, using block: (Notification) -> Void) -> Any
func removeObserver(_ observer: Any)
func post(_ notification: Notification)
func post(name: Notification.Name, object: Any?, userInfo: [AnyHashable: Any]? = nil)
func notifications(named: Notification.Name, object: AnyObject? = nil) -> Notifications
- Also see support for
NotificationCenter.publisher in the SkipModel module
|
β
|
NSError |
β
|
NSLock |
β
|
NSLocalizedString |
β
|
NSRecursiveLock |
π’ |
Number
init(value: Int8)
init(value: Int16)
init(value: Int32)
init(value: Int64)
init(value: UInt8)
init(value: UInt16)
init(value: UInt32)
init(value: UInt64)
init(value: Float)
init(value: Double)
init(_ value: Int8)
init(_ value: Int16)
init(_ value: Int32)
init(_ value: Int64)
init(_ value: UInt8)
init(_ value: UInt16)
init(_ value: UInt32)
init(_ value: UInt64)
init(_ value: Float)
init(_ value: Double)
var doubleValue: Double
var intValue: Int
var longValue: Int64
var int64Value: Int64
var int32Value: Int32
var int16Value: Int16
var int8Value: Int8
|
π’ |
NumberFormatter
- The following styles are supported:
.none, .decimal, .currency, .percent
var numberStyle: NumberFormatter.Style
var locale: Locale?
var format: String
var groupingSize: Int
var generatesDecimalNumbers: Bool
var alwaysShowsDecimalSeparator: Bool
var usesGroupingSeparator: Bool
var multiplier: NSNumber?
var groupingSeparator: String?
var percentSymbol: String?
var currencySymbol: String?
var zeroSymbol: String?
var minusSign: String?
var exponentSymbol: String?
var negativeInfinitySymbol: String
var positiveInfinitySymbol: String
var internationalCurrencySymbol: String?
var decimalSeparator: String?
var currencyCode: String?
var currencyDecimalSeparator: String?
var notANumberSymbol: String?
var positiveSuffix: String?
var negativeSuffix: String?
var positivePrefix: String?
var negativePrefix: String?
var maximumFractionDigits: Int
var minimumFractionDigits: Int
var maximumIntegerDigits: Int
var minimumIntegerDigits: Int
func string(from number: NSNumber) -> String?
func string(from number: Int) -> String?
func string(for object: Any?) -> String?
func number(from string: String) -> NSNumber?
|
π |
OperationQueue
static let main: OperationQueue
|
π’ |
OSAllocatedUnfairLock
init()
init(initialState: State)
init(uncheckedState initialState: State)
func lock()
func unlock()
func lockIfAvailable() -> Bool
func withLockUnchecked<R>(_ body: (inout State) throws -> R) rethrows -> R
func func withLockUnchecked<R>(_ body: () throws -> R) rethrows -> R
func withLock<R>(_ body: (inout State) throws -> R) rethrows -> R
func withLock<R>(_ body: () throws -> R) rethrows -> R
func withLockIfAvailableUnchecked<R>(_ body: (inout State) throws -> R) rethrows -> R?
func withLockIfAvailableUnchecked<R>(_ body: () throws -> R) rethrows -> R?
func withLockIfAvailable<R>(_ body: @Sendable (inout State) throws -> R) rethrows -> R?
func withLockIfAvailable<R>(_ body: () throws -> R) rethrows -> R?
|
β
|
POSIXError |
π‘ |
ProcessInfo
static let processInfo: ProcessInfo
var globallyUniqueString: String
var systemProperties: [String: String]
var environment: [String : String]
var processIdentifier: Int32
var arguments: [String]
var hostName: String
var processorCount: Int
var operatingSystemVersionString: String
var isMacCatalystApp: Bool
var isiOSAppOnMac: Bool
|
π |
PropertyListSerialization
static func propertyList(from: Data, options: PropertyListSerialization.ReadOptions = [], format: Any?) throws -> [String: String]?
- Ignores any given
options and format
|
π |
RunLoop
|
β
|
RecoverableError |
π’ |
String
- Core
String API is defined in SkipLib . These extensions are defined in SkipFoundation
init(data: Data, encoding: StringEncoding)
init(bytes: [UInt8], encoding: StringEncoding)
init(contentsOf: URL)
var capitalized: String
var deletingLastPathComponent: String
func replacingOccurrences(of search: String, with replacement: String) -> String
func components(separatedBy separator: String) -> [String]
func trimmingCharacters(in set: CharacterSet) -> String
func addingPercentEncoding(withAllowedCharacters: CharacterSet) -> String?
var removingPercentEncoding: String?
var utf8Data: Data
var utf8: [UInt8]
var utf16: [UInt8]
var utf32: [UInt8]
var unicodeScalars: [UInt8]
func data(using: StringEncoding, allowLossyConversion: Bool = true) -> Data?
func write(to url: URL, atomically useAuxiliaryFile: Bool, encoding enc: StringEncoding) throws
func write(toFile path: String, atomically useAuxiliaryFile: Bool, encoding enc: StringEncoding) throws
|
β
|
StringLocalizationValue |
β
|
func strlen(_ string: String) -> Int |
β
|
func strncmp(_ str1: String, _ str2: String) -> Int |
π‘ |
Timer
init(timeInterval: TimeInterval, repeats: Bool, block: (Timer) -> Void)
static func scheduledTimer(withTimeInterval interval: TimeInterval, repeats: Bool, block: (Timer) -> Void) -> Timer
var timeInterval: TimeInterval
func invalidate()
var isValid: Bool
var userInfo: Any?
- Also see support for
Timer.publish in the SkipModel module
|
π’ |
TimeZone
static var current: TimeZone
static var autoupdatingCurrent: TimeZone
static var `default`: TimeZone
static var system: TimeZone
static var local: TimeZone
static var gmt: TimeZone
init?(identifier: String)
init?(abbreviation: String)
init?(secondsFromGMT seconds: Int)
var identifier: String
func abbreviation(for date: Date = Date()) -> String?
func secondsFromGMT(for date: Date = Date()) -> Int
func isDaylightSavingTime(for date: Date = Date()) -> Bool
func daylightSavingTimeOffset(for date: Date = Date()) -> TimeInterval
var nextDaylightSavingTimeTransition: Date?
func nextDaylightSavingTimeTransition(after date: Date) -> Date?
static var knownTimeZoneIdentifiers: [String]
static var knownTimeZoneNames: [String]
static var abbreviationDictionary: [String : String]
func localizedName(for style: NameStyle, locale: Locale?) -> String?
|
β
|
UnknownNSError |
π’ |
URL
init(_ url: URL)
init?(string: String, relativeTo baseURL: URL? = nil)
init?(string: String, encodingInvalidCharacters: Bool)
init(fileURLWithPath path: String, isDirectory: Bool? = nil, relativeTo base: URL? = nil)
static func currentDirectory() -> URL
static var homeDirectory: URL
static var temporaryDirectory: URL
static var cachesDirectory: URL
static var documentsDirectory: URL
let baseURL: URL?
var scheme: String?
var host: String?
func host(percentEncoded: Bool = true) -> String?
var port: Int?
var path: String?
func path(percentEncoded: Bool = true) -> String?
var hasDirectoryPath: Bool
var query: String?
func query(percentEncoded: Bool = true) -> String?
var fragment: String?
func fragment(percentEncoded: Bool = true) -> String?
var standardized: URL
var standardizedFileURL: URL
mutating func standardize()
var absoluteURL: URL
var absoluteString: String
var relativePath: String
var relativeString: String
var pathComponents: [String]
var lastPathComponent: String
var pathExtension: String
var isFileURL: Bool
func appendingPathComponent(_ pathComponent: String) -> URL
mutating func appendPathComponent(_ pathComponent: String)
func appendingPathComponent(_ pathComponent: String, isDirectory: Bool) -> URL
mutating func appendPathComponent(_ pathComponent: String, isDirectory: Bool)
func appendingPathExtension(_ pathExtension: String) -> URL
mutating func appendPathExtension(_ pathExtension: String)
func deletingLastPathComponent() -> URL
mutating func deleteLastPathComponent() -> URL
func deletingPathExtension() -> URL
mutating func deletePathExtension()
func resolvingSymlinksInPath() -> URL
mutating func resolveSymlinksInPath() -> URL
func checkResourceIsReachable() throws -> Bool
|
π’ |
URLComponents
init()
init?(url: URL, resolvingAgainstBaseURL resolve: Bool)
init?(string: String)
init?(string: String, encodingInvalidCharacters: Bool)
var url: URL?
func url(relativeTo base: URL?) -> URL?
var string: String?
var scheme: String?
var host: String?
var port: Int?
var path: String
var fragment: String?
var query: String?
var queryItems: [URLQueryItem]?
var percentEncodedHost: String?
var encodedHost: String?
var percentEncodedPath: String
var percentEncodedQuery: String?
var percentEncodedFragment: String?
var percentEncodedQueryItems: [URLQueryItem]?
|
β
|
URLError |
β
|
URLQueryItem |
π‘ |
URLRequest
- Many properties are currently ignored by
URLSession
httpBodyStream is not supported
|
β
|
URLResponse |
π‘ |
URLSession
static let shared: URLSession
init(configuration: URLSessionConfiguration, delegate: URLSessionDelegate? = nil, delegateQueue: OperationQueue? = nil)
var configuration: URLSessionConfiguration
var sessionDescription: String?
var delegate: URLSessionDelegate?
var delegateQueue: OperationQueue?
func data(for request: URLRequest, delegate: URLSessionTaskDelegate? = nil) async throws -> (Data, URLResponse)
func data(from url: URL, delegate: URLSessionTaskDelegate? = nil) async throws -> (Data, URLResponse)
func upload(for request: URLRequest, fromFile fileURL: URL, delegate: URLSessionTaskDelegate? = nil) async throws -> (Data, URLResponse)
func upload(for request: URLRequest, from bodyData: Data, delegate: URLSessionTaskDelegate? = nil) async throws -> (Data, URLResponse)
func bytes(for request: URLRequest, delegate: URLSessionTaskDelegate? = nil) async throws -> (AsyncBytes, URLResponse)
func bytes(from url: URL, delegate: URLSessionTaskDelegate? = nil) async throws -> (AsyncBytes, URLResponse)
func dataTask(with url: URL, completionHandler: ((Data?, URLResponse?, Error?) -> Void)? = nil) -> URLSessionDataTask
func dataTask(with request: URLRequest, completionHandler: ((Data?, URLResponse?, Error?) -> Void)? = nil) -> URLSessionDataTask
func uploadTask(with: URLRequest, from: Data?, completionHandler: ((Data?, URLResponse?, Error?) -> Void)? = nil) -> URLSessionUploadTask
func uploadTask(with: URLRequest, fromFile: URL, completionHandler: ((Data?, URLResponse?, Error?) -> Void)?) -> URLSessionUploadTask
func webSocketTask(with url: URL) -> URLSessionWebSocketTask
func webSocketTask(with request: URLRequest) -> URLSessionWebSocketTask
func webSocketTask(with url: URL, protocols: [String]) -> URLSessionWebSocketTask
func finishTasksAndInvalidate()
func getTasksWithCompletionHandler(_ handler: ([URLSessionDataTask], [URLSessionUploadTask], [URLSessionDownloadTask]) -> Void)
var tasks: ([URLSessionDataTask], [URLSessionUploadTask], [URLSessionDownloadTask])
func getAllTasks(handler: ([URLSessionTask]) -> Void)
var allTasks: [URLSessionTask]
func invalidateAndCancel()
struct AsyncBytes: AsyncSequence
|
π‘ |
URLSessionConfiguration
- Many properties are currently ignored by
URLSession
|
π’ |
URLSessionDataTask
static let defaultPriority: Float
static let lowPriority: Float
static let highPriority: Float
var taskIdentifier: Int
var taskDescription: String?
var originalRequest: URLRequest?
var delegate: URLSessionTaskDelegate?
var state: URLSessionTask.State
var error: Error?
var priority: Float
func suspend()
func resume()
func cancel()
|
π’ |
URLSessionUploadTask
static let defaultPriority: Float
static let lowPriority: Float
static let highPriority: Float
var taskIdentifier: Int
var taskDescription: String?
var originalRequest: URLRequest?
var delegate: URLSessionTaskDelegate?
var state: URLSessionTask.State
var error: Error?
var priority: Float
func suspend()
func resume()
func cancel()
|
π’ |
URLSessionWebSocketTask
static let defaultPriority: Float
static let lowPriority: Float
static let highPriority: Float
var taskIdentifier: Int
var taskDescription: String?
var originalRequest: URLRequest?
var delegate: URLSessionTaskDelegate?
var state: URLSessionTask.State
var error: Error?
var priority: Float
func suspend()
func resume()
func cancel()
func cancel(with closeCode: CloseCode, reason: Data?)
var maximumMessageSize: Int
var closeCode: CloseCode
var closeReason: Data?
func send(_ message: Message) async throws -> Void
func receive() async throws -> Message
|
π’ |
UserDefaults
static var standard: UserDefaults
init(suiteName: String?)
func register(defaults registrationDictionary: [String : Any])
func set(_ value: Int, forKey defaultName: String)
func set(_ value: Boolean, forKey defaultName: String)
func set(_ value: Double, forKey defaultName: String)
func set(_ value: String, forKey defaultName: String)
func set(_ value: Any?, forKey defaultName: String)
func removeObject(forKey defaultName: String)
func object(forKey defaultName: String) -> Any?
func string(forKey defaultName: String) -> String?
func double(forKey defaultName: String) -> Double?
func integer(forKey defaultName: String) -> Int?
func bool(forKey defaultName: String) -> Bool?
func url(forKey defaultName: String) -> URL?
func data(forKey defaultName: String) -> Data?
func dictionaryRepresentation() -> [String : Any]
- Array and dictionary values are not supported
|
π’ |
UUID
init()
init?(uuidString: String)
static func fromString(uuidString: String) -> UUID?
var uuidString: String
|