CoreFoundation is a low-level C framework that provides the fundamental data types, collections, and operating-system abstractions on which higher-level frameworks are built. You work with reference types such as CFString and CFMutableString for text, CFArray, CFBag, CFData, and CFBitVector for storing values, and CFAttributedString for text with associated attributes, along with helper types like CFRange, CFComparisonResult, and CFAllocator that govern memory and comparison behavior. The framework also supplies system facilities including CFBundle for locating resources, CFPlugIn for loadable code, and CFCalendar, CFDate, and CFCharacterSet for working with time and text. Geometry types such as CGPoint, CGSize, CGRect, and CGAffineTransform are likewise available for representing coordinates and transformations.
Strings and Text 11
Reference types for immutable and mutable text, attributed text, and the supporting buffers and options that govern string handling.
- ClCFStringAn object that represents an immutable Unicode string.
- ClCFMutableStringAn object that represents a Unicode string whose contents you can modify.
- ClCFAttributedStringAn object that pairs an immutable string with attributes applied to ranges of its characters.
- ClCFMutableAttributedStringAn object representing attributed text whose characters and attributes you can modify.
- ClCFStringTokenizerAn object that divides a string into tokens such as words and sentences.
- StCFStringInlineBufferA structure that caches a string's characters for fast sequential access.
- StCFStringCompareFlagsOptions that control how strings are compared and searched.
- EnCFStringBuiltInEncodingsConstants that identify the string encodings built into Core Foundation.
- EnCFStringEncodingsConstants that identify additional string encodings supported by Core Foundation.
- EnCFStringNormalizationForm@typedef CFStringNormalizationForm
- StCFStringTokenizerTokenTypeToken type
Collections 18
Immutable and mutable container types for storing values, along with the callback structures that customize their behavior.
- ClCFArray@typedef CFArrayRef
- ClCFMutableArray@typedef CFMutableArrayRef
- ClCFBagAn object that stores an immutable, unordered collection of values, allowing duplicates.
- ClCFMutableBagAn object that stores a mutable, unordered collection of values, allowing duplicates.
- ClCFDictionary@typedef CFDictionaryRef
- ClCFMutableDictionary@typedef CFMutableDictionaryRef
- ClCFSet@typedef CFSetRef
- ClCFMutableSet@typedef CFMutableSetRef
- ClCFBinaryHeap@typedef CFBinaryHeapRef
- ClCFTree@typedef CFTreeRef
- StCFArrayCallBacksA structure of callbacks that govern how an array retains, releases, and compares its values.
- StCFBagCallBacksA structure of callbacks that govern how a bag retains, releases, and compares its values.
- StCFDictionaryKeyCallBacksA structure of callbacks that govern how a dictionary retains, releases, and hashes its keys.
- StCFDictionaryValueCallBacks@typedef CFDictionaryValueCallBacks
- StCFSetCallBacks@typedef CFSetCallBacks
- StCFBinaryHeapCallBacks@typedef CFBinaryHeapCallBacks
- StCFBinaryHeapCompareContextA structure that supplies context to a binary heap's comparison callback.
- StCFTreeContext@typedef CFTreeContext
Binary Data 5
Types for raw byte buffers, bit vectors, and the search options used when scanning binary data.
- ClCFDataAn object that stores an immutable buffer of raw bytes.
- ClCFMutableDataAn object that stores a mutable buffer of raw bytes you can append to and modify.
- ClCFBitVectorAn object that stores an immutable, ordered sequence of bits.
- ClCFMutableBitVectorAn object that stores a mutable, ordered sequence of bits you can set and clear.
- StCFDataSearchFlagsiOS 4.0+Options that control how a byte range is searched within data.
Numbers and Boxed Values 10
Object wrappers for numeric, boolean, and null values, and the constants describing their representations.
- ClCFNumberAn object that wraps a numeric value of any C scalar type.
- ClCFBooleanAn object that wraps a Boolean value for storage in collections.
- ClCFNullAn object that represents a singleton null value for use in collections.
- EnCFNumberTypeConstants that identify the C scalar type stored in a number object.
- ClCFNumberFormatterAn object that converts numbers to and from their localized textual representations.
- StCFNumberFormatterKeyConstants identifying the configurable properties of a number formatter.
- EnCFNumberFormatterStyleConstants that specify the predefined formatting styles for numbers.
- EnCFNumberFormatterRoundingModeConstants that specify how a number formatter rounds values.
- EnCFNumberFormatterPadPositionConstants that specify where a number formatter inserts padding characters.
- StCFNumberFormatterOptionFlagsOptions that control how a number formatter parses input.
Dates, Time, and Calendars 17
Types for representing points in time, calendars, time zones, locales, and the formatters that convert dates to text.
- ClCFDateAn object that represents a single point in time.
- ClCFCalendarAn object that performs calendrical calculations such as date components and ranges.
- ClCFTimeZoneAn object that represents a time zone and its offset and daylight rules.
- ClCFLocaleAn object that encapsulates conventions for formatting and interpreting region-specific data.
- ClCFDateFormatterAn object that converts dates to and from their textual representations.
- EnCFDateFormatterStyleConstants that specify the predefined formatting styles for dates and times.
- StCFDateFormatterKeyConstants identifying the configurable properties of a date formatter.
- StCFISO8601DateFormatOptionsOptions that control which components an ISO 8601 date formatter emits.
- StCFCalendarUnitConstants that identify calendrical units such as days, months, and years.
- StCFCalendarIdentifierA type that identifies a calendar system such as Gregorian or Hebrew.
- StCFGregorianDateA structure that represents a date and time in the Gregorian calendar.
- StCFGregorianUnitsA structure that represents an amount of time as Gregorian calendar units.
- StCFGregorianUnitFlagsOptions that identify which Gregorian units a calculation should include.
- StCFLocaleIdentifierA type that identifies a locale by a canonical locale string.
- StCFLocaleKeyConstants identifying the components of a locale's conventions.
- EnCFLocaleLanguageDirectionConstants that specify the writing direction of a language.
- EnCFTimeZoneNameStyleiOS 2.0+Constants that specify the style used to present a time zone's name.
Character Sets 3
Immutable and mutable sets of Unicode characters and the predefined sets available for membership tests.
- ClCFCharacterSet@typedef CFCharacterSetRef
- ClCFMutableCharacterSet@typedef CFMutableCharacterSetRef
- EnCFCharacterSetPredefinedSet@typedef CFCharacterSetPredefinedSet
Run Loop and Event Sources 11
The run loop and its input sources, observers, and timers that drive event processing on a thread.
- ClCFRunLoopAn object that processes input sources and timers dispatched to a thread.
- ClCFRunLoopSourceAn object that represents an input source feeding events into a run loop.
- ClCFRunLoopObserverAn object that receives callbacks at specific stages of a run loop's execution.
- ClCFRunLoopTimerAn object that fires a callback at a scheduled time within a run loop.
- StCFRunLoopModeA type that names a mode in which a run loop operates.
- StCFRunLoopActivityConstants that identify the stages of a run loop reported to observers.
- EnCFRunLoopRunResultConstants that indicate why a run loop finished running.
- StCFRunLoopSourceContextA structure that defines the callbacks and context for a version 0 run loop source.
- StCFRunLoopSourceContext1A structure that defines the callbacks and context for a version 1 run loop source.
- StCFRunLoopObserverContextA structure that supplies context to a run loop observer's callback.
- StCFRunLoopTimerContextA structure that supplies context to a run loop timer's callback.
Ports, Sockets, and Streams 19
Communication primitives for Mach and message ports, sockets, file descriptors, and read and write streams.
- ClCFMachPortAn object that wraps a Mach port as a run loop input source.
- ClCFMessagePortAn object that enables synchronous message passing between threads or processes.
- ClCFSocketAn object that wraps a BSD socket as a run loop input source.
- ClCFFileDescriptorAn object that monitors a file descriptor for read and write availability within a run loop.
- ClCFReadStreamAn object that provides a stream of bytes for reading from a source.
- ClCFWriteStreamAn object that provides a stream of bytes for writing to a destination.
- StCFMachPortContextA structure that supplies context to a Mach port's callback.
- StCFMessagePortContextA structure that supplies context to a message port's callback.
- StCFSocketSignatureA structure that identifies a socket by its protocol family, type, and address.
- StCFSocketCallBackTypeOptions that identify the socket activities that trigger a callback.
- StCFSocketContextA structure that supplies context to a socket's callback.
- EnCFSocketErrorConstants that indicate the result of a socket operation.
- StCFFileDescriptorContextA structure that supplies context to a file descriptor's callback.
- StCFStreamErrorA structure that describes an error that occurred on a stream.
- StCFStreamPropertyKeyConstants identifying configurable properties of a stream.
- StCFStreamEventTypeOptions that identify the events a stream reports to its client.
- StCFStreamClientContextA structure that supplies context to a stream's client callback.
- EnCFStreamStatusConstants that indicate the current status of a stream.
- EnCFStreamErrorDomainConstants that identify the domain of an error reported by a stream.
URLs and Resources 9
Types for locating files and resources by URL, enumerating directory contents, and resolving bookmarks.
- ClCFURLAn object that represents the location of a local or remote resource.
- ClCFURLEnumeratorAn object that enumerates the contents of a directory or a sequence of URLs.
- EnCFURLPathStyleConstants that specify the path style used when interpreting a file system path.
- EnCFURLComponentTypeConstants that identify the individual components of a URL.
- EnCFURLErrorConstants that identify errors that occur during URL operations.
- StCFURLEnumeratorOptionsOptions that control how a URL enumerator traverses directory contents.
- EnCFURLEnumeratorResultConstants that indicate the outcome of advancing a URL enumerator.
- StCFURLBookmarkCreationOptionsiOS 4.0+Options that control how a bookmark is created from a URL.
- StCFURLBookmarkResolutionOptionsiOS 4.0+Options that control how a bookmark is resolved back into a URL.
Bundles and Plug-ins 3
Types for locating bundled resources, loading executable code, and managing plug-in instances.
- ClCFBundleAn object that locates and loads code and resources stored in a bundle directory.
- ClCFPlugInAn object that manages a bundle containing loadable executable code as a plug-in.
- ClCFPlugInInstanceAn object that represents an instance of a type vended by a plug-in factory.
Property Lists 2
Formats and options governing the serialization and mutability of property list data.
- EnCFPropertyListFormatConstants that specify the serialization format of a property list.
- StCFPropertyListMutabilityOptionsOptions that specify the mutability of objects created when reading a property list.
Notifications and User Interaction 4
Types for distributing notifications and presenting system alert dialogs to the user.
- ClCFNotificationCenterAn object that delivers notifications to registered observers within or across processes.
- StCFNotificationNameA type that names a notification distributed by a notification center.
- EnCFNotificationSuspensionBehaviorConstants that specify how notifications are handled while an application is suspended.
- ClCFUserNotificationAn object that presents a system alert dialog and reports the user's response.
Geometry 6
Value types for representing coordinates, dimensions, rectangles, and affine transformations.
- StCGPointA structure that represents a location in a two-dimensional coordinate system.
- StCGSizeA structure that represents a width and a height.
- StCGVectorA structure that represents a change in position in two dimensions.
- StCGRectA structure that represents a rectangle as an origin point and a size.
- StCGAffineTransformA structure that represents an affine transformation matrix for two-dimensional coordinates.
- StCGAffineTransformComponentsA structure that decomposes an affine transform into scale, rotation, shear, and translation.
Memory, Errors, and Identity 9
Foundational helper types for allocation, error reporting, file security, unique identifiers, and value comparison.
- ClCFAllocatorAn object that allocates, reallocates, and deallocates memory for Core Foundation objects.
- StCFAllocatorContextA structure that defines the callbacks and context for a custom allocator.
- ClCFError@typedef CFErrorRef
- ClCFFileSecurityAn object that encapsulates a file's ownership, permission, and access control information.
- StCFFileSecurityClearOptionsiOS 6.0+Options that specify which attributes to clear from a file security object.
- ClCFUUIDAn object that represents a universally unique 128-bit identifier.
- StCFUUIDBytesA structure that holds the raw 16-byte value of a universally unique identifier.
- StCFRangeA structure that represents a contiguous range as a location and length.
- EnCFComparisonResultConstants that indicate whether a value is ordered before, equal to, or after another.
Byte Order 3
Types describing endianness and the byte-swapped representations of floating-point values.
- St__CFByteOrderA type that identifies a platform's byte order as big-endian, little-endian, or unknown.
- StCFSwappedFloat32A structure that holds a byte-swapped 32-bit floating-point value.
- StCFSwappedFloat64A structure that holds a byte-swapped 64-bit floating-point value.
Structures 1
- StCGFloatiOS 2.0+
Enumerations 1
- EnCGRectEdge
Type Aliases 70
- TyCFArrayRetainCallBack@typedef CFArrayCallBacks
- TyCFArrayReleaseCallBack
- TyCFArrayCopyDescriptionCallBack
- TyCFArrayEqualCallBack
- TyCFArrayApplierFunction@typedef CFArrayApplierFunction
- TyCFBagRetainCallBack
- TyCFBagReleaseCallBack
- TyCFBagCopyDescriptionCallBack
- TyCFBagEqualCallBack
- TyCFBagHashCallBack
- TyCFBagApplierFunction
- TyCFAllocatorTypeID
- TyCFTypeID
- TyCFOptionFlags
- TyCFHashCode
- TyCFIndex
Show 54 more
- TyCFTypeRef
- TyCFPropertyList
- TyCFComparatorFunction
- TyCFAllocatorRetainCallBack
- TyCFAllocatorReleaseCallBack
- TyCFAllocatorCopyDescriptionCallBack
- TyCFAllocatorAllocateCallBack
- TyCFAllocatorReallocateCallBack
- TyCFAllocatorDeallocateCallBack
- TyCFAllocatorPreferredSizeCallBack
- TyCFBinaryHeapApplierFunction@typedef CFBinaryHeapApplierFunction
- TyCFBit
- TyCFBundleRefNum
- TyCFByteOrder
- TyCFTimeInterval
- TyCFAbsoluteTime
- TyCFDictionaryRetainCallBack@typedef CFDictionaryKeyCallBacks
- TyCFDictionaryReleaseCallBack
- TyCFDictionaryCopyDescriptionCallBack
- TyCFDictionaryEqualCallBack
- TyCFDictionaryHashCallBack
- TyCFDictionaryApplierFunction@typedef CFDictionaryApplierFunction
- TyCFErrorDomain
- TyCFFileDescriptorNativeDescriptor
- TyCFFileDescriptorCallBack
- TyCFMachPortCallBack
- TyCFMachPortInvalidationCallBack
- TyCFMessagePortCallBack
- TyCFMessagePortInvalidationCallBack
- TyCFNotificationCallback
- TyCFPlugInDynamicRegisterFunction
- TyCFPlugInUnloadFunction
- TyCFPlugInFactoryFunction
- TyCFPlugInInstanceGetInterfaceFunction
- TyCFPlugInInstanceDeallocateInstanceDataFunction
- TyCFRunLoopObserverCallBack
- TyCFRunLoopTimerCallBack
- TyCFSetRetainCallBack@typedef CFSetRetainCallBack
- TyCFSetReleaseCallBack@typedef CFSetReleaseCallBack
- TyCFSetCopyDescriptionCallBack@typedef CFSetCopyDescriptionCallBack
- TyCFSetEqualCallBack@typedef CFSetEqualCallBack
- TyCFSetHashCallBack@typedef CFSetHashCallBack
- TyCFSetApplierFunction@typedef CFSetApplierFunction
- TyCFSocketCallBack
- TyCFSocketNativeHandle
- TyCFReadStreamClientCallBack
- TyCFWriteStreamClientCallBack
- TyCFStringEncoding
- TyCFTreeRetainCallBack@typedef CFTreeRetainCallBack
- TyCFTreeReleaseCallBack@typedef CFTreeReleaseCallBack
- TyCFTreeCopyDescriptionCallBack@typedef CFTreeCopyDescriptionCallBack
- TyCFTreeApplierFunction@typedef CFTreeApplierFunction
- TyCFURLBookmarkFileCreationOptions
- TyCFUserNotificationCallBack