Foundation Constants Reference
| Framework | Foundation/Foundation.h |
| Declared in | FoundationErrors.h NSByteOrder.h NSDecimal.h NSError.h NSException.h NSGeometry.h NSHashTable.h NSJavaSetup.h NSMapTable.h NSObjCRuntime.h NSPathUtilities.h NSURLError.h NSZone.h |
Overview
This document defines constants in the Foundation framework that are not associated with a particular class.
Constants
Enumerations
NSByteOrder
Specifies an byte-order format.
enum _NSByteOrder {
NS_UnknownByteOrder = CFByteOrderUnknown,
NS_LittleEndian = CFByteOrderLittleEndian,
NS_BigEndian = CFByteOrderBigEndian
};
Constants
NS_UnknownByteOrderThe byte order is unknown.
Available in OS X v10.0 and later.
Declared in
NSByteOrder.h.NS_LittleEndianThe byte order is little endian.
Available in OS X v10.0 and later.
Declared in
NSByteOrder.h.NS_BigEndianThe byte order is big endian.
Available in OS X v10.0 and later.
Declared in
NSByteOrder.h.
Discussion
These constants are returned by NSHostByteOrder.
NSNotFound
Defines a value that indicates that an item requested couldn’t be found or doesn’t exist.
enum {
NSNotFound = NSIntegerMax
};
Constants
NSNotFoundA value that indicates that an item requested couldn’t be found or doesn’t exist.
Available in OS X v10.0 and later.
Declared in
NSObjCRuntime.h.
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.
Special Considerations
Prior to OS X v10.5, NSNotFound was defined as 0x7fffffff. For 32-bit systems, this was effectively the same as NSIntegerMax. To support 64-bit environments, NSNotFound is now formally defined as NSIntegerMax. This means, however, that the value is different in 32-bit and 64-bit environments. You should therefore not save the value directly in files or archives. Moreover, sending the value between 32-bit and 64-bit processes via Distributed Objects will not get you NSNotFound on the other side. This applies to any Cocoa methods invoked over Distributed Objects and which might return NSNotFound, such as the indexOfObject: method of NSArray (if sent to a proxy for an array).
Memory Allocation
These constants are used as components in a bitfield to specify the behavior of NSAllocateCollectable and NSReallocateCollectable.
enum {
NSScannedOption = (1<<0),
NSCollectorDisabledOption = (2<<0),
};
Constants
NSScannedOptionSpecifies allocation of scanned memory.
Available in OS X v10.4 and later.
Declared in
NSZone.h.NSCollectorDisabledOptionSpecifies 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.
Declared in
NSZone.h.
Declared In
NSGarbageCollector.hNSEnumerationOptions
Options for Block enumeration operations.
enum {
NSEnumerationConcurrent = (1UL << 0),
NSEnumerationReverse = (1UL << 1),
};
typedef NSUInteger NSEnumerationOptions;
Constants
NSEnumerationConcurrentSpecifies 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.
Declared in
NSObjCRuntime.h.NSEnumerationReverseSpecifies that the enumeration should be performed in reverse.
This option is available for
NSArrayandNSIndexSetclasses; its behavior is undefined forNSDictionaryandNSSetclasses, or when combined with theNSEnumerationConcurrentflag.Available in OS X v10.6 and later.
Declared in
NSObjCRuntime.h.
Declared In
NSObjCRuntime.hNSComparisonResult
These constants are used to indicate how items in a request are ordered.
enum {
NSOrderedAscending = -1,
NSOrderedSame,
NSOrderedDescending
};
typedef NSInteger NSComparisonResult;
Constants
NSOrderedAscendingThe left operand is smaller than the right operand.
Available in OS X v10.0 and later.
Declared in
NSObjCRuntime.h.NSOrderedSameThe two operands are equal.
Available in OS X v10.0 and later.
Declared in
NSObjCRuntime.h.NSOrderedDescendingThe left operand is greater than the right operand.
Available in OS X v10.0 and later.
Declared in
NSObjCRuntime.h.
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).
NSSortOptions
Options for Block sorting operations.
enum {
NSSortConcurrent = (1UL << 0),
NSSortStable = (1UL << 4),
};
typedef NSUInteger NSSortOptions;
Constants
NSSortConcurrentSpecifies 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.
Declared in
NSObjCRuntime.h.NSSortStableSpecifies 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.
Declared in
NSObjCRuntime.h.
Declared In
NSObjCRuntime.hNSSearchPathDirectory
These constants specify the location of a variety of directories by the URLsForDirectory:inDomains: and URLForDirectory:inDomain:appropriateForURL:create:error: NSFileManager methods.
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
NSApplicationDirectorySupported applications (
/Applications).Available in OS X v10.0 and later.
Declared in
NSPathUtilities.h.NSDemoApplicationDirectoryUnsupported applications and demonstration versions.
Available in OS X v10.0 and later.
Declared in
NSPathUtilities.h.NSDeveloperApplicationDirectoryDeveloper 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.
Declared in
NSPathUtilities.h.NSAdminApplicationDirectorySystem and network administration applications.
Available in OS X v10.0 and later.
Declared in
NSPathUtilities.h.NSLibraryDirectoryVarious user-visible documentation, support, and configuration files (
/Library).Available in OS X v10.0 and later.
Declared in
NSPathUtilities.h.NSDeveloperDirectoryDeveloper 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.
Declared in
NSPathUtilities.h.NSUserDirectoryUser home directories (
/Users).Available in OS X v10.0 and later.
Declared in
NSPathUtilities.h.NSDocumentationDirectoryDocumentation.
Available in OS X v10.0 and later.
Declared in
NSPathUtilities.h.NSDocumentDirectoryDocument directory.
Available in OS X v10.2 and later.
Declared in
NSPathUtilities.h.NSCoreServiceDirectoryLocation of core services (
System/Library/CoreServices).Available in OS X v10.4 and later.
Declared in
NSPathUtilities.h.NSAutosavedInformationDirectoryLocation of user’s autosaved documents
Library/Autosave InformationAvailable in OS X v10.6 and later.
Declared in
NSPathUtilities.h.NSDesktopDirectoryLocation of user’s desktop directory.
Available in OS X v10.4 and later.
Declared in
NSPathUtilities.h.NSCachesDirectoryLocation of discardable cache files (
Library/Caches).Available in OS X v10.4 and later.
Declared in
NSPathUtilities.h.NSApplicationSupportDirectoryLocation of application support files (
Library/Application Support).Available in OS X v10.4 and later.
Declared in
NSPathUtilities.h.NSDownloadsDirectoryLocation of the user’s downloads directory.
The
NSDownloadsDirectoryflag will only produce a path only when theNSUserDomainMaskis provided.Available in OS X v10.5 and later.
Declared in
NSPathUtilities.h.NSInputMethodsDirectoryLocation of Input Methods (Library/Input Methods)
Available in OS X v10.6 and later.
Declared in
NSPathUtilities.h.NSMoviesDirectoryLocation of user's Movies directory
(~/Movies)Available in OS X v10.6 and later.
Declared in
NSPathUtilities.h.NSMusicDirectoryLocation of user's Music directory (
~/Music)Available in OS X v10.6 and later.
Declared in
NSPathUtilities.h.NSPicturesDirectoryLocation of user's Pictures directory (
~/Pictures)Available in OS X v10.6 and later.
Declared in
NSPathUtilities.h.NSPrinterDescriptionDirectoryLocation of system's PPDs directory (
Library/Printers/PPDs)Available in OS X v10.6 and later.
Declared in
NSPathUtilities.h.NSSharedPublicDirectoryLocation of user's Public sharing directory (
~/Public)Available in OS X v10.6 and later.
Declared in
NSPathUtilities.h.NSPreferencePanesDirectoryLocation of the PreferencePanes directory for use with System Preferences (
Library/PreferencePanes)Available in OS X v10.6 and later.
Declared in
NSPathUtilities.h.NSApplicationScriptsDirectoryLocation of the user scripts folder for the calling application (
~/Library/Application Scripts/<code-signing-id>Available in OS X v10.8 and later.
Declared in
NSPathUtilities.h.NSItemReplacementDirectoryFor use with
NSFileManagermethodURLForDirectory:inDomain:appropriateForURL:create:error:Available in OS X v10.6 and later.
Declared in
NSPathUtilities.h.NSAllApplicationsDirectoryAll directories where applications can occur.
Available in OS X v10.0 and later.
Declared in
NSPathUtilities.h.NSAllLibrariesDirectoryAll directories where resources can occur.
Available in OS X v10.0 and later.
Declared in
NSPathUtilities.h.NSTrashDirectoryLocation of the trash directory.
Available in OS X v10.8 and later.
Declared in
NSPathUtilities.h.
NSSearchPathDomainMask
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.
enum {
NSUserDomainMask = 1,
NSLocalDomainMask = 2,
NSNetworkDomainMask = 4,
NSSystemDomainMask = 8,
NSAllDomainsMask = 0x0ffff,
};
typedef NSUInteger NSSearchPathDomainMask;
Constants
NSUserDomainMaskThe user’s home directory—the place to install user’s personal items (
~).Available in OS X v10.0 and later.
Declared in
NSPathUtilities.h.NSLocalDomainMaskLocal to the current machine—the place to install items available to everyone on this machine.
Available in OS X v10.0 and later.
Declared in
NSPathUtilities.h.NSNetworkDomainMaskPublicly 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.
Declared in
NSPathUtilities.h.NSSystemDomainMaskProvided by Apple—can’t be modified (
/System) .Available in OS X v10.0 and later.
Declared in
NSPathUtilities.h.NSAllDomainsMaskAll domains.
Includes all of the above and future items.
Available in OS X v10.0 and later.
Declared in
NSPathUtilities.h.
Declared In
NSPathUtilities.hNSError Codes
NSError codes in the Cocoa error domain.
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
NSFileNoSuchFileErrorFile-system operation attempted on non-existent file
Available in OS X v10.4 and later.
Declared in
FoundationErrors.h.NSFileLockingErrorFailure to get a lock on file
Available in OS X v10.4 and later.
Declared in
FoundationErrors.h.NSFileReadUnknownErrorRead error, reason unknown
Available in OS X v10.4 and later.
Declared in
FoundationErrors.h.NSFileReadNoPermissionErrorRead error because of a permission problem
Available in OS X v10.4 and later.
Declared in
FoundationErrors.h.NSFileReadInvalidFileNameErrorRead error because of an invalid file name
Available in OS X v10.4 and later.
Declared in
FoundationErrors.h.NSFileReadCorruptFileErrorRead error because of a corrupted file, bad format, or similar reason
Available in OS X v10.4 and later.
Declared in
FoundationErrors.h.NSFileReadNoSuchFileErrorRead error because no such file was found
Available in OS X v10.4 and later.
Declared in
FoundationErrors.h.NSFileReadInapplicableStringEncodingErrorRead error because the string encoding was not applicable.
Access the bad encoding from the
userInfodictionary using theNSStringEncodingErrorKeykey.Available in OS X v10.4 and later.
Declared in
FoundationErrors.h.NSFileReadUnsupportedSchemeErrorRead error because the specified URL scheme is unsupported
Available in OS X v10.4 and later.
Declared in
FoundationErrors.h.NSFileReadTooLargeErrorRead error because the specified file was too large.
Available in OS X v10.5 and later.
Declared in
FoundationErrors.h.NSFileReadUnknownStringEncodingErrorRead error because the string coding of the file could not be determined
Available in OS X v10.5 and later.
Declared in
FoundationErrors.h.NSFileWriteUnknownErrorWrite error, reason unknown
Available in OS X v10.4 and later.
Declared in
FoundationErrors.h.NSFileWriteNoPermissionErrorWrite error because of a permission problem
Available in OS X v10.4 and later.
Declared in
FoundationErrors.h.NSFileWriteInvalidFileNameErrorWrite error because of an invalid file name
Available in OS X v10.4 and later.
Declared in
FoundationErrors.h.NSFileWriteFileExistsErrorWrite 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.
Declared in
FoundationErrors.h.NSFileWriteInapplicableStringEncodingErrorWrite error because the string encoding was not applicable.
Access the bad encoding from the
userInfodictionary using theNSStringEncodingErrorKeykey.Available in OS X v10.4 and later.
Declared in
FoundationErrors.h.NSFileWriteUnsupportedSchemeErrorWrite error because the specified URL scheme is unsupported
Available in OS X v10.4 and later.
Declared in
FoundationErrors.h.NSFileWriteOutOfSpaceErrorWrite error because of a lack of disk space
Available in OS X v10.4 and later.
Declared in
FoundationErrors.h.NSFileWriteVolumeReadOnlyErrorWrite error because because the volume is read only.
Available in OS X v10.6 and later.
Declared in
FoundationErrors.h.NSKeyValueValidationErrorKey-value coding validation error
Available in OS X v10.4 and later.
Declared in
FoundationErrors.h.NSFormattingErrorFormatting error (related to display of data)
Available in OS X v10.4 and later.
Declared in
FoundationErrors.h.NSUserCancelledErrorThe 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.
Declared in
FoundationErrors.h.NSFileErrorMinimumMarks the start of the range of error codes reserved for file errors
Available in OS X v10.4 and later.
Declared in
FoundationErrors.h.NSFileErrorMaximumMarks the end of the range of error codes reserved for file errors
Available in OS X v10.4 and later.
Declared in
FoundationErrors.h.NSValidationErrorMinimumMarks the start of the range of error codes reserved for validation errors.
Available in OS X v10.4 and later.
Declared in
FoundationErrors.h.NSValidationErrorMaximumMarks the start and end of the range of error codes reserved for validation errors.
Available in OS X v10.4 and later.
Declared in
FoundationErrors.h.NSFormattingErrorMinimumMarks the start of the range of error codes reserved for formatting errors.
Available in OS X v10.4 and later.
Declared in
FoundationErrors.h.NSFormattingErrorMaximumMarks end of the range of error codes reserved for formatting errors.
Available in OS X v10.4 and later.
Declared in
FoundationErrors.h.NSPropertyListReadCorruptErrorAn error was encountered while parsing the property list.
Available in OS X v10.6 and later.
Declared in
FoundationErrors.h.NSPropertyListReadUnknownVersionErrorThe version number of the property list is unable to be determined.
Available in OS X v10.6 and later.
Declared in
FoundationErrors.h.NSPropertyListReadStreamErrorAn stream error was encountered while reading the property list.
Available in OS X v10.6 and later.
Declared in
FoundationErrors.h.NSPropertyListWriteStreamErrorAn stream error was encountered while writing the property list.
Available in OS X v10.6 and later.
Declared in
FoundationErrors.h.NSPropertyListErrorMinimumMarks beginning of the range of error codes reserved for property list errors.
Available in OS X v10.6 and later.
Declared in
FoundationErrors.h.NSPropertyListErrorMaximumMarks end of the range of error codes reserved for property list errors.
Available in OS X v10.6 and later.
Declared in
FoundationErrors.h.NSExecutableErrorMinimumMarks beginning of the range of error codes reserved for errors related to executable files.
Available in OS X v10.5 and later.
Declared in
FoundationErrors.h.NSExecutableNotLoadableErrorExecutable is of a type that is not loadable in the current process.
Available in OS X v10.5 and later.
Declared in
FoundationErrors.h.NSExecutableArchitectureMismatchErrorExecutable does not provide an architecture compatible with the current process.
Available in OS X v10.5 and later.
Declared in
FoundationErrors.h.NSExecutableRuntimeMismatchErrorExecutable has Objective C runtime information incompatible with the current process.
Available in OS X v10.5 and later.
Declared in
FoundationErrors.h.NSExecutableLoadErrorExecutable 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.
Declared in
FoundationErrors.h.NSExecutableLinkErrorExecutable fails due to linking issues.
Available in OS X v10.5 and later.
Declared in
FoundationErrors.h.NSExecutableErrorMaximumMarks end of the range of error codes reserved for errors related to executable files.
Available in OS X v10.5 and later.
Declared in
FoundationErrors.h.
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.
Declared In
FoundationErrors.hURL Loading System Error Codes
These values are returned as the error code property of an NSError object with the domain “NSURLErrorDomain”.
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
NSURLErrorUnknownReturned 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.
Declared in
NSURLError.h.NSURLErrorCancelledReturned 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
NSURLConnectionorNSURLDownloaddelegate will not receive this error if the download is canceled.Available in OS X v10.2 and later.
Declared in
NSURLError.h.NSURLErrorBadURLReturned when a URL is sufficiently malformed that a URL request cannot be initiated
Available in OS X v10.2 and later.
Declared in
NSURLError.h.NSURLErrorTimedOutReturned when an asynchronous operation times out.
NSURLConnectionwill 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.
Declared in
NSURLError.h.NSURLErrorUnsupportedURLReturned 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.
Declared in
NSURLError.h.NSURLErrorCannotFindHostReturned when the host name for a URL cannot be resolved.
Available in OS X v10.2 and later.
Declared in
NSURLError.h.NSURLErrorCannotConnectToHostReturned 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.
Declared in
NSURLError.h.NSURLErrorDataLengthExceedsMaximumReturned when the length of the resource data exceeds the maximum allowed.
Available in OS X v10.5 and later.
Declared in
NSURLError.h.NSURLErrorNetworkConnectionLostReturned when a client or server connection is severed in the middle of an in-progress load.
Available in OS X v10.2 and later.
Declared in
NSURLError.h.NSURLErrorDNSLookupFailedSee
NSURLErrorCannotFindHostAvailable in OS X v10.2 and later.
Declared in
NSURLError.h.NSURLErrorHTTPTooManyRedirectsReturned 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.
Declared in
NSURLError.h.NSURLErrorResourceUnavailableReturned 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.
Declared in
NSURLError.h.NSURLErrorNotConnectedToInternetReturned 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.
Declared in
NSURLError.h.NSURLErrorRedirectToNonExistentLocationReturned 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.
Declared in
NSURLError.h.NSURLErrorBadServerResponseReturned 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.
Declared in
NSURLError.h.NSURLErrorUserCancelledAuthenticationReturned 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.
Declared in
NSURLError.h.NSURLErrorUserAuthenticationRequiredReturned when authentication is required to access a resource.
Available in OS X v10.2 and later.
Declared in
NSURLError.h.NSURLErrorZeroByteResourceReturned 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.
Declared in
NSURLError.h.NSURLErrorCannotDecodeRawDataReturned when content data received during an NSURLConnection request cannot be decoded for a known content encoding.
Available in OS X v10.5 and later.
Declared in
NSURLError.h.NSURLErrorCannotDecodeContentDataReturned when content data received during an NSURLConnection request has an unknown content encoding.
Available in OS X v10.5 and later.
Declared in
NSURLError.h.NSURLErrorCannotParseResponseReturned when a response to an NSURLConnection request cannot be parsed.
Available in OS X v10.5 and later.
Declared in
NSURLError.h.NSURLErrorInternationalRoamingOffReturned when a connection would require activating a data context while roaming, but international roaming is disabled.
Available in OS X v10.7 and later.
Declared in
NSURLError.h.NSURLErrorCallIsActiveReturned 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.
Declared in
NSURLError.h.NSURLErrorDataNotAllowedReturned when the cellular network disallows a connection.
Available in OS X v10.7 and later.
Declared in
NSURLError.h.NSURLErrorRequestBodyStreamExhaustedReturned 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.
Declared in
NSURLError.h.NSURLErrorFileDoesNotExistReturned when a file does not exist.
Available in OS X v10.2 and later.
Declared in
NSURLError.h.NSURLErrorFileIsDirectoryReturned 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.
Declared in
NSURLError.h.NSURLErrorNoPermissionsToReadFileReturned when a resource cannot be read due to insufficient permissions.
Available in OS X v10.2 and later.
Declared in
NSURLError.h.NSURLErrorSecureConnectionFailedReturned 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.
Declared in
NSURLError.h.NSURLErrorServerCertificateHasBadDateReturned 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.
Declared in
NSURLError.h.NSURLErrorServerCertificateUntrustedReturned when a server certificate is signed by a root server which is not trusted.
Available in OS X v10.2 and later.
Declared in
NSURLError.h.NSURLErrorServerCertificateHasUnknownRootReturned when a server certificate is not signed by any root server.
Available in OS X v10.2 and later.
Declared in
NSURLError.h.NSURLErrorServerCertificateNotYetValidReturned when a server certificate is not yet valid.
Available in OS X v10.4 and later.
Declared in
NSURLError.h.NSURLErrorClientCertificateRejectedReturned when a server certificate is rejected.
Available in OS X v10.4 and later.
Declared in
NSURLError.h.NSURLErrorClientCertificateRequiredReturned when a client certificate is required to authenticate an SSL connection during an NSURLConnection request.
Available in OS X v10.6 and later.
Declared in
NSURLError.h.NSURLErrorCannotLoadFromNetworkReturned 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.
Declared in
NSURLError.h.NSURLErrorCannotCreateFileReturned when
NSURLDownloadobject was unable to create the downloaded file on disk due to a I/O failure.Available in OS X v10.2 and later.
Declared in
NSURLError.h.NSURLErrorCannotOpenFileReturned when
NSURLDownloadwas unable to open the downloaded file on disk.Available in OS X v10.2 and later.
Declared in
NSURLError.h.NSURLErrorCannotCloseFileReturned when
NSURLDownloadwas unable to close the downloaded file on disk.Available in OS X v10.2 and later.
Declared in
NSURLError.h.NSURLErrorCannotWriteToFileReturned when
NSURLDownloadwas unable to write to the downloaded file on disk.Available in OS X v10.2 and later.
Declared in
NSURLError.h.NSURLErrorCannotRemoveFileReturned when
NSURLDownloadwas unable to remove a downloaded file from disk.Available in OS X v10.2 and later.
Declared in
NSURLError.h.NSURLErrorCannotMoveFileReturned when
NSURLDownloadwas unable to move a downloaded file on disk.Available in OS X v10.2 and later.
Declared in
NSURLError.h.NSURLErrorDownloadDecodingFailedMidStreamReturned when
NSURLDownloadfailed to decode an encoded file during the download.Available in OS X v10.2 and later.
Declared in
NSURLError.h.NSURLErrorDownloadDecodingFailedToCompleteReturned when
NSURLDownloadfailed to decode an encoded file after downloading.Available in OS X v10.2 and later.
Declared in
NSURLError.h.
Availability
- Available in OS X v10.2 with Safari 1.0 installed.
- Available in OS X v10.2.7 and later.
Declared In
NSURLError.hXPC Errors
Errors returned by XPC connections. Note that these are not currently available on iOS.
NSXPCConnectionInterrupted = 4097, NSXPCConnectionInvalid = 4099, NSXPCConnectionReplyInvalid = 4101, NSXPCConnectionErrorMinimum = 4096, NSXPCConnectionErrorMaximum = 4224
Constants
NSXPCConnectionInterruptedThe XPC connection was interrupted.
NSXPCConnectionInvalidThe XPC connection was invalid.
NSXPCConnectionReplyInvalidThe XPC connection replay was invalid.
NSXPCConnectionErrorMinimumThe XPC connection minimum error.
NSXPCConnectionErrorMaximumThe XPC connection maximum error.
Global Variables
Cocoa Error Domain
These constants defines the Cocoa error domain.
NSString *const NSCocoaErrorDomain; NSString *const NSFeatureUnsupportedError;
Constants
NSCocoaErrorDomainApplication Kit and Foundation Kit errors.
Available in OS X v10.4 and later.
Declared in
NSError.h.NSFeatureUnsupportedErrorNSFeatureUnsupportedErroris a new error code in theNSCocoaErrorDomainthat 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
NOorniland anNSErrorwithNSFeatureUnsupportedError.
Declared In
FoundationErrors.hNSHashTable Callbacks
Predefined sets of callbacks for NSHashTable.
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
NSIntegerHashCallBacksFor sets of
NSInteger-sized quantities or smaller (for example,int,long, orunichar).Available in OS X v10.5 and later.
Declared in
NSHashTable.h.NSIntHashCallBacksFor sets of pointer-sized quantities or smaller (for example,
int,long, orunichar). (Deprecated. UseNSIntegerHashCallBacksinstead.)Available in OS X v10.0 and later.
Deprecated in OS X v10.5.
Declared in
NSHashTable.h.NSNonOwnedPointerHashCallBacksFor sets of pointers, hashed by address.
Available in OS X v10.0 and later.
Declared in
NSHashTable.h.NSNonRetainedObjectHashCallBacksFor sets of objects, but without retaining/releasing.
Available in OS X v10.0 and later.
Declared in
NSHashTable.h.NSObjectHashCallBacksFor sets of objects (similar to
NSSet).Available in OS X v10.0 and later.
Declared in
NSHashTable.h.NSOwnedObjectIdentityHashCallBacksFor sets of objects, with transfer of ownership upon insertion, using pointer equality.
Available in OS X v10.0 and later.
Declared in
NSHashTable.h.NSOwnedPointerHashCallBacksFor sets of pointers, with transfer of ownership upon insertion.
Available in OS X v10.0 and later.
Declared in
NSHashTable.h.NSPointerToStructHashCallBacksFor sets of pointers to structs, when the first field of the struct is
int-sized.Available in OS X v10.0 and later.
Declared in
NSHashTable.h.
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.
Declared In
NSHashTable.hNSMapTable Key Call Backs
Predefined sets of callbacks for NSMapTable keys.
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
NSIntegerMapKeyCallBacksFor keys that are pointer-sized quantities or smaller (for example,
int,long, orunichar).Available in OS X v10.5 and later.
Declared in
NSMapTable.h.NSIntMapKeyCallBacksFor keys that are pointer-sized quantities or smaller (for example,
int,long, orunichar). (Deprecated. UseNSIntegerMapKeyCallBacksinstead.)Available in OS X v10.0 and later.
Deprecated in OS X v10.5.
Declared in
NSMapTable.h.NSNonOwnedPointerMapKeyCallBacksFor keys that are pointers not freed.
Available in OS X v10.0 and later.
Declared in
NSMapTable.h.NSNonOwnedPointerOrNullMapKeyCallBacksFor keys that are pointers not freed, or
NULL.Available in OS X v10.0 and later.
Declared in
NSMapTable.h.NSNonRetainedObjectMapKeyCallBacksFor sets of objects, but without retaining/releasing.
Available in OS X v10.0 and later.
Declared in
NSMapTable.h.NSObjectMapKeyCallBacksFor keys that are objects.
Available in OS X v10.0 and later.
Declared in
NSMapTable.h.NSOwnedPointerMapKeyCallBacksFor keys that are pointers, with transfer of ownership upon insertion.
Available in OS X v10.0 and later.
Declared in
NSMapTable.h.
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.
Declared In
NSMapTable.hNSMapTable Value Callbacks
These are predefined sets of callbacks for NSMapTable values.
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
NSIntegerMapValueCallBacksFor values that are pointer-sized quantities, (for example,
int,long, orunichar).Available in OS X v10.5 and later.
Declared in
NSMapTable.h.NSIntMapValueCallBacksFor values that are pointer-sized quantities, (for example,
int,long, orunichar). (Deprecated. UseNSIntegerMapValueCallBacksinstead.)Available in OS X v10.0 and later.
Deprecated in OS X v10.5.
Declared in
NSMapTable.h.NSNonOwnedPointerMapValueCallBacksFor values that are not owned pointers.
Available in OS X v10.0 and later.
Declared in
NSMapTable.h.NSOwnedPointerMapValueCallBacksFor values that are owned pointers.
Available in OS X v10.0 and later.
Declared in
NSMapTable.h.NSNonRetainedObjectMapValueCallBacksFor sets of objects, but without retaining/releasing.
Available in OS X v10.0 and later.
Declared in
NSMapTable.h.NSObjectMapValueCallBacksFor values that are objects.
Available in OS X v10.0 and later.
Declared in
NSMapTable.h.
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.
Declared In
NSMapTable.hNSURL Domain
This error domain is defined for NSURL.
extern NSString * const NSURLErrorDomain;
Constants
NSURLErrorDomainURL loading system errors
Available in OS X v10.2 and later.
Declared in
NSURLError.h.
Declared In
NSURLError.hZero Constants
These constants are defined as conveniences and can be used to compare with return values from functions.
extern const NSPoint NSZeroPoint; extern const NSSize NSZeroSize; extern const NSRect NSZeroRect;
Constants
NSZeroPointAn
NSPointstructure with both x and y coordinates set to0.Available in OS X v10.0 and later.
Declared in
NSGeometry.h.NSZeroSizeAn
NSSizestructure set to0in both dimensions.Available in OS X v10.0 and later.
Declared in
NSGeometry.h.NSZeroRectAn
NSRectstructure set to0in width and height.Available in OS X v10.0 and later.
Declared in
NSGeometry.h.
Declared In
NSGeometry.hGeometric Alignment
NSAlignmentOptions
These constants are used by the NSIntegralRectWithOptions function and the related methods.
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
NSAlignMinXInwardSpecifies that alignment of the minimum X coordinate should be to the nearest inward integral value.
Available in OS X v10.7 and later.
Declared in
NSGeometry.h.NSAlignMinYInwardSpecifies that alignment of the minimum Y coordinate should be to the nearest inward integral value.
Available in OS X v10.7 and later.
Declared in
NSGeometry.h.NSAlignMaxXInwardSpecifies that alignment of the maximum X coordinate should be to the nearest inward integral value.
Available in OS X v10.7 and later.
Declared in
NSGeometry.h.NSAlignMaxYInwardSpecifies that alignment of the maximum X coordinate should be to the nearest inward integral value.
Available in OS X v10.7 and later.
Declared in
NSGeometry.h.NSAlignWidthInwardSpecifies that alignment of the width should be to the nearest inward integral value.
Available in OS X v10.7 and later.
Declared in
NSGeometry.h.NSAlignHeightInwardSpecifies that alignment of the height should be to the nearest inward integral value.
Available in OS X v10.7 and later.
Declared in
NSGeometry.h.NSAlignMinXOutwardSpecifies that alignment of the minimum X coordinate should be to the nearest outward integral value.
Available in OS X v10.7 and later.
Declared in
NSGeometry.h.NSAlignMinYOutwardSpecifies that alignment of the minimum Y coordinate should be to the nearest outward integral value.
Available in OS X v10.7 and later.
Declared in
NSGeometry.h.NSAlignMaxXOutwardSpecifies that alignment of the maximum X coordinate should be to the nearest outward integral value.
Available in OS X v10.7 and later.
Declared in
NSGeometry.h.NSAlignMaxYOutwardSpecifies that alignment of the maximum Y coordinate should be to the nearest outward integral value.
Available in OS X v10.7 and later.
Declared in
NSGeometry.h.NSAlignWidthOutwardSpecifies that alignment of the width should be to the nearest outward integral value.
Available in OS X v10.7 and later.
Declared in
NSGeometry.h.NSAlignHeightOutwardSpecifies that alignment of the height should be to the nearest outward integral value.
Available in OS X v10.7 and later.
Declared in
NSGeometry.h.NSAlignMinXNearestSpecifies that alignment of the minimum X coordinate should be to the nearest integral value.
Available in OS X v10.7 and later.
Declared in
NSGeometry.h.NSAlignMinYNearestSpecifies that alignment of the minimum Y coordinate should be to the nearest integral value.
Available in OS X v10.7 and later.
Declared in
NSGeometry.h.NSAlignMaxXNearestSpecifies that alignment of the maximum X coordinate should be to the nearest integral value.
Available in OS X v10.7 and later.
Declared in
NSGeometry.h.NSAlignMaxYNearestSpecifies that alignment of the maximum Y coordinate should be to the nearest integral value.
Available in OS X v10.7 and later.
Declared in
NSGeometry.h.NSAlignWidthNearestSpecifies that alignment of the width should be to the closest nearest value.
Available in OS X v10.7 and later.
Declared in
NSGeometry.h.NSAlignHeightNearestSpecifies that alignment of the height should be to the closest nearest value.
Available in OS X v10.7 and later.
Declared in
NSGeometry.h.NSAlignRectFlippedThis 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.
Declared in
NSGeometry.h.NSAlignAllEdgesInwardAligns all edges inward. This is the same as
NSAlignMinXInward|NSAlignMaxXInward|NSAlignMinYInward|NSAlignMaxYInward.Available in OS X v10.7 and later.
Declared in
NSGeometry.h.NSAlignAllEdgesOutwardAligns all edges outwards. This is the same as
NSAlignMinXOutward|NSAlignMaxXOutward|NSAlignMinYOutward|NSAlignMaxYOutward.Available in OS X v10.7 and later.
Declared in
NSGeometry.h.NSAlignAllEdgesNearestAligns all edges to the nearest value. This is the same as
NSAlignMinXNearest|NSAlignMaxXNearest|NSAlignMinYNearest|NSAlignMaxYNearest.Available in OS X v10.7 and later.
Declared in
NSGeometry.h.
Minimum and Maximum Edges
Defines the minimum and maximum edge constants.
#define NSMinXEdge CGRectMinXEdge #define NSMinYEdge CGRectMinYEdge #define NSMaxXEdge CGRectMaxXEdge #define NSMaxYEdge CGRectMaxYEdge
Constants
NSMinXEdgeThe minimum X edge. This is equivalent to
CGRectMinXEdge.Available in OS X v10.5 and later.
Declared in
NSGeometry.h.NSMinYEdgeThe minimum Y edge. This is equivalent to
CGRectMinYEdge.Available in OS X v10.5 and later.
Declared in
NSGeometry.h.NSMaxXEdgeThe maximum X edge. This is equivalent to
CGRectMaxXEdge.Available in OS X v10.5 and later.
Declared in
NSGeometry.h.NSMaxYEdgeThe maximum X edge. This is equivalent to
CGRectMaxXEdge.Available in OS X v10.5 and later.
Declared in
NSGeometry.h.
Numeric Constants
NSDecimal Constants
Constants used by NSDecimal.
#define NSDecimalMaxSize (8) #define NSDecimalNoScale SHRT_MAX
Constants
NSDecimalMaxSizeThe maximum size of
NSDecimal.Gives a precision of at least 38 decimal digits, 128 binary positions.
Available in OS X v10.0 and later.
Declared in
NSDecimal.h.NSDecimalNoScaleSpecifies 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.
Declared in
NSDecimal.h.
Declared In
NSDecimal.hNSMapTable Constants
Constants used by NSMapTable.
#define NSNotAnIntMapKey ((const void *)0x80000000) #define NSNotAnIntegerMapKey ((const void *)NSIntegerMin) #define NSNotAPointerMapKey ((const void *)0xffffffff)
Constants
NSNotAnIntMapKeyPredefined
notAKeyMarkerfor use withNSMapTableKeyCallBacks. (Deprecated. UseNSNotAnIntegerMapKeyinstead.)Available in OS X v10.0 and later.
Declared in
NSMapTable.h.NSNotAnIntegerMapKeyPredefined
notAKeyMarkerfor use withNSMapTableKeyCallBacks.Available in OS X v10.5 and later.
Declared in
NSMapTable.h.NSNotAPointerMapKeyPredefined
notAKeyMarkerfor use withNSMapTableKeyCallBacks.Available in OS X v10.0 and later.
Declared in
NSMapTable.h.
Discussion
On OS X v10.5 and later, see also the NSMapTable class.
Declared In
NSMapTable.hNSInteger and NSUInteger Maximum and Minimum Values
Constants representing the maximum and minimum values of NSInteger and NSUInteger.
#define NSIntegerMax LONG_MAX #define NSIntegerMin LONG_MIN #define NSUIntegerMax ULONG_MAX
Constants
NSIntegerMaxThe maximum value for an
NSInteger.Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSIntegerMinThe minimum value for an
NSInteger.Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSUIntegerMaxThe maximum value for an
NSUInteger.Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.
Declared In
NSObjCRuntime.hNotifications
Java Setup Notification Names
Notifications sent by the Java bridge to registered observers when a virtual machine is created and initialized.
extern NSString *NSJavaWillSetupVirtualMachineNotification; extern NSString *NSJavaDidSetupVirtualMachineNotification; extern NSString *NSJavaWillCreateVirtualMachineNotification; extern NSString *NSJavaDidCreateVirtualMachineNotification;
Constants
NSJavaWillSetupVirtualMachineNotificationNotification 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.
Declared in
NSJavaSetup.h.NSJavaDidSetupVirtualMachineNotificationNotification 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.
Declared in
NSJavaSetup.h.NSJavaWillCreateVirtualMachineNotificationNotification 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.
Declared in
NSJavaSetup.h.NSJavaDidCreateVirtualMachineNotificationNotification 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.
Declared in
NSJavaSetup.h.
Declared In
NSJavaSetup.hExceptions
General Exception Names
Exceptions defined by NSException.
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
NSGenericExceptionA generic name for an exception.
You should typically use a more specific exception name.
Available in OS X v10.0 and later.
Declared in
NSException.h.NSRangeExceptionName 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.
Declared in
NSException.h.NSInvalidArgumentExceptionName of an exception that occurs when you pass an invalid argument to a method, such as a
nilpointer where a non-nilobject is required.Available in OS X v10.0 and later.
Declared in
NSException.h.NSInternalInconsistencyExceptionName 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.
Declared in
NSException.h.NSMallocExceptionObsolete; not currently used.
Available in OS X v10.0 and later.
Declared in
NSException.h.NSObjectInaccessibleExceptionName of an exception that occurs when a remote object is accessed from a thread that should not access it.
See
NSConnection’senableMultipleThreads.Available in OS X v10.0 and later.
Declared in
NSException.h.NSObjectNotAvailableExceptionName of an exception that occurs when the remote side of the
NSConnectionrefused to send the message to the object because the object has never been vended.Available in OS X v10.0 and later.
Declared in
NSException.h.NSDestinationInvalidExceptionName 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.
Declared in
NSException.h.NSPortTimeoutExceptionName 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.
Declared in
NSException.h.NSInvalidSendPortExceptionName of an exception that occurs when the send port of an
NSConnectionhas become invalid.This is a distributed objects–specific exception.
Available in OS X v10.0 and later.
Declared in
NSException.h.NSInvalidReceivePortExceptionName of an exception that occurs when the receive port of an
NSConnectionhas become invalid.This is a distributed objects–specific exception.
Available in OS X v10.0 and later.
Declared in
NSException.h.NSPortSendExceptionGeneric error occurred on send.
This is an
NSPort-specific exception.Available in OS X v10.0 and later.
Declared in
NSException.h.NSPortReceiveExceptionGeneric error occurred on receive.
This is an
NSPort-specific exception.Available in OS X v10.0 and later.
Declared in
NSException.h.NSOldStyleExceptionNo longer used.
Available in OS X v10.0 and later.
Declared in
NSException.h.
Declared In
NSException.hVersion Numbers
Foundation Version Number
Version of the Foundation framework in the current environment.
double NSFoundationVersionNumber;
Constants
NSFoundationVersionNumberThe version of the Foundation framework in the current environment.
Available in OS X v10.1 and later.
Declared in
NSObjCRuntime.h.
Declared In
NSObjCRuntime.hFoundation Framework Version Numbers
Constants to define Foundation Framework version numbers.
#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 NSFoundationVersionNumber_iOS_2_0 678.24 #define NSFoundationVersionNumber_iOS_2_1 678.26 #define NSFoundationVersionNumber_iOS_2_2 678.29
Constants
NSFoundationVersionNumber10_0Foundation version released in OS X version 10.0.
Available in OS X v10.1 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_1Foundation version released in OS X version 10.1.
Available in OS X v10.2 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_1_1Foundation version released in OS X version 10.1.1.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_1_2Foundation version released in OS X version 10.1.2.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_1_3Foundation version released in OS X version 10.1.3.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_1_4Foundation version released in OS X version 10.1.4.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_2Foundation version released in OS X version 10.2.
Available in OS X v10.3 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_2_1Foundation version released in OS X version 10.2.1.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_2_2Foundation version released in OS X version 10.2.2.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_2_3Foundation version released in OS X version 10.2.3.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_2_4Foundation version released in OS X version 10.2.4.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_2_5Foundation version released in OS X version 10.2.5.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_2_6Foundation version released in OS X version 10.2.6.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_2_7Foundation version released in OS X version 10.2.7.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_2_8Foundation version released in OS X version 10.2.8.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_3Foundation version released in OS X version 10.3.
Available in OS X v10.4 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_3_1Foundation version released in OS X version 10.3.1.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_3_2Foundation version released in OS X version 10.3.2.
Available in OS X v10.4 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_3_3Foundation version released in OS X version 10.3.3.
Available in OS X v10.4 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_3_4Foundation version released in OS X version 10.3.4.
Available in OS X v10.4 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_3_5Foundation version released in OS X version 10.3.5.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_3_6Foundation version released in OS X version 10.3.6.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_3_7Foundation version released in OS X version 10.3.7.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_3_8Foundation version released in OS X version 10.3.8.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_3_9Foundation version released in OS X version 10.3.9.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_4Foundation version released in OS X version 10.4.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_4_1Foundation version released in OS X version 10.4.1.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_4_2Foundation version released in OS X version 10.4.2.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_4_3Foundation version released in OS X version 10.4.3.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_4_4_IntelFoundation version released in OS X version 10.4.4 for Intel.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_4_4_PowerPCFoundation version released in OS X version 10.4.4 for PowerPC.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_4_5Foundation version released in OS X version 10.4.5.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_4_6Foundation version released in OS X version 10.4.6.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_4_7Foundation version released in OS X version 10.4.7.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_4_8Foundation version released in OS X version 10.4.8.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_4_9Foundation version released in OS X version 10.4.9.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_4_10Foundation version released in OS X version 10.4.10.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_4_11Foundation version released in OS X version 10.4.11.
Available in OS X v10.5 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_5Foundation version released in OS X version 10.5.0.
Available in OS X v10.6 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_5_1Foundation version released in OS X version 10.5.1.
Available in OS X v10.6 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_5_2Foundation version released in OS X version 10.5.2.
Available in OS X v10.6 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_5_3Foundation version released in OS X version 10.5.3.
Available in OS X v10.6 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_5_4Foundation version released in OS X version 10.5.4.
Available in OS X v10.6 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_5_5Foundation version released in OS X version 10.5.5.
Available in OS X v10.6 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber10_5_6Foundation version released in OS X version 10.5.6.
Available in OS X v10.6 and later.
Declared in
NSObjCRuntime.h.NSFoundationVersionNumber_iOS_2_0Foundation version released in iOS version 2.0.
This constant is only available on iOS.
NSFoundationVersionNumber_iOS_2_1Foundation version released in iOS version 2.1.
This constant is only available on iOS.
NSFoundationVersionNumber_iOS_2_2Foundation version released in iOS version 2.2.
This constant is only available on iOS.
Declared In
NSObjCRuntime.h© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-09-19)