Mac 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 OS X v10.0 and later.

    • NS_LittleEndian

      NS_LittleEndian

      The byte order is little endian.

      Available in OS X v10.0 and later.

    • NS_BigEndian

      NS_BigEndian

      The byte order is big endian.

      Available in OS X v10.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

    Swift

    var NSNotFound: UInt { get }

    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 OS X v10.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.

  • These constants are used as components in a bitfield to specify the behavior of NSAllocateCollectable and NSReallocateCollectable.

    Declaration

    Swift

    var NSScannedOption: Int { get } var NSCollectorDisabledOption: Int { get }

    Objective-C

    enum { NSScannedOption = (1<<0), NSCollectorDisabledOption = (2<<0), };

    Constants

    • NSScannedOption

      NSScannedOption

      Specifies allocation of scanned memory.

      Available in OS X v10.4 and later.

    • NSCollectorDisabledOption

      NSCollectorDisabledOption

      Specifies that the block is retained, and therefore ineligible for collection. Specifying this option is equivalent to invoking disableCollectorForPointer: with the returned block as the argument.

      Available in OS X v10.5 and later.

  • 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 OS X v10.6 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 OS X v10.6 and later.

    Import Statement

    Objective-C

    @import Foundation;

    Swift

    import Foundation

    Availability

    Available in OS X v10.6 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 OS X v10.0 and later.

    • OrderedSame

      NSOrderedSame

      The two operands are equal.

      Available in OS X v10.0 and later.

    • OrderedDescending

      NSOrderedDescending

      The left operand is greater than the right operand.

      Available in OS X v10.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 OS X v10.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 OS X v10.6 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 OS X v10.6 and later.

    Import Statement

    Objective-C

    @import Foundation;

    Swift

    import Foundation

    Availability

    Available in OS X v10.6 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, NSApplicationScriptsDirectory = 23, NSItemReplacementDirectory = 99, NSAllApplicationsDirectory = 100, NSAllLibrariesDirectory = 101, NSTrashDirectory = 102 }; typedef NSUInteger NSSearchPathDirectory;

    Constants

    • ApplicationDirectory

      NSApplicationDirectory

      Supported applications (/Applications).

      Available in OS X v10.0 and later.

    • DemoApplicationDirectory

      NSDemoApplicationDirectory

      Unsupported applications and demonstration versions.

      Available in OS X v10.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 OS X v10.0 and later.

    • AdminApplicationDirectory

      NSAdminApplicationDirectory

      System and network administration applications.

      Available in OS X v10.0 and later.

    • LibraryDirectory

      NSLibraryDirectory

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

      Available in OS X v10.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 OS X v10.0 and later.

    • UserDirectory

      NSUserDirectory

      User home directories (/Users).

      Available in OS X v10.0 and later.

    • DocumentationDirectory

      NSDocumentationDirectory

      Documentation.

      Available in OS X v10.0 and later.

    • DocumentDirectory

      NSDocumentDirectory

      Document directory.

      Available in OS X v10.2 and later.

    • CoreServiceDirectory

      NSCoreServiceDirectory

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

      Available in OS X v10.4 and later.

    • AutosavedInformationDirectory

      NSAutosavedInformationDirectory

      Location of user’s autosaved documents Library/Autosave Information

      Available in OS X v10.6 and later.

    • DesktopDirectory

      NSDesktopDirectory

      Location of user’s desktop directory.

      Available in OS X v10.4 and later.

    • CachesDirectory

      NSCachesDirectory

      Location of discardable cache files (Library/Caches).

      Available in OS X v10.4 and later.

    • ApplicationSupportDirectory

      NSApplicationSupportDirectory

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

      Available in OS X v10.4 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 OS X v10.5 and later.

    • InputMethodsDirectory

      NSInputMethodsDirectory

      Location of Input Methods (Library/Input Methods)

      Available in OS X v10.6 and later.

    • MoviesDirectory

      NSMoviesDirectory

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

      Available in OS X v10.6 and later.

    • MusicDirectory

      NSMusicDirectory

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

      Available in OS X v10.6 and later.

    • PicturesDirectory

      NSPicturesDirectory

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

      Available in OS X v10.6 and later.

    • PrinterDescriptionDirectory

      NSPrinterDescriptionDirectory

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

      Available in OS X v10.6 and later.

    • SharedPublicDirectory

      NSSharedPublicDirectory

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

      Available in OS X v10.6 and later.

    • PreferencePanesDirectory

      NSPreferencePanesDirectory

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

      Available in OS X v10.6 and later.

    • ApplicationScriptsDirectory

      NSApplicationScriptsDirectory

      Location of the user scripts folder for the calling application (~/Library/Application Scripts/<code-signing-id>

      Available in OS X v10.8 and later.

    • ItemReplacementDirectory

      NSItemReplacementDirectory

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

      Available in OS X v10.6 and later.

    • AllApplicationsDirectory

      NSAllApplicationsDirectory

      All directories where applications can occur.

      Available in OS X v10.0 and later.

    • AllLibrariesDirectory

      NSAllLibrariesDirectory

      All directories where resources can occur.

      Available in OS X v10.0 and later.

    • TrashDirectory

      NSTrashDirectory

      Location of the trash directory.

      Available in OS X v10.8 and later.

    Import Statement

    Objective-C

    @import Foundation;

    Swift

    import Foundation

    Availability

    Available in OS X v10.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 OS X v10.0 and later.

    • LocalDomainMask

      NSLocalDomainMask

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

      Available in OS X v10.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 OS X v10.0 and later.

    • SystemDomainMask

      NSSystemDomainMask

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

      Available in OS X v10.0 and later.

    • AllDomainsMask

      NSAllDomainsMask

      All domains.

      Includes all of the above and future items.

      Available in OS X v10.0 and later.

    Import Statement

    Objective-C

    @import Foundation;

    Swift

    import Foundation

    Availability

    Available in OS X v10.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 OS X v10.4 and later.

    • NSFileLockingError

      NSFileLockingError

      Failure to get a lock on file

      Available in OS X v10.4 and later.

    • NSFileReadUnknownError

      NSFileReadUnknownError

      Read error, reason unknown

      Available in OS X v10.4 and later.

    • NSFileReadNoPermissionError

      NSFileReadNoPermissionError

      Read error because of a permission problem

      Available in OS X v10.4 and later.

    • NSFileReadInvalidFileNameError

      NSFileReadInvalidFileNameError

      Read error because of an invalid file name

      Available in OS X v10.4 and later.

    • NSFileReadCorruptFileError

      NSFileReadCorruptFileError

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

      Available in OS X v10.4 and later.

    • NSFileReadNoSuchFileError

      NSFileReadNoSuchFileError

      Read error because no such file was found

      Available in OS X v10.4 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 OS X v10.4 and later.

    • NSFileReadUnsupportedSchemeError

      NSFileReadUnsupportedSchemeError

      Read error because the specified URL scheme is unsupported

      Available in OS X v10.4 and later.

    • NSFileReadTooLargeError

      NSFileReadTooLargeError

      Read error because the specified file was too large.

      Available in OS X v10.5 and later.

    • NSFileReadUnknownStringEncodingError

      NSFileReadUnknownStringEncodingError

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

      Available in OS X v10.5 and later.

    • NSFileWriteUnknownError

      NSFileWriteUnknownError

      Write error, reason unknown

      Available in OS X v10.4 and later.

    • NSFileWriteNoPermissionError

      NSFileWriteNoPermissionError

      Write error because of a permission problem

      Available in OS X v10.4 and later.

    • NSFileWriteInvalidFileNameError

      NSFileWriteInvalidFileNameError

      Write error because of an invalid file name

      Available in OS X v10.4 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 OS X v10.7 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 OS X v10.4 and later.

    • NSFileWriteUnsupportedSchemeError

      NSFileWriteUnsupportedSchemeError

      Write error because the specified URL scheme is unsupported

      Available in OS X v10.4 and later.

    • NSFileWriteOutOfSpaceError

      NSFileWriteOutOfSpaceError

      Write error because of a lack of disk space

      Available in OS X v10.4 and later.

    • NSFileWriteVolumeReadOnlyError

      NSFileWriteVolumeReadOnlyError

      Write error because because the volume is read only.

      Available in OS X v10.6 and later.

    • NSKeyValueValidationError

      NSKeyValueValidationError

      Key-value coding validation error

      Available in OS X v10.4 and later.

    • NSFormattingError

      NSFormattingError

      Formatting error (related to display of data)

      Available in OS X v10.4 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 OS X v10.4 and later.

    • NSFileErrorMinimum

      NSFileErrorMinimum

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

      Available in OS X v10.4 and later.

    • NSFileErrorMaximum

      NSFileErrorMaximum

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

      Available in OS X v10.4 and later.

    • NSValidationErrorMinimum

      NSValidationErrorMinimum

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

      Available in OS X v10.4 and later.

    • NSValidationErrorMaximum

      NSValidationErrorMaximum

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

      Available in OS X v10.4 and later.

    • NSFormattingErrorMinimum

      NSFormattingErrorMinimum

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

      Available in OS X v10.4 and later.

    • NSFormattingErrorMaximum

      NSFormattingErrorMaximum

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

      Available in OS X v10.4 and later.

    • NSPropertyListReadCorruptError

      NSPropertyListReadCorruptError

      An error was encountered while parsing the property list.

      Available in OS X v10.6 and later.

    • NSPropertyListReadUnknownVersionError

      NSPropertyListReadUnknownVersionError

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

      Available in OS X v10.6 and later.

    • NSPropertyListReadStreamError

      NSPropertyListReadStreamError

      An stream error was encountered while reading the property list.

      Available in OS X v10.6 and later.

    • NSPropertyListWriteStreamError

      NSPropertyListWriteStreamError

      An stream error was encountered while writing the property list.

      Available in OS X v10.6 and later.

    • NSPropertyListErrorMinimum

      NSPropertyListErrorMinimum

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

      Available in OS X v10.6 and later.

    • NSPropertyListErrorMaximum

      NSPropertyListErrorMaximum

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

      Available in OS X v10.6 and later.

    • NSExecutableErrorMinimum

      NSExecutableErrorMinimum

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

      Available in OS X v10.5 and later.

    • NSExecutableNotLoadableError

      NSExecutableNotLoadableError

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

      Available in OS X v10.5 and later.

    • NSExecutableArchitectureMismatchError

      NSExecutableArchitectureMismatchError

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

      Available in OS X v10.5 and later.

    • NSExecutableRuntimeMismatchError

      NSExecutableRuntimeMismatchError

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

      Available in OS X v10.5 and later.

    • NSExecutableLoadError

      NSExecutableLoadError

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

      Available in OS X v10.5 and later.

    • NSExecutableLinkError

      NSExecutableLinkError

      Executable fails due to linking issues.

      Available in OS X v10.5 and later.

    • NSExecutableErrorMaximum

      NSExecutableErrorMaximum

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

      Available in OS X v10.5 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 OS X v10.2 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 OS X v10.2 and later.

    • NSURLErrorBadURL

      NSURLErrorBadURL

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

      Available in OS X v10.2 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 OS X v10.2 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 OS X v10.2 and later.

    • NSURLErrorCannotFindHost

      NSURLErrorCannotFindHost

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

      Available in OS X v10.2 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 OS X v10.2 and later.

    • NSURLErrorDataLengthExceedsMaximum

      NSURLErrorDataLengthExceedsMaximum

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

      Available in OS X v10.5 and later.

    • NSURLErrorNetworkConnectionLost

      NSURLErrorNetworkConnectionLost

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

      Available in OS X v10.2 and later.

    • NSURLErrorDNSLookupFailed

      NSURLErrorDNSLookupFailed

      See NSURLErrorCannotFindHost

      Available in OS X v10.2 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 OS X v10.2 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 OS X v10.2 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 OS X v10.2 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 OS X v10.2 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 OS X v10.2 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 OS X v10.2 and later.

    • NSURLErrorUserAuthenticationRequired

      NSURLErrorUserAuthenticationRequired

      Returned when authentication is required to access a resource.

      Available in OS X v10.2 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 OS X v10.2 and later.

    • NSURLErrorCannotDecodeRawData

      NSURLErrorCannotDecodeRawData

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

      Available in OS X v10.5 and later.

    • NSURLErrorCannotDecodeContentData

      NSURLErrorCannotDecodeContentData

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

      Available in OS X v10.5 and later.

    • NSURLErrorCannotParseResponse

      NSURLErrorCannotParseResponse

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

      Available in OS X v10.5 and later.

    • NSURLErrorInternationalRoamingOff

      NSURLErrorInternationalRoamingOff

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

      Available in OS X v10.7 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 OS X v10.7 and later.

    • NSURLErrorDataNotAllowed

      NSURLErrorDataNotAllowed

      Returned when the cellular network disallows a connection.

      Available in OS X v10.7 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 OS X v10.7 and later.

    • NSURLErrorFileDoesNotExist

      NSURLErrorFileDoesNotExist

      Returned when a file does not exist.

      Available in OS X v10.2 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 OS X v10.2 and later.

    • NSURLErrorNoPermissionsToReadFile

      NSURLErrorNoPermissionsToReadFile

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

      Available in OS X v10.2 and later.

    • NSURLErrorSecureConnectionFailed

      NSURLErrorSecureConnectionFailed

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

      Available in OS X v10.2 and later.

    • NSURLErrorServerCertificateHasBadDate

      NSURLErrorServerCertificateHasBadDate

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

      Available in OS X v10.2 and later.

    • NSURLErrorServerCertificateUntrusted

      NSURLErrorServerCertificateUntrusted

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

      Available in OS X v10.2 and later.

    • NSURLErrorServerCertificateHasUnknownRoot

      NSURLErrorServerCertificateHasUnknownRoot

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

      Available in OS X v10.2 and later.

    • NSURLErrorServerCertificateNotYetValid

      NSURLErrorServerCertificateNotYetValid

      Returned when a server certificate is not yet valid.

      Available in OS X v10.4 and later.

    • NSURLErrorClientCertificateRejected

      NSURLErrorClientCertificateRejected

      Returned when a server certificate is rejected.

      Available in OS X v10.4 and later.

    • NSURLErrorClientCertificateRequired

      NSURLErrorClientCertificateRequired

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

      Available in OS X v10.6 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 OS X v10.2 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 OS X v10.2 and later.

    • NSURLErrorCannotOpenFile

      NSURLErrorCannotOpenFile

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

      Available in OS X v10.2 and later.

    • NSURLErrorCannotCloseFile

      NSURLErrorCannotCloseFile

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

      Available in OS X v10.2 and later.

    • NSURLErrorCannotWriteToFile

      NSURLErrorCannotWriteToFile

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

      Available in OS X v10.2 and later.

    • NSURLErrorCannotRemoveFile

      NSURLErrorCannotRemoveFile

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

      Available in OS X v10.2 and later.

    • NSURLErrorCannotMoveFile

      NSURLErrorCannotMoveFile

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

      Available in OS X v10.2 and later.

    • NSURLErrorDownloadDecodingFailedMidStream

      NSURLErrorDownloadDecodingFailedMidStream

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

      Available in OS X v10.2 and later.

    • NSURLErrorDownloadDecodingFailedToComplete

      NSURLErrorDownloadDecodingFailedToComplete

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

      Available in OS X v10.2 and later.

    Availability

    Available in OS X v10.2 with Safari 1.0 installed.

    Available in OS X v10.2.7 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 OS X v10.9 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 OS X v10.9 and later.

    • NSUbiquitousFileNotUploadedDueToQuotaError

      NSUbiquitousFileNotUploadedDueToQuotaError

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

      Available in OS X v10.9 and later.

    • NSUbiquitousFileUbiquityServerNotAvailable

      NSUbiquitousFileUbiquityServerNotAvailable

      Connecting to the iCloud servers failed.

      Available in OS X v10.9 and later.

    • NSUbiquitousFileErrorMaximum

      NSUbiquitousFileErrorMaximum

      The maximum error code value that represents an iCloud error.

      Available in OS X v10.9 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 OS X v10.8 and later.

    • NSXPCConnectionInvalid

      NSXPCConnectionInvalid

      The XPC connection was invalid.

      Available in OS X v10.8 and later.

    • NSXPCConnectionReplyInvalid

      NSXPCConnectionReplyInvalid

      The XPC connection reply was invalid.

      Available in OS X v10.8 and later.

    • NSXPCConnectionErrorMinimum

      NSXPCConnectionErrorMinimum

      The XPC connection minimum error.

      Available in OS X v10.8 and later.

    • NSXPCConnectionErrorMaximum

      NSXPCConnectionErrorMaximum

      The XPC connection maximum error.

      Available in OS X v10.8 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 OS X v10.4 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.

  • Predefined sets of callbacks for NSHashTable.

    Declaration

    Swift

    let NSIntegerHashCallBacks: NSHashTableCallBacks let NSNonOwnedPointerHashCallBacks: NSHashTableCallBacks let NSNonRetainedObjectHashCallBacks: NSHashTableCallBacks let NSObjectHashCallBacks: NSHashTableCallBacks let NSOwnedObjectIdentityHashCallBacks: NSHashTableCallBacks let NSOwnedPointerHashCallBacks: NSHashTableCallBacks let NSPointerToStructHashCallBacks: NSHashTableCallBacks

    Objective-C

    extern const NSHashTableCallBacks NSIntegerHashCallBacks; extern const NSHashTableCallBacks NSIntHashCallBacks; extern const NSHashTableCallBacks NSNonOwnedPointerHashCallBacks; extern const NSHashTableCallBacks NSNonRetainedObjectHashCallBacks; extern const NSHashTableCallBacks NSObjectHashCallBacks; extern const NSHashTableCallBacks NSOwnedObjectIdentityHashCallBacks; extern const NSHashTableCallBacks NSOwnedPointerHashCallBacks; extern const NSHashTableCallBacks NSPointerToStructHashCallBacks;

    Constants

    • NSIntegerHashCallBacks

      NSIntegerHashCallBacks

      For sets of NSInteger-sized quantities or smaller (for example, int, long, or unichar).

      Available in OS X v10.5 and later.

    • NSIntHashCallBacks

      NSIntHashCallBacks

      For sets of pointer-sized quantities or smaller (for example, int, long, or unichar).

      Use NSIntegerHashCallBacks instead.

      Available in OS X v10.0 and later.

      Deprecated in OS X v10.5.

    • NSNonOwnedPointerHashCallBacks

      NSNonOwnedPointerHashCallBacks

      For sets of pointers, hashed by address.

      Available in OS X v10.0 and later.

    • NSNonRetainedObjectHashCallBacks

      NSNonRetainedObjectHashCallBacks

      For sets of objects, but without retaining/releasing.

      Available in OS X v10.0 and later.

    • NSObjectHashCallBacks

      NSObjectHashCallBacks

      For sets of objects (similar to NSSet).

      Available in OS X v10.0 and later.

    • NSOwnedObjectIdentityHashCallBacks

      NSOwnedObjectIdentityHashCallBacks

      For sets of objects, with transfer of ownership upon insertion, using pointer equality.

      Available in OS X v10.0 and later.

    • NSOwnedPointerHashCallBacks

      NSOwnedPointerHashCallBacks

      For sets of pointers, with transfer of ownership upon insertion.

      Available in OS X v10.0 and later.

    • NSPointerToStructHashCallBacks

      NSPointerToStructHashCallBacks

      For sets of pointers to structs, when the first field of the struct is int-sized.

      Available in OS X v10.0 and later.

    Discussion

    On OS X v10.5 and later, see also the NSHashTable class.

    Note that you can make your own callback by picking fields among the above callbacks.

  • Predefined sets of callbacks for NSMapTable keys.

    Declaration

    Swift

    let NSIntegerMapKeyCallBacks: NSMapTableKeyCallBacks let NSNonOwnedPointerMapKeyCallBacks: NSMapTableKeyCallBacks let NSNonOwnedPointerOrNullMapKeyCallBacks: NSMapTableKeyCallBacks let NSNonRetainedObjectMapKeyCallBacks: NSMapTableKeyCallBacks let NSObjectMapKeyCallBacks: NSMapTableKeyCallBacks let NSOwnedPointerMapKeyCallBacks: NSMapTableKeyCallBacks

    Objective-C

    extern const NSMapTableKeyCallBacks NSIntegerMapKeyCallBacks; extern const NSMapTableKeyCallBacks NSIntMapKeyCallBacks; extern const NSMapTableKeyCallBacks NSNonOwnedPointerMapKeyCallBacks; extern const NSMapTableKeyCallBacks NSNonOwnedPointerOrNullMapKeyCallBacks; extern const NSMapTableKeyCallBacks NSNonRetainedObjectMapKeyCallBacks; extern const NSMapTableKeyCallBacks NSObjectMapKeyCallBacks; extern const NSMapTableKeyCallBacks NSOwnedPointerMapKeyCallBacks;

    Constants

    • NSIntegerMapKeyCallBacks

      NSIntegerMapKeyCallBacks

      For keys that are pointer-sized quantities or smaller (for example, int, long, or unichar).

      Available in OS X v10.5 and later.

    • NSIntMapKeyCallBacks

      NSIntMapKeyCallBacks

      For keys that are pointer-sized quantities or smaller (for example, int, long, or unichar).

      Use NSIntegerMapKeyCallBacks instead.

      Available in OS X v10.0 and later.

      Deprecated in OS X v10.5.

    • NSNonOwnedPointerMapKeyCallBacks

      NSNonOwnedPointerMapKeyCallBacks

      For keys that are pointers not freed.

      Available in OS X v10.0 and later.

    • NSNonOwnedPointerOrNullMapKeyCallBacks

      NSNonOwnedPointerOrNullMapKeyCallBacks

      For keys that are pointers not freed, or NULL.

      Available in OS X v10.0 and later.

    • NSNonRetainedObjectMapKeyCallBacks

      NSNonRetainedObjectMapKeyCallBacks

      For sets of objects, but without retaining/releasing.

      Available in OS X v10.0 and later.

    • NSObjectMapKeyCallBacks

      NSObjectMapKeyCallBacks

      For keys that are objects.

      Available in OS X v10.0 and later.

    • NSOwnedPointerMapKeyCallBacks

      NSOwnedPointerMapKeyCallBacks

      For keys that are pointers, with transfer of ownership upon insertion.

      Available in OS X v10.0 and later.

    Discussion

    On OS X v10.5 and later, see also the NSMapTable class.

    Note that you can make your own callback by picking fields among the above callbacks.

  • These are predefined sets of callbacks for NSMapTable values.

    Declaration

    Swift

    let NSIntegerMapValueCallBacks: NSMapTableValueCallBacks let NSNonOwnedPointerMapValueCallBacks: NSMapTableValueCallBacks let NSOwnedPointerMapValueCallBacks: NSMapTableValueCallBacks let NSNonRetainedObjectMapValueCallBacks: NSMapTableValueCallBacks let NSObjectMapValueCallBacks: NSMapTableValueCallBacks

    Objective-C

    extern const NSMapTableValueCallBacks NSIntegerMapValueCallBacks; extern const NSMapTableValueCallBacks NSIntMapValueCallBacks; extern const NSMapTableValueCallBacks NSNonOwnedPointerMapValueCallBacks; extern const NSMapTableValueCallBacks NSObjectMapValueCallBacks; extern const NSMapTableValueCallBacks NSNonRetainedObjectMapValueCallBacks; extern const NSMapTableValueCallBacks NSOwnedPointerMapValueCallBacks;

    Constants

    • NSIntegerMapValueCallBacks

      NSIntegerMapValueCallBacks

      For values that are pointer-sized quantities, (for example, int, long, or unichar).

      Available in OS X v10.5 and later.

    • NSIntMapValueCallBacks

      NSIntMapValueCallBacks

      For values that are pointer-sized quantities, (for example, int, long, or unichar).

      Use NSIntegerMapValueCallBacks instead.

      Available in OS X v10.0 and later.

      Deprecated in OS X v10.5.

    • NSNonOwnedPointerMapValueCallBacks

      NSNonOwnedPointerMapValueCallBacks

      For values that are not owned pointers.

      Available in OS X v10.0 and later.

    • NSOwnedPointerMapValueCallBacks

      NSOwnedPointerMapValueCallBacks

      For values that are owned pointers.

      Available in OS X v10.0 and later.

    • NSNonRetainedObjectMapValueCallBacks

      NSNonRetainedObjectMapValueCallBacks

      For sets of objects, but without retaining/releasing.

      Available in OS X v10.0 and later.

    • NSObjectMapValueCallBacks

      NSObjectMapValueCallBacks

      For values that are objects.

      Available in OS X v10.0 and later.

    Discussion

    On OS X v10.5 and later, see also the NSMapTable class.

    Note that you can make your own callback by picking fields among the above callbacks.

  • 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 OS X v10.2 and later.

  • These constants are defined as conveniences and can be used to compare with return values from functions.

    Declaration

    Swift

    let NSZeroPoint: NSPoint let NSZeroSize: NSSize let NSZeroRect: NSRect

    Objective-C

    extern const NSPoint NSZeroPoint; extern const NSSize NSZeroSize; extern const NSRect NSZeroRect;

    Constants

    • NSZeroPoint

      NSZeroPoint

      An NSPoint structure with both x and y coordinates set to 0.

      Available in OS X v10.0 and later.

    • NSZeroSize

      NSZeroSize

      An NSSize structure set to 0 in both dimensions.

      Available in OS X v10.0 and later.

    • NSZeroRect

      NSZeroRect

      An NSRect structure set to 0 in width and height.

      Available in OS X v10.0 and later.

Geometric Alignment

  • These constants are used by the NSIntegralRectWithOptions function and the related methods.

    Declaration

    Swift

    struct NSAlignmentOptions : RawOptionSetType { init(_ rawValue: UInt64) init(rawValue rawValue: UInt64) static var AlignMinXInward: NSAlignmentOptions { get } static var AlignMinYInward: NSAlignmentOptions { get } static var AlignMaxXInward: NSAlignmentOptions { get } static var AlignMaxYInward: NSAlignmentOptions { get } static var AlignWidthInward: NSAlignmentOptions { get } static var AlignHeightInward: NSAlignmentOptions { get } static var AlignMinXOutward: NSAlignmentOptions { get } static var AlignMinYOutward: NSAlignmentOptions { get } static var AlignMaxXOutward: NSAlignmentOptions { get } static var AlignMaxYOutward: NSAlignmentOptions { get } static var AlignWidthOutward: NSAlignmentOptions { get } static var AlignHeightOutward: NSAlignmentOptions { get } static var AlignMinXNearest: NSAlignmentOptions { get } static var AlignMinYNearest: NSAlignmentOptions { get } static var AlignMaxXNearest: NSAlignmentOptions { get } static var AlignMaxYNearest: NSAlignmentOptions { get } static var AlignWidthNearest: NSAlignmentOptions { get } static var AlignHeightNearest: NSAlignmentOptions { get } static var AlignRectFlipped: NSAlignmentOptions { get } static var AlignAllEdgesInward: NSAlignmentOptions { get } static var AlignAllEdgesOutward: NSAlignmentOptions { get } static var AlignAllEdgesNearest: NSAlignmentOptions { get } }

    Objective-C

    enum { NSAlignMinXInward = 1ULL << 0, NSAlignMinYInward = 1ULL << 1, NSAlignMaxXInward = 1ULL << 2, NSAlignMaxYInward = 1ULL << 3, NSAlignWidthInward = 1ULL << 4, NSAlignHeightInward = 1ULL << 5, NSAlignMinXOutward = 1ULL << 8, NSAlignMinYOutward = 1ULL << 9, NSAlignMaxXOutward = 1ULL << 10, NSAlignMaxYOutward = 1ULL << 11, NSAlignWidthOutward = 1ULL << 12, NSAlignHeightOutward = 1ULL << 13, NSAlignMinXNearest = 1ULL << 16, NSAlignMinYNearest = 1ULL << 17, NSAlignMaxXNearest = 1ULL << 18, NSAlignMaxYNearest = 1ULL << 19, NSAlignWidthNearest = 1ULL << 20, NSAlignHeightNearest = 1ULL << 21, NSAlignRectFlipped = 1ULL << 63, // convenience combinations NSAlignAllEdgesInward = NSAlignMinXInward |NSAlignMaxXInward |NSAlignMinYInward |NSAlignMaxYInward, NSAlignAllEdgesOutward = NSAlignMinXOutward |NSAlignMaxXOutward |NSAlignMinYOutward |NSAlignMaxYOutward, NSAlignAllEdgesNearest = NSAlignMinXNearest |NSAlignMaxXNearest |NSAlignMinYNearest |NSAlignMaxYNearest, }; typedef unsigned long long NSAlignmentOptions;

    Constants

    • AlignMinXInward

      NSAlignMinXInward

      Specifies that alignment of the minimum X coordinate should be to the nearest inward integral value.

      Available in OS X v10.7 and later.

    • AlignMinYInward

      NSAlignMinYInward

      Specifies that alignment of the minimum Y coordinate should be to the nearest inward integral value.

      Available in OS X v10.7 and later.

    • AlignMaxXInward

      NSAlignMaxXInward

      Specifies that alignment of the maximum X coordinate should be to the nearest inward integral value.

      Available in OS X v10.7 and later.

    • AlignMaxYInward

      NSAlignMaxYInward

      Specifies that alignment of the maximum X coordinate should be to the nearest inward integral value.

      Available in OS X v10.7 and later.

    • AlignWidthInward

      NSAlignWidthInward

      Specifies that alignment of the width should be to the nearest inward integral value.

      Available in OS X v10.7 and later.

    • AlignHeightInward

      NSAlignHeightInward

      Specifies that alignment of the height should be to the nearest inward integral value.

      Available in OS X v10.7 and later.

    • AlignMinXOutward

      NSAlignMinXOutward

      Specifies that alignment of the minimum X coordinate should be to the nearest outward integral value.

      Available in OS X v10.7 and later.

    • AlignMinYOutward

      NSAlignMinYOutward

      Specifies that alignment of the minimum Y coordinate should be to the nearest outward integral value.

      Available in OS X v10.7 and later.

    • AlignMaxXOutward

      NSAlignMaxXOutward

      Specifies that alignment of the maximum X coordinate should be to the nearest outward integral value.

      Available in OS X v10.7 and later.

    • AlignMaxYOutward

      NSAlignMaxYOutward

      Specifies that alignment of the maximum Y coordinate should be to the nearest outward integral value.

      Available in OS X v10.7 and later.

    • AlignWidthOutward

      NSAlignWidthOutward

      Specifies that alignment of the width should be to the nearest outward integral value.

      Available in OS X v10.7 and later.

    • AlignHeightOutward

      NSAlignHeightOutward

      Specifies that alignment of the height should be to the nearest outward integral value.

      Available in OS X v10.7 and later.

    • AlignMinXNearest

      NSAlignMinXNearest

      Specifies that alignment of the minimum X coordinate should be to the nearest integral value.

      Available in OS X v10.7 and later.

    • AlignMinYNearest

      NSAlignMinYNearest

      Specifies that alignment of the minimum Y coordinate should be to the nearest integral value.

      Available in OS X v10.7 and later.

    • AlignMaxXNearest

      NSAlignMaxXNearest

      Specifies that alignment of the maximum X coordinate should be to the nearest integral value.

      Available in OS X v10.7 and later.

    • AlignMaxYNearest

      NSAlignMaxYNearest

      Specifies that alignment of the maximum Y coordinate should be to the nearest integral value.

      Available in OS X v10.7 and later.

    • AlignWidthNearest

      NSAlignWidthNearest

      Specifies that alignment of the width should be to the closest nearest value.

      Available in OS X v10.7 and later.

    • AlignHeightNearest

      NSAlignHeightNearest

      Specifies that alignment of the height should be to the closest nearest value.

      Available in OS X v10.7 and later.

    • AlignRectFlipped

      NSAlignRectFlipped

      This option should be included if the rectangle is in a flipped coordinate system. This allows 0.5 to be treated in a visually consistent way.

      Available in OS X v10.7 and later.

    • AlignAllEdgesInward

      NSAlignAllEdgesInward

      Aligns all edges inward. This is the same as NSAlignMinXInward|NSAlignMaxXInward|NSAlignMinYInward|NSAlignMaxYInward.

      Available in OS X v10.7 and later.

    • AlignAllEdgesOutward

      NSAlignAllEdgesOutward

      Aligns all edges outwards. This is the same as NSAlignMinXOutward|NSAlignMaxXOutward|NSAlignMinYOutward|NSAlignMaxYOutward.

      Available in OS X v10.7 and later.

    • AlignAllEdgesNearest

      NSAlignAllEdgesNearest

      Aligns all edges to the nearest value. This is the same as NSAlignMinXNearest|NSAlignMaxXNearest|NSAlignMinYNearest|NSAlignMaxYNearest.

      Available in OS X v10.7 and later.

    Import Statement

    Objective-C

    @import Foundation;

    Swift

    import Foundation

    Availability

    Available in OS X v10.7 and later.

  • Defines the minimum and maximum edge constants.

    Declaration

    Objective-C

    #define NSMinXEdge CGRectMinXEdge #define NSMinYEdge CGRectMinYEdge #define NSMaxXEdge CGRectMaxXEdge #define NSMaxYEdge CGRectMaxYEdge

    Constants

    • NSMinXEdge

      NSMinXEdge

      The minimum X edge. This is equivalent to CGRectMinXEdge.

      Available in OS X v10.5 and later.

    • NSMinYEdge

      NSMinYEdge

      The minimum Y edge. This is equivalent to CGRectMinYEdge.

      Available in OS X v10.5 and later.

    • NSMaxXEdge

      NSMaxXEdge

      The maximum X edge. This is equivalent to CGRectMaxXEdge.

      Available in OS X v10.5 and later.

    • NSMaxYEdge

      NSMaxYEdge

      The maximum X edge. This is equivalent to CGRectMaxXEdge.

      Available in OS X v10.5 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 OS X v10.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 OS X v10.0 and later.

  • Constants used by NSMapTable.

    Declaration

    Objective-C

    #define NSNotAnIntMapKey ((const void *)0x80000000) #define NSNotAnIntegerMapKey ((const void *)NSIntegerMin) #define NSNotAPointerMapKey ((const void *)0xffffffff)

    Constants

    • NSNotAnIntMapKey

      NSNotAnIntMapKey

      Predefined notAKeyMarker for use with NSMapTableKeyCallBacks.

      Use NSNotAnIntegerMapKey instead.

      Available in OS X v10.0 and later.

    • NSNotAnIntegerMapKey

      NSNotAnIntegerMapKey

      Predefined notAKeyMarker for use with NSMapTableKeyCallBacks.

      Available in OS X v10.5 and later.

    • NSNotAPointerMapKey

      NSNotAPointerMapKey

      Predefined notAKeyMarker for use with NSMapTableKeyCallBacks.

      Available in OS X v10.0 and later.

    Discussion

    On OS X v10.5 and later, see also the NSMapTable class.

  • 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 OS X v10.5 and later.

    • NSIntegerMin

      NSIntegerMin

      The minimum value for an NSInteger.

      Available in OS X v10.5 and later.

    • NSUIntegerMax

      NSUIntegerMax

      The maximum value for an NSUInteger.

      Available in OS X v10.5 and later.

Notifications

  • Notifications sent by the Java bridge to registered observers when a virtual machine is created and initialized.

    Declaration

    Objective-C

    extern NSString *NSJavaWillSetupVirtualMachineNotification; extern NSString *NSJavaDidSetupVirtualMachineNotification; extern NSString *NSJavaWillCreateVirtualMachineNotification; extern NSString *NSJavaDidCreateVirtualMachineNotification;

    Constants

    • NSJavaWillSetupVirtualMachineNotification

      NSJavaWillSetupVirtualMachineNotification

      Notification sent before the Java virtual machine is set up.

      Available in OS X v10.0 through OS X v10.5.

      Deprecated in OS X v10.5.

    • NSJavaDidSetupVirtualMachineNotification

      NSJavaDidSetupVirtualMachineNotification

      Notification sent after the Java virtual machine is set up.

      Available in OS X v10.0 through OS X v10.5.

      Deprecated in OS X v10.5.

    • NSJavaWillCreateVirtualMachineNotification

      NSJavaWillCreateVirtualMachineNotification

      Notification sent before the Java virtual machine is created.

      Available in OS X v10.0 through OS X v10.5.

      Deprecated in OS X v10.5.

    • NSJavaDidCreateVirtualMachineNotification

      NSJavaDidCreateVirtualMachineNotification

      Notification sent after the Java virtual machine is created.

      Available in OS X v10.0 through OS X v10.5.

      Deprecated in OS X v10.5.

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 OS X v10.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 OS X v10.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 OS X v10.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 OS X v10.0 and later.

    • NSMallocException

      NSMallocException

      Obsolete; not currently used.

      Available in OS X v10.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 OS X v10.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 OS X v10.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 OS X v10.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 OS X v10.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 OS X v10.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 OS X v10.0 and later.

    • NSPortSendException

      NSPortSendException

      Generic error occurred on send.

      This is an NSPort-specific exception.

      Available in OS X v10.0 and later.

    • NSPortReceiveException

      NSPortReceiveException

      Generic error occurred on receive.

      This is an NSPort-specific exception.

      Available in OS X v10.0 and later.

    • NSOldStyleException

      NSOldStyleException

      No longer used.

      Available in OS X v10.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 OS X v10.1 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 }

    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_iOS_6_0 993.00

    Constants

    • NSFoundationVersionNumber10_0

      NSFoundationVersionNumber10_0

      Foundation version released in OS X version 10.0.

      Available in OS X v10.1 and later.

    • NSFoundationVersionNumber10_1

      NSFoundationVersionNumber10_1

      Foundation version released in OS X version 10.1.

      Available in OS X v10.2 and later.

    • NSFoundationVersionNumber10_1_1

      NSFoundationVersionNumber10_1_1

      Foundation version released in OS X version 10.1.1.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_1_2

      NSFoundationVersionNumber10_1_2

      Foundation version released in OS X version 10.1.2.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_1_3

      NSFoundationVersionNumber10_1_3

      Foundation version released in OS X version 10.1.3.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_1_4

      NSFoundationVersionNumber10_1_4

      Foundation version released in OS X version 10.1.4.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_2

      NSFoundationVersionNumber10_2

      Foundation version released in OS X version 10.2.

      Available in OS X v10.3 and later.

    • NSFoundationVersionNumber10_2_1

      NSFoundationVersionNumber10_2_1

      Foundation version released in OS X version 10.2.1.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_2_2

      NSFoundationVersionNumber10_2_2

      Foundation version released in OS X version 10.2.2.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_2_3

      NSFoundationVersionNumber10_2_3

      Foundation version released in OS X version 10.2.3.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_2_4

      NSFoundationVersionNumber10_2_4

      Foundation version released in OS X version 10.2.4.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_2_5

      NSFoundationVersionNumber10_2_5

      Foundation version released in OS X version 10.2.5.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_2_6

      NSFoundationVersionNumber10_2_6

      Foundation version released in OS X version 10.2.6.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_2_7

      NSFoundationVersionNumber10_2_7

      Foundation version released in OS X version 10.2.7.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_2_8

      NSFoundationVersionNumber10_2_8

      Foundation version released in OS X version 10.2.8.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_3

      NSFoundationVersionNumber10_3

      Foundation version released in OS X version 10.3.

      Available in OS X v10.4 and later.

    • NSFoundationVersionNumber10_3_1

      NSFoundationVersionNumber10_3_1

      Foundation version released in OS X version 10.3.1.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_3_2

      NSFoundationVersionNumber10_3_2

      Foundation version released in OS X version 10.3.2.

      Available in OS X v10.4 and later.

    • NSFoundationVersionNumber10_3_3

      NSFoundationVersionNumber10_3_3

      Foundation version released in OS X version 10.3.3.

      Available in OS X v10.4 and later.

    • NSFoundationVersionNumber10_3_4

      NSFoundationVersionNumber10_3_4

      Foundation version released in OS X version 10.3.4.

      Available in OS X v10.4 and later.

    • NSFoundationVersionNumber10_3_5

      NSFoundationVersionNumber10_3_5

      Foundation version released in OS X version 10.3.5.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_3_6

      NSFoundationVersionNumber10_3_6

      Foundation version released in OS X version 10.3.6.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_3_7

      NSFoundationVersionNumber10_3_7

      Foundation version released in OS X version 10.3.7.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_3_8

      NSFoundationVersionNumber10_3_8

      Foundation version released in OS X version 10.3.8.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_3_9

      NSFoundationVersionNumber10_3_9

      Foundation version released in OS X version 10.3.9.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_4

      NSFoundationVersionNumber10_4

      Foundation version released in OS X version 10.4.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_4_1

      NSFoundationVersionNumber10_4_1

      Foundation version released in OS X version 10.4.1.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_4_2

      NSFoundationVersionNumber10_4_2

      Foundation version released in OS X version 10.4.2.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_4_3

      NSFoundationVersionNumber10_4_3

      Foundation version released in OS X version 10.4.3.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_4_4_Intel

      NSFoundationVersionNumber10_4_4_Intel

      Foundation version released in OS X version 10.4.4 for Intel.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_4_4_PowerPC

      NSFoundationVersionNumber10_4_4_PowerPC

      Foundation version released in OS X version 10.4.4 for PowerPC.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_4_5

      NSFoundationVersionNumber10_4_5

      Foundation version released in OS X version 10.4.5.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_4_6

      NSFoundationVersionNumber10_4_6

      Foundation version released in OS X version 10.4.6.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_4_7

      NSFoundationVersionNumber10_4_7

      Foundation version released in OS X version 10.4.7.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_4_8

      NSFoundationVersionNumber10_4_8

      Foundation version released in OS X version 10.4.8.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_4_9

      NSFoundationVersionNumber10_4_9

      Foundation version released in OS X version 10.4.9.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_4_10

      NSFoundationVersionNumber10_4_10

      Foundation version released in OS X version 10.4.10.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_4_11

      NSFoundationVersionNumber10_4_11

      Foundation version released in OS X version 10.4.11.

      Available in OS X v10.5 and later.

    • NSFoundationVersionNumber10_5

      NSFoundationVersionNumber10_5

      Foundation version released in OS X version 10.5.0.

      Available in OS X v10.6 and later.

    • NSFoundationVersionNumber10_5_1

      NSFoundationVersionNumber10_5_1

      Foundation version released in OS X version 10.5.1.

      Available in OS X v10.6 and later.

    • NSFoundationVersionNumber10_5_2

      NSFoundationVersionNumber10_5_2

      Foundation version released in OS X version 10.5.2.

      Available in OS X v10.6 and later.

    • NSFoundationVersionNumber10_5_3

      NSFoundationVersionNumber10_5_3

      Foundation version released in OS X version 10.5.3.

      Available in OS X v10.6 and later.

    • NSFoundationVersionNumber10_5_4

      NSFoundationVersionNumber10_5_4

      Foundation version released in OS X version 10.5.4.

      Available in OS X v10.6 and later.

    • NSFoundationVersionNumber10_5_5

      NSFoundationVersionNumber10_5_5

      Foundation version released in OS X version 10.5.5.

      Available in OS X v10.6 and later.

    • NSFoundationVersionNumber10_5_6

      NSFoundationVersionNumber10_5_6

      Foundation version released in OS X version 10.5.6.

      Available in OS X v10.6 and later.

    • NSFoundationVersionNumber10_5_7

      NSFoundationVersionNumber10_5_7

      Foundation version released in OS X version 10.5.7.

      Available in OS X v10.7 and later.

    • NSFoundationVersionNumber10_5_8

      NSFoundationVersionNumber10_5_8

      Foundation version released in OS X version 10.5.8.

      Available in OS X v10.7 and later.

    • NSFoundationVersionNumber10_6

      NSFoundationVersionNumber10_6

      Foundation version released in OS X version 10.6.

      Available in OS X v10.7 and later.

    • NSFoundationVersionNumber10_6_1

      NSFoundationVersionNumber10_6_1

      Foundation version released in OS X version 10.6.1

      Available in OS X v10.7 and later.

    • NSFoundationVersionNumber10_6_2

      NSFoundationVersionNumber10_6_2

      Foundation version released in OS X version 10.6.2

      Available in OS X v10.7 and later.

    • NSFoundationVersionNumber10_6_3

      NSFoundationVersionNumber10_6_3

      Foundation version released in OS X version 10.6.3

      Available in OS X v10.7 and later.

    • NSFoundationVersionNumber10_6_4

      NSFoundationVersionNumber10_6_4

      Foundation version released in OS X version 10.6.4

      Available in OS X v10.7 and later.

    • NSFoundationVersionNumber10_6_5

      NSFoundationVersionNumber10_6_5

      Foundation version released in OS X version 10.6.5

      Available in OS X v10.7 and later.

    • NSFoundationVersionNumber10_6_6

      NSFoundationVersionNumber10_6_6

      Foundation version released in OS X version 10.6.6

      Available in OS X v10.8 and later.

    • NSFoundationVersionNumber10_6_7

      NSFoundationVersionNumber10_6_7

      Foundation version released in OS X version 10.6.7

      Available in OS X v10.8 and later.

    • NSFoundationVersionNumber10_6_8

      NSFoundationVersionNumber10_6_8

      Foundation version released in OS X version 10.6.8

      Available in OS X v10.8 and later.

    • NSFoundationVersionNumber10_7

      NSFoundationVersionNumber10_7

      Foundation version released in OS X version 10.7

      Available in OS X v10.8 and later.

    • NSFoundationVersionNumber10_7_1

      NSFoundationVersionNumber10_7_1

      Foundation version released in OS X version 10.7.1

      Available in OS X v10.8 and later.

    • NSFoundationVersionNumber10_7_2

      NSFoundationVersionNumber10_7_2

      Foundation version released in OS X version 10.7.2

      Available in OS X v10.8 and later.

    • NSFoundationVersionNumber10_7_3

      NSFoundationVersionNumber10_7_3

      Foundation version released in OS X version 10.7.3

      Available in OS X v10.8 and later.

    • NSFoundationVersionNumber10_7_4

      NSFoundationVersionNumber10_7_4

      Foundation version released in OS X version 10.7.4

      Available in OS X v10.8 and later.

    • NSFoundationVersionNumber10_8

      NSFoundationVersionNumber10_8

      Foundation version released in OS X version 10.8

      Available in OS X v10.9 and later.

    • NSFoundationVersionNumber10_8_1

      NSFoundationVersionNumber10_8_1

      Foundation version released in OS X version 10.8.1

      Available in OS X v10.9 and later.

    • NSFoundationVersionNumber10_8_2

      NSFoundationVersionNumber10_8_2

      Foundation version released in OS X version 10.8.2

      Available in OS X v10.9 and later.

    • NSFoundationVersionNumber10_8_3

      NSFoundationVersionNumber10_8_3

      Foundation version released in OS X version 10.8.3

      Available in OS X v10.9 and later.

    • NSFoundationVersionNumber10_8_4

      NSFoundationVersionNumber10_8_4

      Foundation version released in OS X version 10.8.4

      Available in OS X v10.9 and later.

    • NSFoundationVersionNumber_iOS_6

      NSFoundationVersionNumber_iOS_6

      Foundation version released in iOS version 6.0.

      This constant is only available on iOS.