<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFNumberType",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@E@CFNumberType"
  },
  "title" : "CFNumberType"
}
-->

# CFNumberType

Flags used by CFNumber to indicate the data type of a value.

```
enum CFNumberType
```

## Overview

The type specified in the call to [`CFNumberCreate(_:_:_:)`](/documentation/CoreFoundation/CFNumberCreate(_:_:_:)) is not necessarily preserved when creating a new CFNumber object. A CFNumber object uses whatever internal storage type the creation function deems appropriate. Use the [`CFNumberGetType(_:)`](/documentation/CoreFoundation/CFNumberGetType(_:)) function to find out what type the CFNumber object used to store your value.

## Topics

### Constants

[`kCFNumberSInt8Type`](/documentation/CoreFoundation/CFNumberType/sInt8Type)

Eight-bit, signed integer. The `SInt8` data type is defined in `MacTypes.h`.

[`kCFNumberSInt16Type`](/documentation/CoreFoundation/CFNumberType/sInt16Type)

Sixteen-bit, signed integer. The `SInt16` data type is defined in `MacTypes.h`.

[`kCFNumberSInt32Type`](/documentation/CoreFoundation/CFNumberType/sInt32Type)

Thirty-two-bit, signed integer. The `SInt32` data type is defined in `MacTypes.h`.

[`kCFNumberSInt64Type`](/documentation/CoreFoundation/CFNumberType/sInt64Type)

Sixty-four-bit, signed integer. The `SInt64` data type is defined in `MacTypes.h`.

[`kCFNumberFloat32Type`](/documentation/CoreFoundation/CFNumberType/float32Type)

Thirty-two-bit real. The `Float32` data type is defined in `MacTypes.h`.

[`kCFNumberFloat64Type`](/documentation/CoreFoundation/CFNumberType/float64Type)

Sixty-four-bit real. The `Float64` data type is defined in `MacTypes.h` and conforms to the 64-bit IEEE 754 standard.

[`kCFNumberCharType`](/documentation/CoreFoundation/CFNumberType/charType)

Basic C `char` type.

[`kCFNumberShortType`](/documentation/CoreFoundation/CFNumberType/shortType)

Basic C `short` type.

[`kCFNumberIntType`](/documentation/CoreFoundation/CFNumberType/intType)

Basic C `int` type.

[`kCFNumberLongType`](/documentation/CoreFoundation/CFNumberType/longType)

Basic C `long` type.

[`kCFNumberLongLongType`](/documentation/CoreFoundation/CFNumberType/longLongType)

Basic C `long long` type.

[`kCFNumberFloatType`](/documentation/CoreFoundation/CFNumberType/floatType)

Basic C `float` type.

[`kCFNumberDoubleType`](/documentation/CoreFoundation/CFNumberType/doubleType)

Basic C `double` type.

[`kCFNumberCFIndexType`](/documentation/CoreFoundation/CFNumberType/cfIndexType)

CFIndex value.

[`kCFNumberNSIntegerType`](/documentation/CoreFoundation/CFNumberType/nsIntegerType)

`NSInteger` value.

[`kCFNumberCGFloatType`](/documentation/CoreFoundation/CFNumberType/cgFloatType)

`CGFloat` value.

[`kCFNumberMaxType`](/documentation/CoreFoundation/CFNumberType/maxType)

Same as [`CFNumberType.cgFloatType`](/documentation/CoreFoundation/CFNumberType/cgFloatType).

## Relationships

### Conforms To

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`Hashable`](/documentation/Swift/Hashable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

[`Equatable`](/documentation/Swift/Equatable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)