iOS Developer Library

Developer

Foundation Framework Reference Foundation Constants Reference

Options
Deployment Target:

On This Page
Language:

Foundation Constants Reference

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Swift

import Foundation

Objective-C

@import Foundation;

This document defines constants in the Foundation framework that are not associated with a particular class.

Constants

Enumerations

  • Specifies an byte-order format.

    Declaration

    Objective-C

    enum _NSByteOrder { NS_UnknownByteOrder = CFByteOrderUnknown, NS_LittleEndian = CFByteOrderLittleEndian, NS_BigEndian = CFByteOrderBigEndian };

    Constants

    • NS_UnknownByteOrder

      NS_UnknownByteOrder

      The byte order is unknown.

      Available in iOS 2.0 and later.

    • NS_LittleEndian

      NS_LittleEndian

      The byte order is little endian.

      Available in iOS 2.0 and later.

    • NS_BigEndian

      NS_BigEndian

      The byte order is big endian.

      Available in iOS 2.0 and later.

    Discussion

    These constants are returned by NSHostByteOrder.

  • Defines a value that indicates that an item requested couldn’t be found or doesn’t exist.

    Declaration

    Objective-C

    enum { NSNotFound = NSIntegerMax };

    Constants

    • NSNotFound

      NSNotFound

      A value that indicates that an item requested couldn’t be found or doesn’t exist.

      Available in iOS 2.0 and later.

    Discussion

    NSNotFound is typically used by various methods and functions that search for items in serial data and return indices, such as characters in a string object or ids in an NSArray object.

  • Options for Block enumeration operations.

    Declaration

    Swift

    struct NSEnumerationOptions : RawOptionSetType { init(_ rawValue: UInt) init(rawValue rawValue: UInt) static var Concurrent: NSEnumerationOptions { get } static var Reverse: NSEnumerationOptions { get } }

    Objective-C

    enum { NSEnumerationConcurrent = (1UL << 0), NSEnumerationReverse = (1UL << 1), }; typedef NSUInteger NSEnumerationOptions;

    Constants

    • Concurrent

      NSEnumerationConcurrent

      Specifies that the Block enumeration should be concurrent.

      The order of invocation is nondeterministic and undefined; this flag is a hint and may be ignored by the implementation under some circumstances; the code of the Block must be safe against concurrent invocation.

      Available in iOS 4.0 and later.

    • Reverse

      NSEnumerationReverse

      Specifies that the enumeration should be performed in reverse.

      This option is available for NSArray and NSIndexSet classes; its behavior is undefined for NSDictionary and NSSet classes, or when combined with the NSEnumerationConcurrent flag.

      Available in iOS 4.0 and later.

    Import Statement

    Objective-C

    @import Foundation;

    Swift

    import Foundation

    Availability

    Available in iOS 4.0 and later.

  • These constants are used to indicate how items in a request are ordered.

    Declaration

    Swift

    enum NSComparisonResult : Int { case OrderedAscending case OrderedSame case OrderedDescending }

    Objective-C

    enum { NSOrderedAscending = -1, NSOrderedSame, NSOrderedDescending }; typedef NSInteger NSComparisonResult;

    Constants

    • OrderedAscending

      NSOrderedAscending

      The left operand is smaller than the right operand.

      Available in iOS 2.0 and later.

    • OrderedSame

      NSOrderedSame

      The two operands are equal.

      Available in iOS 2.0 and later.

    • OrderedDescending

      NSOrderedDescending

      The left operand is greater than the right operand.

      Available in iOS 2.0 and later.

    Discussion

    These constants are used to indicate how items in a request are ordered, from the first one given in a method invocation or function call to the last (that is, left to right in code).

    Import Statement

    Objective-C

    @import Foundation;

    Swift

    import Foundation

    Availability

    Available in iOS 2.0 and later.

  • Options for Block sorting operations.

    Declaration

    Swift

    struct NSSortOptions : RawOptionSetType { init(_ rawValue: UInt) init(rawValue rawValue: UInt) static var Concurrent: NSSortOptions { get } static var Stable: NSSortOptions { get } }

    Objective-C

    enum { NSSortConcurrent = (1UL << 0), NSSortStable = (1UL << 4), }; typedef NSUInteger NSSortOptions;

    Constants

    • Concurrent

      NSSortConcurrent

      Specifies that the Block sort operation should be concurrent.

      This option is a hint and may be ignored by the implementation under some circumstances; the code of the Block must be safe against concurrent invocation.

      Available in iOS 4.0 and later.

    • Stable

      NSSortStable

      Specifies that the sorted results should return compared items have equal value in the order they occurred originally.

      If this option is unspecified equal objects may, or may not, be returned in their original order.

      Available in iOS 4.0 and later.

    Import Statement

    Objective-C

    @import Foundation;

    Swift

    import Foundation

    Availability

    Available in iOS 4.0 and later.

  • These constants specify the location of a variety of directories by the URLsForDirectory:inDomains: and URLForDirectory:inDomain:appropriateForURL:create:error: NSFileManager methods.

    Declaration

    Swift

    enum NSSearchPathDirectory : UInt { case ApplicationDirectory case DemoApplicationDirectory case DeveloperApplicationDirectory case AdminApplicationDirectory case LibraryDirectory case DeveloperDirectory case UserDirectory case DocumentationDirectory case DocumentDirectory case CoreServiceDirectory case AutosavedInformationDirectory case DesktopDirectory case CachesDirectory case ApplicationSupportDirectory case DownloadsDirectory case InputMethodsDirectory case MoviesDirectory case MusicDirectory case PicturesDirectory case PrinterDescriptionDirectory case SharedPublicDirectory case PreferencePanesDirectory case ApplicationScriptsDirectory case ItemReplacementDirectory case AllApplicationsDirectory case AllLibrariesDirectory case TrashDirectory }

    Objective-C

    enum { NSApplicationDirectory = 1, NSDemoApplicationDirectory, NSDeveloperApplicationDirectory, NSAdminApplicationDirectory, NSLibraryDirectory, NSDeveloperDirectory, NSUserDirectory, NSDocumentationDirectory, NSDocumentDirectory, NSCoreServiceDirectory, NSAutosavedInformationDirectory = 11, NSDesktopDirectory = 12, NSCachesDirectory = 13, NSApplicationSupportDirectory = 14, NSDownloadsDirectory = 15, NSInputMethodsDirectory = 16, NSMoviesDirectory = 17, NSMusicDirectory = 18, NSPicturesDirectory = 19, NSPrinterDescriptionDirectory = 20, NSSharedPublicDirectory = 21, NSPreferencePanesDirectory = 22, NSItemReplacementDirectory = 99, NSAllApplicationsDirectory = 100, NSAllLibrariesDirectory = 101, }; typedef NSUInteger NSSearchPathDirectory;

    Constants

    • ApplicationDirectory

      NSApplicationDirectory

      Supported applications (/Applications).

      Available in iOS 2.0 and later.

    • DemoApplicationDirectory

      NSDemoApplicationDirectory

      Unsupported applications and demonstration versions.

      Available in iOS 2.0 and later.

    • DeveloperApplicationDirectory

      NSDeveloperApplicationDirectory

      Developer applications (/Developer/Applications).

      Deprecated: As of Xcode 4.3, there is no longer a Developer Application directory directory; instead, Xcode.app is a self-contained application that gets installed in the user’s Applications directory, by default, although it can be put anywhere.

      Available in iOS 2.0 and later.

    • AdminApplicationDirectory

      NSAdminApplicationDirectory

      System and network administration applications.

      Available in iOS 2.0 and later.

    • LibraryDirectory

      NSLibraryDirectory

      Various user-visible documentation, support, and configuration files (/Library).

      Available in iOS 2.0 and later.

    • DeveloperDirectory

      NSDeveloperDirectory

      Developer resources (/Developer).

      Deprecated: As of Xcode 4.3, there is no longer a Developer directory; instead, Xcode.app is a self-contained application that gets installed in the user’s Applications directory, by default, although it can be put anywhere.

      Available in iOS 2.0 and later.

    • UserDirectory

      NSUserDirectory

      User home directories (/Users).

      Available in iOS 2.0 and later.

    • DocumentationDirectory

      NSDocumentationDirectory

      Documentation.

      Available in iOS 2.0 and later.

    • DocumentDirectory

      NSDocumentDirectory

      Document directory.

      Available in iOS 2.0 and later.

    • CoreServiceDirectory

      NSCoreServiceDirectory

      Location of core services (System/Library/CoreServices).

      Available in iOS 2.0 and later.

    • AutosavedInformationDirectory

      NSAutosavedInformationDirectory

      Location of user’s autosaved documents Library/Autosave Information

      Available in iOS 4.0 and later.

    • DesktopDirectory

      NSDesktopDirectory

      Location of user’s desktop directory.

      Available in iOS 2.0 and later.

    • CachesDirectory

      NSCachesDirectory

      Location of discardable cache files (Library/Caches).

      Available in iOS 2.0 and later.

    • ApplicationSupportDirectory

      NSApplicationSupportDirectory

      Location of application support files (Library/Application Support).

      Available in iOS 2.0 and later.

    • DownloadsDirectory

      NSDownloadsDirectory

      Location of the user’s downloads directory.

      The NSDownloadsDirectory flag will only produce a path only when the NSUserDomainMask is provided.

      Available in iOS 2.0 and later.

    • InputMethodsDirectory

      NSInputMethodsDirectory

      Location of Input Methods (Library/Input Methods)

      Available in iOS 4.0 and later.

    • MoviesDirectory

      NSMoviesDirectory

      Location of user's Movies directory (~/Movies)

      Available in iOS 4.0 and later.

    • MusicDirectory

      NSMusicDirectory

      Location of user's Music directory (~/Music)

      Available in iOS 4.0 and later.

    • PicturesDirectory

      NSPicturesDirectory

      Location of user's Pictures directory (~/Pictures)

      Available in iOS 4.0 and later.

    • PrinterDescriptionDirectory

      NSPrinterDescriptionDirectory

      Location of system's PPDs directory (Library/Printers/PPDs)

      Available in iOS 4.0 and later.

    • SharedPublicDirectory

      NSSharedPublicDirectory

      Location of user's Public sharing directory (~/Public)

      Available in iOS 4.0 and later.

    • PreferencePanesDirectory

      NSPreferencePanesDirectory

      Location of the PreferencePanes directory for use with System Preferences (Library/PreferencePanes)

      Available in iOS 4.0 and later.

    • ItemReplacementDirectory

      NSItemReplacementDirectory

      For use with NSFileManager method URLForDirectory:inDomain:appropriateForURL:create:error:

      Available in iOS 4.0 and later.

    • AllApplicationsDirectory

      NSAllApplicationsDirectory

      All directories where applications can occur.

      Available in iOS 2.0 and later.

    • AllLibrariesDirectory

      NSAllLibrariesDirectory

      All directories where resources can occur.

      Available in iOS 2.0 and later.

    Import Statement

    Objective-C

    @import Foundation;

    Swift

    import Foundation

    Availability

    Available in iOS 2.0 and later.

  • Search path domain constants specifying base locations for the NSSearchPathDirectory type. These constants are used by the URLsForDirectory:inDomains: and URLForDirectory:inDomain:appropriateForURL:create:error: NSFileManager methods.

    Declaration

    Swift

    struct NSSearchPathDomainMask : RawOptionSetType { init(_ rawValue: UInt) init(rawValue rawValue: UInt) static var UserDomainMask: NSSearchPathDomainMask { get } static var LocalDomainMask: NSSearchPathDomainMask { get } static var NetworkDomainMask: NSSearchPathDomainMask { get } static var SystemDomainMask: NSSearchPathDomainMask { get } static var AllDomainsMask: NSSearchPathDomainMask { get } }

    Objective-C

    enum { NSUserDomainMask = 1, NSLocalDomainMask = 2, NSNetworkDomainMask = 4, NSSystemDomainMask = 8, NSAllDomainsMask = 0x0ffff, }; typedef NSUInteger NSSearchPathDomainMask;

    Constants

    • UserDomainMask

      NSUserDomainMask

      The user’s home directory—the place to install user’s personal items (~).

      Available in iOS 2.0 and later.

    • LocalDomainMask

      NSLocalDomainMask

      Local to the current machine—the place to install items available to everyone on this machine.

      Available in iOS 2.0 and later.

    • NetworkDomainMask

      NSNetworkDomainMask

      Publicly available location in the local area network—the place to install items available on the network (/Network).

      Available in iOS 2.0 and later.

    • SystemDomainMask

      NSSystemDomainMask

      Provided by Apple—can’t be modified (/System) .

      Available in iOS 2.0 and later.

    • AllDomainsMask

      NSAllDomainsMask

      All domains.

      Includes all of the above and future items.

      Available in iOS 2.0 and later.

    Import Statement

    Objective-C

    @import Foundation;

    Swift

    import Foundation

    Availability

    Available in iOS 2.0 and later.

  • NSError codes in the Cocoa error domain.

    Declaration

    Swift

    var NSFileNoSuchFileError: Int { get } var NSFileLockingError: Int { get } var NSFileReadUnknownError: Int { get } var NSFileReadNoPermissionError: Int { get } var NSFileReadInvalidFileNameError: Int { get } var NSFileReadCorruptFileError: Int { get } var NSFileReadNoSuchFileError: Int { get } var NSFileReadInapplicableStringEncodingError: Int { get } var NSFileReadUnsupportedSchemeError: Int { get } var NSFileReadTooLargeError: Int { get } var NSFileReadUnknownStringEncodingError: Int { get } var NSFileWriteUnknownError: Int { get } var NSFileWriteNoPermissionError: Int { get } var NSFileWriteInvalidFileNameError: Int { get } var NSFileWriteFileExistsError: Int { get } var NSFileWriteInapplicableStringEncodingError: Int { get } var NSFileWriteUnsupportedSchemeError: Int { get } var NSFileWriteOutOfSpaceError: Int { get } var NSFileWriteVolumeReadOnlyError: Int { get } var NSKeyValueValidationError: Int { get } var NSFormattingError: Int { get } var NSUserCancelledError: Int { get } var NSFileErrorMinimum: Int { get } var NSFileErrorMaximum: Int { get } var NSValidationErrorMinimum: Int { get } var NSValidationErrorMaximum: Int { get } var NSFormattingErrorMinimum: Int { get } var NSFormattingErrorMaximum: Int { get } var NSPropertyListReadCorruptError: Int { get } var NSPropertyListReadUnknownVersionError: Int { get } var NSPropertyListReadStreamError: Int { get } var NSPropertyListWriteStreamError: Int { get } var NSPropertyListErrorMinimum: Int { get } var NSPropertyListErrorMaximum: Int { get } var NSExecutableErrorMinimum: Int { get } var NSExecutableNotLoadableError: Int { get } var NSExecutableArchitectureMismatchError: Int { get } var NSExecutableRuntimeMismatchError: Int { get } var NSExecutableLoadError: Int { get } var NSExecutableLinkError: Int { get } var NSExecutableErrorMaximum: Int { get }

    Objective-C

    enum { NSFileNoSuchFileError = 4, NSFileLockingError = 255, NSFileReadUnknownError = 256, NSFileReadNoPermissionError = 257, NSFileReadInvalidFileNameError = 258, NSFileReadCorruptFileError = 259, NSFileReadNoSuchFileError = 260, NSFileReadInapplicableStringEncodingError = 261, NSFileReadUnsupportedSchemeError = 262, NSFileReadTooLargeError = 263, NSFileReadUnknownStringEncodingError = 264, NSFileWriteUnknownError = 512, NSFileWriteNoPermissionError = 513, NSFileWriteInvalidFileNameError = 514, NSFileWriteFileExistsError = 516, NSFileWriteInapplicableStringEncodingError = 517, NSFileWriteUnsupportedSchemeError = 518, NSFileWriteOutOfSpaceError = 640, NSFileWriteVolumeReadOnlyError = 642, NSKeyValueValidationError = 1024, NSFormattingError = 2048, NSUserCancelledError = 3072, NSFileErrorMinimum = 0, NSFileErrorMaximum = 1023, NSValidationErrorMinimum = 1024, NSValidationErrorMaximum = 2047, NSFormattingErrorMinimum = 2048, NSFormattingErrorMaximum = 2559, NSPropertyListReadCorruptError = 3840, NSPropertyListReadUnknownVersionError = 3841, NSPropertyListReadStreamError = 3842, NSPropertyListWriteStreamError = 3851, NSPropertyListErrorMinimum = 3840, NSPropertyListErrorMaximum = 4095 NSExecutableErrorMinimum = 3584, NSExecutableNotLoadableError = 3584, NSExecutableArchitectureMismatchError = 3585, NSExecutableRuntimeMismatchError = 3586, NSExecutableLoadError = 3587, NSExecutableLinkError = 3588, NSExecutableErrorMaximum = 3839, }

    Constants

    • NSFileNoSuchFileError

      NSFileNoSuchFileError

      File-system operation attempted on non-existent file

      Available in iOS 2.0 and later.

    • NSFileLockingError

      NSFileLockingError

      Failure to get a lock on file

      Available in iOS 2.0 and later.

    • NSFileReadUnknownError

      NSFileReadUnknownError

      Read error, reason unknown

      Available in iOS 2.0 and later.

    • NSFileReadNoPermissionError

      NSFileReadNoPermissionError

      Read error because of a permission problem

      Available in iOS 2.0 and later.

    • NSFileReadInvalidFileNameError

      NSFileReadInvalidFileNameError

      Read error because of an invalid file name

      Available in iOS 2.0 and later.

    • NSFileReadCorruptFileError

      NSFileReadCorruptFileError

      Read error because of a corrupted file, bad format, or similar reason

      Available in iOS 2.0 and later.

    • NSFileReadNoSuchFileError

      NSFileReadNoSuchFileError

      Read error because no such file was found

      Available in iOS 2.0 and later.

    • NSFileReadInapplicableStringEncodingError

      NSFileReadInapplicableStringEncodingError

      Read error because the string encoding was not applicable.

      Access the bad encoding from the userInfo dictionary using the NSStringEncodingErrorKey key.

      Available in iOS 2.0 and later.

    • NSFileReadUnsupportedSchemeError

      NSFileReadUnsupportedSchemeError

      Read error because the specified URL scheme is unsupported

      Available in iOS 2.0 and later.

    • NSFileReadTooLargeError

      NSFileReadTooLargeError

      Read error because the specified file was too large.

      Available in iOS 2.0 and later.

    • NSFileReadUnknownStringEncodingError

      NSFileReadUnknownStringEncodingError

      Read error because the string coding of the file could not be determined

      Available in iOS 2.0 and later.

    • NSFileWriteUnknownError

      NSFileWriteUnknownError

      Write error, reason unknown

      Available in iOS 2.0 and later.

    • NSFileWriteNoPermissionError

      NSFileWriteNoPermissionError

      Write error because of a permission problem

      Available in iOS 2.0 and later.

    • NSFileWriteInvalidFileNameError

      NSFileWriteInvalidFileNameError

      Write error because of an invalid file name

      Available in iOS 2.0 and later.

    • NSFileWriteFileExistsError

      NSFileWriteFileExistsError

      Write error returned when NSFileManager class’s copy, move, and link methods report errors when the destination file already exists.

      Available in iOS 5.0 and later.

    • NSFileWriteInapplicableStringEncodingError

      NSFileWriteInapplicableStringEncodingError

      Write error because the string encoding was not applicable.

      Access the bad encoding from the userInfo dictionary using the NSStringEncodingErrorKey key.

      Available in iOS 2.0 and later.

    • NSFileWriteUnsupportedSchemeError

      NSFileWriteUnsupportedSchemeError

      Write error because the specified URL scheme is unsupported

      Available in iOS 2.0 and later.

    • NSFileWriteOutOfSpaceError

      NSFileWriteOutOfSpaceError

      Write error because of a lack of disk space

      Available in iOS 2.0 and later.

    • NSFileWriteVolumeReadOnlyError

      NSFileWriteVolumeReadOnlyError

      Write error because because the volume is read only.

      Available in iOS 4.0 and later.

    • NSKeyValueValidationError

      NSKeyValueValidationError

      Key-value coding validation error

      Available in iOS 2.0 and later.

    • NSFormattingError

      NSFormattingError

      Formatting error (related to display of data)

      Available in iOS 2.0 and later.

    • NSUserCancelledError

      NSUserCancelledError

      The user cancelled the operation (for example, by pressing Command-period).

      This code is for errors that do not require a dialog displayed and might be candidates for special-casing.

      Available in iOS 2.0 and later.

    • NSFileErrorMinimum

      NSFileErrorMinimum

      Marks the start of the range of error codes reserved for file errors

      Available in iOS 2.0 and later.

    • NSFileErrorMaximum

      NSFileErrorMaximum

      Marks the end of the range of error codes reserved for file errors

      Available in iOS 2.0 and later.

    • NSValidationErrorMinimum

      NSValidationErrorMinimum

      Marks the start of the range of error codes reserved for validation errors.

      Available in iOS 2.0 and later.

    • NSValidationErrorMaximum

      NSValidationErrorMaximum

      Marks the start and end of the range of error codes reserved for validation errors.

      Available in iOS 2.0 and later.

    • NSFormattingErrorMinimum

      NSFormattingErrorMinimum

      Marks the start of the range of error codes reserved for formatting errors.

      Available in iOS 2.0 and later.

    • NSFormattingErrorMaximum

      NSFormattingErrorMaximum

      Marks end of the range of error codes reserved for formatting errors.

      Available in iOS 2.0 and later.

    • NSPropertyListReadCorruptError

      NSPropertyListReadCorruptError

      An error was encountered while parsing the property list.

      Available in iOS 4.0 and later.

    • NSPropertyListReadUnknownVersionError

      NSPropertyListReadUnknownVersionError

      The version number of the property list is unable to be determined.

      Available in iOS 4.0 and later.

    • NSPropertyListReadStreamError

      NSPropertyListReadStreamError

      An stream error was encountered while reading the property list.

      Available in iOS 4.0 and later.

    • NSPropertyListWriteStreamError

      NSPropertyListWriteStreamError

      An stream error was encountered while writing the property list.

      Available in iOS 4.0 and later.

    • NSPropertyListErrorMinimum

      NSPropertyListErrorMinimum

      Marks beginning of the range of error codes reserved for property list errors.

      Available in iOS 4.0 and later.

    • NSPropertyListErrorMaximum

      NSPropertyListErrorMaximum

      Marks end of the range of error codes reserved for property list errors.

      Available in iOS 4.0 and later.

    • NSExecutableErrorMinimum

      NSExecutableErrorMinimum

      Marks beginning of the range of error codes reserved for errors related to executable files.

      Available in iOS 2.0 and later.

    • NSExecutableNotLoadableError

      NSExecutableNotLoadableError

      Executable is of a type that is not loadable in the current process.

      Available in iOS 2.0 and later.

    • NSExecutableArchitectureMismatchError

      NSExecutableArchitectureMismatchError

      Executable does not provide an architecture compatible with the current process.

      Available in iOS 2.0 and later.

    • NSExecutableRuntimeMismatchError

      NSExecutableRuntimeMismatchError

      Executable has Objective C runtime information incompatible with the current process.

      Available in iOS 2.0 and later.

    • NSExecutableLoadError

      NSExecutableLoadError

      Executable cannot be loaded for some other reason, such as a problem with a library it depends on.

      Available in iOS 2.0 and later.

    • NSExecutableLinkError

      NSExecutableLinkError

      Executable fails due to linking issues.

      Available in iOS 2.0 and later.

    • NSExecutableErrorMaximum

      NSExecutableErrorMaximum

      Marks end of the range of error codes reserved for errors related to executable files.

      Available in iOS 2.0 and later.

    Discussion

    The constants in this enumeration are NSError code numbers in the Cocoa error domain (NSCocoaErrorDomain). Other frameworks, most notably the Application Kit, provide their own NSCocoaErrorDomain error codes.

    The enumeration constants beginning with NSFile indicate file-system errors or errors related to file I/O operations. Use the key NSFilePathErrorKey or the NSURLErrorKey (whichever is appropriate) to access the file-system path or URL in the userInfo dictionary of the NSError object.

  • These values are returned as the error code property of an NSError object with the domain “NSURLErrorDomain”.

    Declaration

    Swift

    var NSURLErrorUnknown: Int { get } var NSURLErrorCancelled: Int { get } var NSURLErrorBadURL: Int { get } var NSURLErrorTimedOut: Int { get } var NSURLErrorUnsupportedURL: Int { get } var NSURLErrorCannotFindHost: Int { get } var NSURLErrorCannotConnectToHost: Int { get } var NSURLErrorDataLengthExceedsMaximum: Int { get } var NSURLErrorNetworkConnectionLost: Int { get } var NSURLErrorDNSLookupFailed: Int { get } var NSURLErrorHTTPTooManyRedirects: Int { get } var NSURLErrorResourceUnavailable: Int { get } var NSURLErrorNotConnectedToInternet: Int { get } var NSURLErrorRedirectToNonExistentLocation: Int { get } var NSURLErrorBadServerResponse: Int { get } var NSURLErrorUserCancelledAuthentication: Int { get } var NSURLErrorUserAuthenticationRequired: Int { get } var NSURLErrorZeroByteResource: Int { get } var NSURLErrorCannotDecodeRawData: Int { get } var NSURLErrorCannotDecodeContentData: Int { get } var NSURLErrorCannotParseResponse: Int { get } var NSURLErrorInternationalRoamingOff: Int { get } var NSURLErrorCallIsActive: Int { get } var NSURLErrorDataNotAllowed: Int { get } var NSURLErrorRequestBodyStreamExhausted: Int { get } var NSURLErrorFileDoesNotExist: Int { get } var NSURLErrorFileIsDirectory: Int { get } var NSURLErrorNoPermissionsToReadFile: Int { get } var NSURLErrorSecureConnectionFailed: Int { get } var NSURLErrorServerCertificateHasBadDate: Int { get } var NSURLErrorServerCertificateUntrusted: Int { get } var NSURLErrorServerCertificateHasUnknownRoot: Int { get } var NSURLErrorServerCertificateNotYetValid: Int { get } var NSURLErrorClientCertificateRejected: Int { get } var NSURLErrorClientCertificateRequired: Int { get } var NSURLErrorCannotLoadFromNetwork: Int { get } var NSURLErrorCannotCreateFile: Int { get } var NSURLErrorCannotOpenFile: Int { get } var NSURLErrorCannotCloseFile: Int { get } var NSURLErrorCannotWriteToFile: Int { get } var NSURLErrorCannotRemoveFile: Int { get } var NSURLErrorCannotMoveFile: Int { get } var NSURLErrorDownloadDecodingFailedMidStream: Int { get } var NSURLErrorDownloadDecodingFailedToComplete: Int { get }

    Objective-C

    enum { NSURLErrorUnknown = -1, NSURLErrorCancelled = -999, NSURLErrorBadURL = -1000, NSURLErrorTimedOut = -1001, NSURLErrorUnsupportedURL = -1002, NSURLErrorCannotFindHost = -1003, NSURLErrorCannotConnectToHost = -1004, NSURLErrorDataLengthExceedsMaximum = -1103, NSURLErrorNetworkConnectionLost = -1005, NSURLErrorDNSLookupFailed = -1006, NSURLErrorHTTPTooManyRedirects = -1007, NSURLErrorResourceUnavailable = -1008, NSURLErrorNotConnectedToInternet = -1009, NSURLErrorRedirectToNonExistentLocation = -1010, NSURLErrorBadServerResponse = -1011, NSURLErrorUserCancelledAuthentication = -1012, NSURLErrorUserAuthenticationRequired = -1013, NSURLErrorZeroByteResource = -1014, NSURLErrorCannotDecodeRawData = -1015, NSURLErrorCannotDecodeContentData = -1016, NSURLErrorCannotParseResponse = -1017, NSURLErrorInternationalRoamingOff = -1018, NSURLErrorCallIsActive = -1019, NSURLErrorDataNotAllowed = -1020, NSURLErrorRequestBodyStreamExhausted = -1021, NSURLErrorFileDoesNotExist = -1100, NSURLErrorFileIsDirectory = -1101, NSURLErrorNoPermissionsToReadFile = -1102, NSURLErrorSecureConnectionFailed = -1200, NSURLErrorServerCertificateHasBadDate = -1201, NSURLErrorServerCertificateUntrusted = -1202, NSURLErrorServerCertificateHasUnknownRoot = -1203, NSURLErrorServerCertificateNotYetValid = -1204, NSURLErrorClientCertificateRejected = -1205, NSURLErrorClientCertificateRequired = -1206, NSURLErrorCannotLoadFromNetwork = -2000, NSURLErrorCannotCreateFile = -3000, NSURLErrorCannotOpenFile = -3001, NSURLErrorCannotCloseFile = -3002, NSURLErrorCannotWriteToFile = -3003, NSURLErrorCannotRemoveFile = -3004, NSURLErrorCannotMoveFile = -3005, NSURLErrorDownloadDecodingFailedMidStream = -3006, NSURLErrorDownloadDecodingFailedToComplete = -3007 }

    Constants

    • NSURLErrorUnknown

      NSURLErrorUnknown

      Returned when the URL Loading system encounters an error that it cannot interpret.

      This can occur when an error originates from a lower level framework or library. Whenever this error code is received, it is a bug, and should be reported to Apple.

      Available in iOS 2.0 and later.

    • NSURLErrorCancelled

      NSURLErrorCancelled

      Returned when an asynchronous load is canceled.

      A Web Kit framework delegate will receive this error when it performs a cancel operation on a loading resource. Note that an NSURLConnection or NSURLDownload delegate will not receive this error if the download is canceled.

      Available in iOS 2.0 and later.

    • NSURLErrorBadURL

      NSURLErrorBadURL

      Returned when a URL is sufficiently malformed that a URL request cannot be initiated

      Available in iOS 2.0 and later.

    • NSURLErrorTimedOut

      NSURLErrorTimedOut

      Returned when an asynchronous operation times out.

      NSURLConnection will send this error to its delegate when the timeoutInterval in NSURLRequest expires before a load can complete.

      Available in iOS 2.0 and later.

    • NSURLErrorUnsupportedURL

      NSURLErrorUnsupportedURL

      Returned when a properly formed URL cannot be handled by the framework.

      The most likely cause is that there is no available protocol handler for the URL.

      Available in iOS 2.0 and later.

    • NSURLErrorCannotFindHost

      NSURLErrorCannotFindHost

      Returned when the host name for a URL cannot be resolved.

      Available in iOS 2.0 and later.

    • NSURLErrorCannotConnectToHost

      NSURLErrorCannotConnectToHost

      Returned when an attempt to connect to a host has failed.

      This can occur when a host name resolves, but the host is down or may not be accepting connections on a certain port.

      Available in iOS 2.0 and later.

    • NSURLErrorDataLengthExceedsMaximum

      NSURLErrorDataLengthExceedsMaximum

      Returned when the length of the resource data exceeds the maximum allowed.

      Available in iOS 2.0 and later.

    • NSURLErrorNetworkConnectionLost

      NSURLErrorNetworkConnectionLost

      Returned when a client or server connection is severed in the middle of an in-progress load.

      Available in iOS 2.0 and later.

    • NSURLErrorDNSLookupFailed

      NSURLErrorDNSLookupFailed

      See NSURLErrorCannotFindHost

      Available in iOS 2.0 and later.

    • NSURLErrorHTTPTooManyRedirects

      NSURLErrorHTTPTooManyRedirects

      Returned when a redirect loop is detected or when the threshold for number of allowable redirects has been exceeded (currently 16).

      Available in iOS 2.0 and later.

    • NSURLErrorResourceUnavailable

      NSURLErrorResourceUnavailable

      Returned when a requested resource cannot be retrieved.

      Examples are “file not found”, and data decoding problems that prevent data from being processed correctly.

      Available in iOS 2.0 and later.

    • NSURLErrorNotConnectedToInternet

      NSURLErrorNotConnectedToInternet

      Returned when a network resource was requested, but an internet connection is not established and cannot be established automatically, either through a lack of connectivity, or by the user's choice not to make a network connection automatically.

      Available in iOS 2.0 and later.

    • NSURLErrorRedirectToNonExistentLocation

      NSURLErrorRedirectToNonExistentLocation

      Returned when a redirect is specified by way of server response code, but the server does not accompany this code with a redirect URL.

      Available in iOS 2.0 and later.

    • NSURLErrorBadServerResponse

      NSURLErrorBadServerResponse

      Returned when the URL Loading system receives bad data from the server.

      This is equivalent to the “500 Server Error” message sent by HTTP servers.

      Available in iOS 2.0 and later.

    • NSURLErrorUserCancelledAuthentication

      NSURLErrorUserCancelledAuthentication

      Returned when an asynchronous request for authentication is cancelled by the user.

      This is typically incurred by clicking a “Cancel” button in a username/password dialog, rather than the user making an attempt to authenticate.

      Available in iOS 2.0 and later.

    • NSURLErrorUserAuthenticationRequired

      NSURLErrorUserAuthenticationRequired

      Returned when authentication is required to access a resource.

      Available in iOS 2.0 and later.

    • NSURLErrorZeroByteResource

      NSURLErrorZeroByteResource

      Returned when a server reports that a URL has a non-zero content length, but terminates the network connection “gracefully” without sending any data.

      Available in iOS 2.0 and later.

    • NSURLErrorCannotDecodeRawData

      NSURLErrorCannotDecodeRawData

      Returned when content data received during an NSURLConnection request cannot be decoded for a known content encoding.

      Available in iOS 2.0 and later.

    • NSURLErrorCannotDecodeContentData

      NSURLErrorCannotDecodeContentData

      Returned when content data received during an NSURLConnection request has an unknown content encoding.

      Available in iOS 2.0 and later.

    • NSURLErrorCannotParseResponse

      NSURLErrorCannotParseResponse

      Returned when a response to an NSURLConnection request cannot be parsed.

      Available in iOS 2.0 and later.

    • NSURLErrorInternationalRoamingOff

      NSURLErrorInternationalRoamingOff

      Returned when a connection would require activating a data context while roaming, but international roaming is disabled.

      Available in iOS 3.0 and later.

    • NSURLErrorCallIsActive

      NSURLErrorCallIsActive

      Returned when a connection is attempted while a phone call is active on a network that does not support simultaneous phone and data communication (EDGE or GPRS).

      Available in iOS 3.0 and later.

    • NSURLErrorDataNotAllowed

      NSURLErrorDataNotAllowed

      Returned when the cellular network disallows a connection.

      Available in iOS 3.0 and later.

    • NSURLErrorRequestBodyStreamExhausted

      NSURLErrorRequestBodyStreamExhausted

      Returned when a body stream is needed but the client does not provide one. This impacts clients on iOS that send a POST request using a body stream but do not implement the NSURLConnection delegate method connection:needNewBodyStream.

      Available in iOS 3.0 and later.

    • NSURLErrorFileDoesNotExist

      NSURLErrorFileDoesNotExist

      Returned when a file does not exist.

      Available in iOS 2.0 and later.

    • NSURLErrorFileIsDirectory

      NSURLErrorFileIsDirectory

      Returned when a request for an FTP file results in the server responding that the file is not a plain file, but a directory.

      Available in iOS 2.0 and later.

    • NSURLErrorNoPermissionsToReadFile

      NSURLErrorNoPermissionsToReadFile

      Returned when a resource cannot be read due to insufficient permissions.

      Available in iOS 2.0 and later.

    • NSURLErrorSecureConnectionFailed

      NSURLErrorSecureConnectionFailed

      Returned when an attempt to establish a secure connection fails for reasons which cannot be expressed more specifically.

      Available in iOS 2.0 and later.

    • NSURLErrorServerCertificateHasBadDate

      NSURLErrorServerCertificateHasBadDate

      Returned when a server certificate has a date which indicates it has expired, or is not yet valid.

      Available in iOS 2.0 and later.

    • NSURLErrorServerCertificateUntrusted

      NSURLErrorServerCertificateUntrusted

      Returned when a server certificate is signed by a root server which is not trusted.

      Available in iOS 2.0 and later.

    • NSURLErrorServerCertificateHasUnknownRoot

      NSURLErrorServerCertificateHasUnknownRoot

      Returned when a server certificate is not signed by any root server.

      Available in iOS 2.0 and later.

    • NSURLErrorServerCertificateNotYetValid

      NSURLErrorServerCertificateNotYetValid

      Returned when a server certificate is not yet valid.

      Available in iOS 2.0 and later.

    • NSURLErrorClientCertificateRejected

      NSURLErrorClientCertificateRejected

      Returned when a server certificate is rejected.

      Available in iOS 2.0 and later.

    • NSURLErrorClientCertificateRequired

      NSURLErrorClientCertificateRequired

      Returned when a client certificate is required to authenticate an SSL connection during an NSURLConnection request.

      Available in iOS 4.0 and later.

    • NSURLErrorCannotLoadFromNetwork

      NSURLErrorCannotLoadFromNetwork

      Returned when a specific request to load an item only from the cache cannot be satisfied.

      This error is sent at the point when the library would go to the network accept for the fact that is has been blocked from doing so by the “load only from cache” directive.

      Available in iOS 2.0 and later.

    • NSURLErrorCannotCreateFile

      NSURLErrorCannotCreateFile

      Returned when NSURLDownload object was unable to create the downloaded file on disk due to a I/O failure.

      Available in iOS 2.0 and later.

    • NSURLErrorCannotOpenFile

      NSURLErrorCannotOpenFile

      Returned when NSURLDownload was unable to open the downloaded file on disk.

      Available in iOS 2.0 and later.

    • NSURLErrorCannotCloseFile

      NSURLErrorCannotCloseFile

      Returned when NSURLDownload was unable to close the downloaded file on disk.

      Available in iOS 2.0 and later.

    • NSURLErrorCannotWriteToFile

      NSURLErrorCannotWriteToFile

      Returned when NSURLDownload was unable to write to the downloaded file on disk.

      Available in iOS 2.0 and later.

    • NSURLErrorCannotRemoveFile

      NSURLErrorCannotRemoveFile

      Returned when NSURLDownload was unable to remove a downloaded file from disk.

      Available in iOS 2.0 and later.

    • NSURLErrorCannotMoveFile

      NSURLErrorCannotMoveFile

      Returned when NSURLDownload was unable to move a downloaded file on disk.

      Available in iOS 2.0 and later.

    • NSURLErrorDownloadDecodingFailedMidStream

      NSURLErrorDownloadDecodingFailedMidStream

      Returned when NSURLDownload failed to decode an encoded file during the download.

      Available in iOS 2.0 and later.

    • NSURLErrorDownloadDecodingFailedToComplete

      NSURLErrorDownloadDecodingFailedToComplete

      Returned when NSURLDownload failed to decode an encoded file after downloading.

      Available in iOS 2.0 and later.

  • These error codes are used by error objects associated with the NSURLUbiquitousItemDownloadingErrorKey on an NSURL object when an iCloud-related error occurs.

    Declaration

    Swift

    var NSUbiquitousFileErrorMinimum: Int { get } var NSUbiquitousFileUnavailableError: Int { get } var NSUbiquitousFileNotUploadedDueToQuotaError: Int { get } var NSUbiquitousFileUbiquityServerNotAvailable: Int { get } var NSUbiquitousFileErrorMaximum: Int { get }

    Objective-C

    NSUbiquitousFileErrorMinimum = 4352, NSUbiquitousFileUnavailableError = 4353, NSUbiquitousFileNotUploadedDueToQuotaError = 4354, NSUbiquitousFileUbiquityServerNotAvailable = 4355, NSUbiquitousFileErrorMaximum = 4607

    Constants

    • NSUbiquitousFileErrorMinimum

      NSUbiquitousFileErrorMinimum

      The minimum error code value that represents an iCloud error.

      Available in iOS 7.0 and later.

    • NSUbiquitousFileUnavailableError

      NSUbiquitousFileUnavailableError

      The item has not been uploaded to iCloud by another device yet.

      When this error occurs, you do not need to ask the system to start downloading the item. The system will download the item as soon as it can. If you want to know when the item becomes available, use an NSMetadataQuery object to monitor changes to the file’s URL.

      Available in iOS 7.0 and later.

    • NSUbiquitousFileNotUploadedDueToQuotaError

      NSUbiquitousFileNotUploadedDueToQuotaError

      The item could not be uploaded to iCloud because it would make the account go over its quota.

      Available in iOS 7.0 and later.

    • NSUbiquitousFileUbiquityServerNotAvailable

      NSUbiquitousFileUbiquityServerNotAvailable

      Connecting to the iCloud servers failed.

      Available in iOS 7.0 and later.

    • NSUbiquitousFileErrorMaximum

      NSUbiquitousFileErrorMaximum

      The maximum error code value that represents an iCloud error.

      Available in iOS 7.0 and later.

  • Errors returned by XPC connections. Note that these are not currently available on iOS.

    Declaration

    Swift

    var NSXPCConnectionInterrupted: Int { get } var NSXPCConnectionInvalid: Int { get } var NSXPCConnectionReplyInvalid: Int { get } var NSXPCConnectionErrorMinimum: Int { get } var NSXPCConnectionErrorMaximum: Int { get }

    Objective-C

    NSXPCConnectionInterrupted = 4097, NSXPCConnectionInvalid = 4099, NSXPCConnectionReplyInvalid = 4101, NSXPCConnectionErrorMinimum = 4096, NSXPCConnectionErrorMaximum = 4224

    Constants

    • NSXPCConnectionInterrupted

      NSXPCConnectionInterrupted

      The XPC connection was interrupted.

      Available in iOS 6.0 and later.

    • NSXPCConnectionInvalid

      NSXPCConnectionInvalid

      The XPC connection was invalid.

      Available in iOS 6.0 and later.

    • NSXPCConnectionReplyInvalid

      NSXPCConnectionReplyInvalid

      The XPC connection reply was invalid.

      Available in iOS 6.0 and later.

    • NSXPCConnectionErrorMinimum

      NSXPCConnectionErrorMinimum

      The XPC connection minimum error.

      Available in iOS 6.0 and later.

    • NSXPCConnectionErrorMaximum

      NSXPCConnectionErrorMaximum

      The XPC connection maximum error.

      Available in iOS 6.0 and later.

Global Variables

  • These constants defines the Cocoa error domain.

    Declaration

    Swift

    let NSCocoaErrorDomain: String

    Objective-C

    NSString *const NSCocoaErrorDomain; NSString *const NSFeatureUnsupportedError;

    Constants

    • NSCocoaErrorDomain

      NSCocoaErrorDomain

      Application Kit and Foundation Kit errors.

      Available in iOS 2.0 and later.

    • NSFeatureUnsupportedError

      NSFeatureUnsupportedError

      NSFeatureUnsupportedError is a new error code in the NSCocoaErrorDomain that indicates a failure to perform the requested operation because the feature is not supported, either because the file system lacks the feature, or required libraries are missing, or other similar reasons.

      For example, some volumes may not support a Trash folder, so these methods will report failure by returning NOfalse or nil and an NSError with NSFeatureUnsupportedError.

  • This error domain is defined for NSURL.

    Declaration

    Swift

    let NSURLErrorDomain: String

    Objective-C

    extern NSString * const NSURLErrorDomain;

    Constants

    • NSURLErrorDomain

      NSURLErrorDomain

      URL loading system errors

      Available in iOS 2.0 and later.

Numeric Constants

  • Constants used by NSDecimal.

    Declaration

    Swift

    var NSDecimalMaxSize: Int32 { get } var NSDecimalNoScale: Int32 { get }

    Objective-C

    #define NSDecimalMaxSize (8) #define NSDecimalNoScale SHRT_MAX

    Constants

    • NSDecimalMaxSize

      NSDecimalMaxSize

      The maximum size of NSDecimal.

      Gives a precision of at least 38 decimal digits, 128 binary positions.

      Available in iOS 2.0 and later.

    • NSDecimalNoScale

      NSDecimalNoScale

      Specifies that the number of digits allowed after the decimal separator in a decimal number should not be limited.

      Available in iOS 2.0 and later.

  • Constants representing the maximum and minimum values of NSInteger and NSUInteger.

    Declaration

    Swift

    var NSIntegerMax: Int { get }

    Objective-C

    #define NSIntegerMax LONG_MAX #define NSIntegerMin LONG_MIN #define NSUIntegerMax ULONG_MAX

    Constants

    • NSIntegerMax

      NSIntegerMax

      The maximum value for an NSInteger.

      Available in iOS 2.0 and later.

    • NSIntegerMin

      NSIntegerMin

      The minimum value for an NSInteger.

      Available in iOS 2.0 and later.

    • NSUIntegerMax

      NSUIntegerMax

      The maximum value for an NSUInteger.

      Available in iOS 2.0 and later.

Exceptions

  • Exceptions defined by NSException.

    Declaration

    Swift

    let NSGenericException: String let NSRangeException: String let NSInvalidArgumentException: String let NSInternalInconsistencyException: String let NSMallocException: String let NSObjectInaccessibleException: String let NSObjectNotAvailableException: String let NSDestinationInvalidException: String let NSPortTimeoutException: String let NSInvalidSendPortException: String let NSInvalidReceivePortException: String let NSPortSendException: String let NSPortReceiveException: String let NSOldStyleException: String

    Objective-C

    extern NSString *NSGenericException; extern NSString *NSRangeException; extern NSString *NSInvalidArgumentException; extern NSString *NSInternalInconsistencyException; extern NSString *NSMallocException; extern NSString *NSObjectInaccessibleException; extern NSString *NSObjectNotAvailableException; extern NSString *NSDestinationInvalidException; extern NSString *NSPortTimeoutException; extern NSString *NSInvalidSendPortException; extern NSString *NSInvalidReceivePortException; extern NSString *NSPortSendException; extern NSString *NSPortReceiveException; extern NSString *NSOldStyleException;

    Constants

    • NSGenericException

      NSGenericException

      A generic name for an exception.

      You should typically use a more specific exception name.

      Available in iOS 2.0 and later.

    • NSRangeException

      NSRangeException

      Name of an exception that occurs when attempting to access outside the bounds of some data, such as beyond the end of a string.

      Available in iOS 2.0 and later.

    • NSInvalidArgumentException

      NSInvalidArgumentException

      Name of an exception that occurs when you pass an invalid argument to a method, such as a nil pointer where a non-nil object is required.

      Available in iOS 2.0 and later.

    • NSInternalInconsistencyException

      NSInternalInconsistencyException

      Name of an exception that occurs when an internal assertion fails and implies an unexpected condition within the called code.

      Available in iOS 2.0 and later.

    • NSMallocException

      NSMallocException

      Obsolete; not currently used.

      Available in iOS 2.0 and later.

    • NSObjectInaccessibleException

      NSObjectInaccessibleException

      Name of an exception that occurs when a remote object is accessed from a thread that should not access it.

      See NSConnection’s enableMultipleThreads.

      Available in iOS 2.0 and later.

    • NSObjectNotAvailableException

      NSObjectNotAvailableException

      Name of an exception that occurs when the remote side of the NSConnection refused to send the message to the object because the object has never been vended.

      Available in iOS 2.0 and later.

    • NSDestinationInvalidException

      NSDestinationInvalidException

      Name of an exception that occurs when an internal assertion fails and implies an unexpected condition within the distributed objects.

      This is a distributed objects–specific exception.

      Available in iOS 2.0 and later.

    • NSPortTimeoutException

      NSPortTimeoutException

      Name of an exception that occurs when a timeout set on a port expires during a send or receive operation.

      This is a distributed objects–specific exception.

      Available in iOS 2.0 and later.

    • NSInvalidSendPortException

      NSInvalidSendPortException

      Name of an exception that occurs when the send port of an NSConnection has become invalid.

      This is a distributed objects–specific exception.

      Available in iOS 2.0 and later.

    • NSInvalidReceivePortException

      NSInvalidReceivePortException

      Name of an exception that occurs when the receive port of an NSConnection has become invalid.

      This is a distributed objects–specific exception.

      Available in iOS 2.0 and later.

    • NSPortSendException

      NSPortSendException

      Generic error occurred on send.

      This is an NSPort-specific exception.

      Available in iOS 2.0 and later.

    • NSPortReceiveException

      NSPortReceiveException

      Generic error occurred on receive.

      This is an NSPort-specific exception.

      Available in iOS 2.0 and later.

    • NSOldStyleException

      NSOldStyleException

      No longer used.

      Available in iOS 2.0 and later.

Version Numbers

  • Version of the Foundation framework in the current environment.

    Declaration

    Swift

    var NSFoundationVersionNumber: Double

    Objective-C

    double NSFoundationVersionNumber;

    Constants

    • NSFoundationVersionNumber

      NSFoundationVersionNumber

      The version of the Foundation framework in the current environment.

      Available in iOS 2.0 and later.

  • Constants to define Foundation Framework version numbers.

    Declaration

    Swift

    var NSFoundationVersionNumber10_0: Double { get } var NSFoundationVersionNumber10_1: Double { get } var NSFoundationVersionNumber10_1_1: Double { get } var NSFoundationVersionNumber10_1_2: Double { get } var NSFoundationVersionNumber10_1_3: Double { get } var NSFoundationVersionNumber10_1_4: Double { get } var NSFoundationVersionNumber10_2: Double { get } var NSFoundationVersionNumber10_2_1: Double { get } var NSFoundationVersionNumber10_2_2: Double { get } var NSFoundationVersionNumber10_2_3: Double { get } var NSFoundationVersionNumber10_2_4: Double { get } var NSFoundationVersionNumber10_2_5: Double { get } var NSFoundationVersionNumber10_2_6: Double { get } var NSFoundationVersionNumber10_2_7: Double { get } var NSFoundationVersionNumber10_2_8: Double { get } var NSFoundationVersionNumber10_3: Double { get } var NSFoundationVersionNumber10_3_1: Double { get } var NSFoundationVersionNumber10_3_2: Double { get } var NSFoundationVersionNumber10_3_3: Double { get } var NSFoundationVersionNumber10_3_4: Double { get } var NSFoundationVersionNumber10_3_5: Double { get } var NSFoundationVersionNumber10_3_6: Double { get } var NSFoundationVersionNumber10_3_7: Double { get } var NSFoundationVersionNumber10_3_8: Double { get } var NSFoundationVersionNumber10_3_9: Double { get } var NSFoundationVersionNumber10_4: Double { get } var NSFoundationVersionNumber10_4_1: Double { get } var NSFoundationVersionNumber10_4_2: Double { get } var NSFoundationVersionNumber10_4_3: Double { get } var NSFoundationVersionNumber10_4_4_Intel: Double { get } var NSFoundationVersionNumber10_4_4_PowerPC: Double { get } var NSFoundationVersionNumber10_4_5: Double { get } var NSFoundationVersionNumber10_4_6: Double { get } var NSFoundationVersionNumber10_4_7: Double { get } var NSFoundationVersionNumber10_4_8: Double { get } var NSFoundationVersionNumber10_4_9: Double { get } var NSFoundationVersionNumber10_4_10: Double { get } var NSFoundationVersionNumber10_4_11: Double { get } var NSFoundationVersionNumber10_5: Double { get } var NSFoundationVersionNumber10_5_1: Double { get } var NSFoundationVersionNumber10_5_2: Double { get } var NSFoundationVersionNumber10_5_3: Double { get } var NSFoundationVersionNumber10_5_4: Double { get } var NSFoundationVersionNumber10_5_5: Double { get } var NSFoundationVersionNumber10_5_6: Double { get } var NSFoundationVersionNumber10_5_7: Double { get } var NSFoundationVersionNumber10_5_8: Double { get } var NSFoundationVersionNumber10_6: Double { get } var NSFoundationVersionNumber10_6_1: Double { get } var NSFoundationVersionNumber10_6_2: Double { get } var NSFoundationVersionNumber10_6_3: Double { get } var NSFoundationVersionNumber10_6_4: Double { get } var NSFoundationVersionNumber10_6_5: Double { get } var NSFoundationVersionNumber10_6_6: Double { get } var NSFoundationVersionNumber10_6_7: Double { get } var NSFoundationVersionNumber10_6_8: Double { get } var NSFoundationVersionNumber10_7: Double { get } var NSFoundationVersionNumber10_7_1: Double { get } var NSFoundationVersionNumber10_7_2: Double { get } var NSFoundationVersionNumber10_7_3: Double { get } var NSFoundationVersionNumber10_7_4: Double { get } var NSFoundationVersionNumber10_8: Double { get } var NSFoundationVersionNumber10_8_1: Double { get } var NSFoundationVersionNumber10_8_2: Double { get } var NSFoundationVersionNumber10_8_3: Double { get } var NSFoundationVersionNumber10_8_4: Double { get } var NSFoundationVersionNumber_iPhoneOS_2_0: Double { get } var NSFoundationVersionNumber_iPhoneOS_2_1: Double { get } var NSFoundationVersionNumber_iPhoneOS_2_2: Double { get } var NSFoundationVersionNumber_iPhoneOS_3_0: Double { get } var NSFoundationVersionNumber_iPhoneOS_3_1: Double { get } var NSFoundationVersionNumber_iPhoneOS_3_2: Double { get } var NSFoundationVersionNumber_iOS_4_0: Double { get } var NSFoundationVersionNumber_iOS_4_1: Double { get } var NSFoundationVersionNumber_iOS_4_2: Double { get } var NSFoundationVersionNumber_iOS_4_3: Double { get } var NSFoundationVersionNumber_iOS_5_0: Double { get } var NSFoundationVersionNumber_iOS_5_1: Double { get } var NSFoundationVersionNumber_iOS_6_1: Double { get }

    Objective-C

    #define NSFoundationVersionNumber10_0 397.40 #define NSFoundationVersionNumber10_1 425.00 #define NSFoundationVersionNumber10_1_1 425.00 #define NSFoundationVersionNumber10_1_2 425.00 #define NSFoundationVersionNumber10_1_3 425.00 #define NSFoundationVersionNumber10_1_4 425.00 #define NSFoundationVersionNumber10_2 462.00 #define NSFoundationVersionNumber10_2_1 462.00 #define NSFoundationVersionNumber10_2_2 462.00 #define NSFoundationVersionNumber10_2_3 462.00 #define NSFoundationVersionNumber10_2_4 462.00 #define NSFoundationVersionNumber10_2_5 462.00 #define NSFoundationVersionNumber10_2_6 462.00 #define NSFoundationVersionNumber10_2_7 462.70 #define NSFoundationVersionNumber10_2_8 462.70 #define NSFoundationVersionNumber10_3 500.00 #define NSFoundationVersionNumber10_3_1 500.00 #define NSFoundationVersionNumber10_3_2 500.30 #define NSFoundationVersionNumber10_3_3 500.54 #define NSFoundationVersionNumber10_3_4 500.56 #define NSFoundationVersionNumber10_3_5 500.56 #define NSFoundationVersionNumber10_3_6 500.56 #define NSFoundationVersionNumber10_3_7 500.56 #define NSFoundationVersionNumber10_3_8 500.56 #define NSFoundationVersionNumber10_3_9 500.58 #define NSFoundationVersionNumber10_4 567.00 #define NSFoundationVersionNumber10_4_1 567.00 #define NSFoundationVersionNumber10_4_2 567.12 #define NSFoundationVersionNumber10_4_3 567.21 #define NSFoundationVersionNumber10_4_4_Intel 567.23 #define NSFoundationVersionNumber10_4_4_PowerPC 567.21 #define NSFoundationVersionNumber10_4_5 567.25 #define NSFoundationVersionNumber10_4_6 567.26 #define NSFoundationVersionNumber10_4_7 567.27 #define NSFoundationVersionNumber10_4_8 567.28 #define NSFoundationVersionNumber10_4_9 567.29 #define NSFoundationVersionNumber10_4_10 567.29 #define NSFoundationVersionNumber10_4_11 567.36 #define NSFoundationVersionNumber10_5 677.00 #define NSFoundationVersionNumber10_5_1 677.10 #define NSFoundationVersionNumber10_5_2 677.15 #define NSFoundationVersionNumber10_5_3 677.19 #define NSFoundationVersionNumber10_5_4 677.19 #define NSFoundationVersionNumber10_5_5 677.21 #define NSFoundationVersionNumber10_5_6 677.22 #define NSFoundationVersionNumber10_5_7 677.24 #define NSFoundationVersionNumber10_5_8 677.26 #define NSFoundationVersionNumber10_6 751.00 #define NSFoundationVersionNumber10_6_1 751.00 #define NSFoundationVersionNumber10_6_2 751.14 #define NSFoundationVersionNumber10_6_3 751.21 #define NSFoundationVersionNumber10_6_4 751.29 #define NSFoundationVersionNumber10_6_5 751.42 #define NSFoundationVersionNumber10_6_6 751.53 #define NSFoundationVersionNumber10_6_7 751.53 #define NSFoundationVersionNumber10_6_8 751.62 #define NSFoundationVersionNumber10_7 833.10 #define NSFoundationVersionNumber10_7_1 833.10 #define NSFoundationVersionNumber10_7_2 833.20 #define NSFoundationVersionNumber10_7_3 833.24 #define NSFoundationVersionNumber10_7_4 833.25 #define NSFoundationVersionNumber10_8 945.00 #define NSFoundationVersionNumber10_8_1 945.00 #define NSFoundationVersionNumber10_8_2 945.11 #define NSFoundationVersionNumber10_8_3 945.16 #define NSFoundationVersionNumber10_8_4 945.18 #define NSFoundationVersionNumber_iPhoneOS_2_0 678.24 #define NSFoundationVersionNumber_iPhoneOS_2_1 678.26 #define NSFoundationVersionNumber_iPhoneOS_2_2 678.29 #define NSFoundationVersionNumber_iPhoneOS_3_0 678.47 #define NSFoundationVersionNumber_iPhoneOS_3_1 678.51 #define NSFoundationVersionNumber_iPhoneOS_3_2 678.60 #define NSFoundationVersionNumber_iOS_4_0 751.32 #define NSFoundationVersionNumber_iOS_4_1 751.37 #define NSFoundationVersionNumber_iOS_4_2 751.49 #define NSFoundationVersionNumber_iOS_4_3 751.49 #define NSFoundationVersionNumber_iOS_5_0 881.00 #define NSFoundationVersionNumber_iOS_5_1 890.10 #define NSFoundationVersionNumber_iOS_6_0 993.00 #define NSFoundationVersionNumber_iOS_6_1 993.00

    Constants

    • NSFoundationVersionNumber10_0

      NSFoundationVersionNumber10_0

      Foundation version released in OS X version 10.0.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_1

      NSFoundationVersionNumber10_1

      Foundation version released in OS X version 10.1.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_1_1

      NSFoundationVersionNumber10_1_1

      Foundation version released in OS X version 10.1.1.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_1_2

      NSFoundationVersionNumber10_1_2

      Foundation version released in OS X version 10.1.2.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_1_3

      NSFoundationVersionNumber10_1_3

      Foundation version released in OS X version 10.1.3.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_1_4

      NSFoundationVersionNumber10_1_4

      Foundation version released in OS X version 10.1.4.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_2

      NSFoundationVersionNumber10_2

      Foundation version released in OS X version 10.2.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_2_1

      NSFoundationVersionNumber10_2_1

      Foundation version released in OS X version 10.2.1.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_2_2

      NSFoundationVersionNumber10_2_2

      Foundation version released in OS X version 10.2.2.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_2_3

      NSFoundationVersionNumber10_2_3

      Foundation version released in OS X version 10.2.3.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_2_4

      NSFoundationVersionNumber10_2_4

      Foundation version released in OS X version 10.2.4.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_2_5

      NSFoundationVersionNumber10_2_5

      Foundation version released in OS X version 10.2.5.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_2_6

      NSFoundationVersionNumber10_2_6

      Foundation version released in OS X version 10.2.6.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_2_7

      NSFoundationVersionNumber10_2_7

      Foundation version released in OS X version 10.2.7.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_2_8

      NSFoundationVersionNumber10_2_8

      Foundation version released in OS X version 10.2.8.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_3

      NSFoundationVersionNumber10_3

      Foundation version released in OS X version 10.3.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_3_1

      NSFoundationVersionNumber10_3_1

      Foundation version released in OS X version 10.3.1.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_3_2

      NSFoundationVersionNumber10_3_2

      Foundation version released in OS X version 10.3.2.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_3_3

      NSFoundationVersionNumber10_3_3

      Foundation version released in OS X version 10.3.3.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_3_4

      NSFoundationVersionNumber10_3_4

      Foundation version released in OS X version 10.3.4.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_3_5

      NSFoundationVersionNumber10_3_5

      Foundation version released in OS X version 10.3.5.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_3_6

      NSFoundationVersionNumber10_3_6

      Foundation version released in OS X version 10.3.6.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_3_7

      NSFoundationVersionNumber10_3_7

      Foundation version released in OS X version 10.3.7.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_3_8

      NSFoundationVersionNumber10_3_8

      Foundation version released in OS X version 10.3.8.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_3_9

      NSFoundationVersionNumber10_3_9

      Foundation version released in OS X version 10.3.9.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_4

      NSFoundationVersionNumber10_4

      Foundation version released in OS X version 10.4.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_4_1

      NSFoundationVersionNumber10_4_1

      Foundation version released in OS X version 10.4.1.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_4_2

      NSFoundationVersionNumber10_4_2

      Foundation version released in OS X version 10.4.2.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_4_3

      NSFoundationVersionNumber10_4_3

      Foundation version released in OS X version 10.4.3.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_4_4_Intel

      NSFoundationVersionNumber10_4_4_Intel

      Foundation version released in OS X version 10.4.4 for Intel.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_4_4_PowerPC

      NSFoundationVersionNumber10_4_4_PowerPC

      Foundation version released in OS X version 10.4.4 for PowerPC.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_4_5

      NSFoundationVersionNumber10_4_5

      Foundation version released in OS X version 10.4.5.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_4_6

      NSFoundationVersionNumber10_4_6

      Foundation version released in OS X version 10.4.6.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_4_7

      NSFoundationVersionNumber10_4_7

      Foundation version released in OS X version 10.4.7.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_4_8

      NSFoundationVersionNumber10_4_8

      Foundation version released in OS X version 10.4.8.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_4_9

      NSFoundationVersionNumber10_4_9

      Foundation version released in OS X version 10.4.9.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_4_10

      NSFoundationVersionNumber10_4_10

      Foundation version released in OS X version 10.4.10.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_4_11

      NSFoundationVersionNumber10_4_11

      Foundation version released in OS X version 10.4.11.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_5

      NSFoundationVersionNumber10_5

      Foundation version released in OS X version 10.5.0.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_5_1

      NSFoundationVersionNumber10_5_1

      Foundation version released in OS X version 10.5.1.

      Available in iOS 2.0 and later.

    • NSFoundationVersionNumber10_5_2

      NSFoundationVersionNumber10_5_2

      Foundation version released in OS X version 10.5.2.

      Available in iOS 2.2 and later.

    • NSFoundationVersionNumber10_5_3

      NSFoundationVersionNumber10_5_3

      Foundation version released in OS X version 10.5.3.

      Available in iOS 2.2 and later.

    • NSFoundationVersionNumber10_5_4

      NSFoundationVersionNumber10_5_4

      Foundation version released in OS X version 10.5.4.

      Available in iOS 2.2 and later.

    • NSFoundationVersionNumber10_5_5

      NSFoundationVersionNumber10_5_5

      Foundation version released in OS X version 10.5.5.

      Available in iOS 4.0 and later.

    • NSFoundationVersionNumber10_5_6

      NSFoundationVersionNumber10_5_6

      Foundation version released in OS X version 10.5.6.

      Available in iOS 4.0 and later.

    • NSFoundationVersionNumber10_5_7

      NSFoundationVersionNumber10_5_7

      Foundation version released in OS X version 10.5.7.

      Available in iOS 4.0 and later.

    • NSFoundationVersionNumber10_5_8

      NSFoundationVersionNumber10_5_8

      Foundation version released in OS X version 10.5.8.

      Available in iOS 4.0 and later.

    • NSFoundationVersionNumber10_6

      NSFoundationVersionNumber10_6

      Foundation version released in OS X version 10.6.

      Available in iOS 4.0 and later.

    • NSFoundationVersionNumber10_6_1

      NSFoundationVersionNumber10_6_1

      Foundation version released in OS X version 10.6.1

      Available in iOS 4.0 and later.

    • NSFoundationVersionNumber10_6_2

      NSFoundationVersionNumber10_6_2

      Foundation version released in OS X version 10.6.2

      Available in iOS 4.0 and later.

    • NSFoundationVersionNumber10_6_3

      NSFoundationVersionNumber10_6_3

      Foundation version released in OS X version 10.6.3

      Available in iOS 4.3 and later.

    • NSFoundationVersionNumber10_6_4

      NSFoundationVersionNumber10_6_4

      Foundation version released in OS X version 10.6.4

      Available in iOS 4.3 and later.

    • NSFoundationVersionNumber10_6_5

      NSFoundationVersionNumber10_6_5

      Foundation version released in OS X version 10.6.5

      Available in iOS 4.3 and later.

    • NSFoundationVersionNumber10_6_6

      NSFoundationVersionNumber10_6_6

      Foundation version released in OS X version 10.6.6

      Available in iOS 6.0 and later.

    • NSFoundationVersionNumber10_6_7

      NSFoundationVersionNumber10_6_7

      Foundation version released in OS X version 10.6.7

      Available in iOS 6.0 and later.

    • NSFoundationVersionNumber10_6_8

      NSFoundationVersionNumber10_6_8

      Foundation version released in OS X version 10.6.8

      Available in iOS 6.0 and later.

    • NSFoundationVersionNumber10_7

      NSFoundationVersionNumber10_7

      Foundation version released in OS X version 10.7

      Available in iOS 6.0 and later.

    • NSFoundationVersionNumber10_7_1

      NSFoundationVersionNumber10_7_1

      Foundation version released in OS X version 10.7.1

      Available in iOS 6.0 and later.

    • NSFoundationVersionNumber10_7_2

      NSFoundationVersionNumber10_7_2

      Foundation version released in OS X version 10.7.2

      Available in iOS 6.0 and later.

    • NSFoundationVersionNumber10_7_3

      NSFoundationVersionNumber10_7_3

      Foundation version released in OS X version 10.7.3

      Available in iOS 6.0 and later.

    • NSFoundationVersionNumber10_7_4

      NSFoundationVersionNumber10_7_4

      Foundation version released in OS X version 10.7.4

      Available in iOS 6.0 and later.

    • NSFoundationVersionNumber10_8

      NSFoundationVersionNumber10_8

      Foundation version released in OS X version 10.8

      Available in iOS 7.0 and later.

    • NSFoundationVersionNumber10_8_1

      NSFoundationVersionNumber10_8_1

      Foundation version released in OS X version 10.8.1

      Available in iOS 7.0 and later.

    • NSFoundationVersionNumber10_8_2

      NSFoundationVersionNumber10_8_2

      Foundation version released in OS X version 10.8.2

      Available in iOS 7.0 and later.

    • NSFoundationVersionNumber10_8_3

      NSFoundationVersionNumber10_8_3

      Foundation version released in OS X version 10.8.3

      Available in iOS 7.0 and later.

    • NSFoundationVersionNumber10_8_4

      NSFoundationVersionNumber10_8_4

      Foundation version released in OS X version 10.8.4

      Available in iOS 7.0 and later.

    • NSFoundationVersionNumber_iPhoneOS_2_0

      NSFoundationVersionNumber_iPhoneOS_2_0

      Foundation version released in iPhone OS version 2.0.

      This constant is only available on iOS.

      Available in iOS 2.2 and later.

    • NSFoundationVersionNumber_iPhoneOS_2_1

      NSFoundationVersionNumber_iPhoneOS_2_1

      Foundation version released in iPhone OS version 2.1.

      This constant is only available on iOS.

      Available in iOS 2.2 and later.

    • NSFoundationVersionNumber_iPhoneOS_2_2

      NSFoundationVersionNumber_iPhoneOS_2_2

      Foundation version released in iPhone OS version 2.2.

      This constant is only available on iOS.

      Available in iOS 3.0 and later.

    • NSFoundationVersionNumber_iPhoneOS_3_0

      NSFoundationVersionNumber_iPhoneOS_3_0

      Foundation version released in iPhone OS version 3.0.

      This constant is only available on iOS.

      Available in iOS 3.2 and later.

    • NSFoundationVersionNumber_iPhoneOS_3_1

      NSFoundationVersionNumber_iPhoneOS_3_1

      Foundation version released in iPhone OS version 3.1.

      This constant is only available on iOS.

      Available in iOS 3.2 and later.

    • NSFoundationVersionNumber_iPhoneOS_3_2

      NSFoundationVersionNumber_iPhoneOS_3_2

      Foundation version released in iPhone OS version 3.2.

      This constant is only available on iOS.

      Available in iOS 4.2 and later.

    • NSFoundationVersionNumber_iOS_4_0

      NSFoundationVersionNumber_iOS_4_0

      Foundation version released in iOS version 4.0.

      This constant is only available on iOS.

      Available in iOS 4.2 and later.

    • NSFoundationVersionNumber_iOS_4_1

      NSFoundationVersionNumber_iOS_4_1

      Foundation version released in iOS version 4.1.

      This constant is only available on iOS.

      Available in iOS 4.3 and later.

    • NSFoundationVersionNumber_iOS_4_2

      NSFoundationVersionNumber_iOS_4_2

      Foundation version released in iOS version 4.2.

      This constant is only available on iOS.

      Available in iOS 4.3 and later.

    • NSFoundationVersionNumber_iOS_4_3

      NSFoundationVersionNumber_iOS_4_3

      Foundation version released in iOS version 4.3.

      This constant is only available on iOS.

      Available in iOS 6.0 and later.

    • NSFoundationVersionNumber_iOS_5_0

      NSFoundationVersionNumber_iOS_5_0

      Foundation version released in iOS version 5.0.

      This constant is only available on iOS.

      Available in iOS 6.0 and later.

    • NSFoundationVersionNumber_iOS_5_1

      NSFoundationVersionNumber_iOS_5_1

      Foundation version released in iOS version 5.1.

      This constant is only available on iOS.

      Available in iOS 6.0 and later.

    • NSFoundationVersionNumber_iOS_6

      NSFoundationVersionNumber_iOS_6

      Foundation version released in iOS version 6.0.

      This constant is only available on iOS.

    • NSFoundationVersionNumber_iOS_6_1

      NSFoundationVersionNumber_iOS_6_1

      Foundation version released in iOS version 6.0.1.

      This constant is only available on iOS.

      Available in iOS 7.0 and later.