<!--
{
  "documentType" : "article",
  "framework" : "XPC",
  "identifier" : "/documentation/XPC/XPC-macros",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Macros"
}
-->

# Macros

Macros for use with XPC when coding in Objective-C.

## Topics

### Objective-C macros

[`XPC_ASSUME_NONNULL_BEGIN`](/documentation/XPC/XPC_ASSUME_NONNULL_BEGIN)

[`XPC_ASSUME_NONNULL_END`](/documentation/XPC/XPC_ASSUME_NONNULL_END)

[`XPC_BRIDGE`](/documentation/XPC/XPC_BRIDGE)

[`XPC_BRIDGEREF_BEGIN`](/documentation/XPC/XPC_BRIDGEREF_BEGIN)

[`XPC_BRIDGEREF_BEGIN_WITH_REF`](/documentation/XPC/XPC_BRIDGEREF_BEGIN_WITH_REF)

[`XPC_BRIDGEREF_END`](/documentation/XPC/XPC_BRIDGEREF_END)

[`XPC_BRIDGEREF_MIDDLE`](/documentation/XPC/XPC_BRIDGEREF_MIDDLE)

[`XPC_CONSTRUCTOR`](/documentation/XPC/XPC_CONSTRUCTOR)

[`XPC_COUNTEDBY`](/documentation/XPC/XPC_COUNTEDBY)

[`XPC_DEBUGGER_EXCL`](/documentation/XPC/XPC_DEBUGGER_EXCL)

[`XPC_DECL`](/documentation/XPC/XPC_DECL)

[`XPC_DEPRECATED`](/documentation/XPC/XPC_DEPRECATED)

[`XPC_ENUM`](/documentation/XPC/XPC_ENUM)

[`XPC_ERROR_PEER_CODE_SIGNING_REQUIREMENT`](/documentation/XPC/XPC_ERROR_PEER_CODE_SIGNING_REQUIREMENT-c.macro)

[`XPC_EXPORT`](/documentation/XPC/XPC_EXPORT)

[`XPC_FLAGS_ENUM`](/documentation/XPC/XPC_FLAGS_ENUM)

[`XPC_GLOBAL_OBJECT`](/documentation/XPC/XPC_GLOBAL_OBJECT)

[`XPC_INLINE`](/documentation/XPC/XPC_INLINE)

[`XPC_MALLOC`](/documentation/XPC/XPC_MALLOC)

[`XPC_NOESCAPE`](/documentation/XPC/XPC_NOESCAPE)

[`XPC_NOEXPORT`](/documentation/XPC/XPC_NOEXPORT)

[`XPC_NOIMPL`](/documentation/XPC/XPC_NOIMPL)

[`XPC_NOINLINE`](/documentation/XPC/XPC_NOINLINE)

[`XPC_NONNULL1`](/documentation/XPC/XPC_NONNULL1)

[`XPC_NONNULL10`](/documentation/XPC/XPC_NONNULL10)

[`XPC_NONNULL11`](/documentation/XPC/XPC_NONNULL11)

[`XPC_NONNULL2`](/documentation/XPC/XPC_NONNULL2)

[`XPC_NONNULL3`](/documentation/XPC/XPC_NONNULL3)

[`XPC_NONNULL4`](/documentation/XPC/XPC_NONNULL4)

[`XPC_NONNULL5`](/documentation/XPC/XPC_NONNULL5)

[`XPC_NONNULL6`](/documentation/XPC/XPC_NONNULL6)

[`XPC_NONNULL7`](/documentation/XPC/XPC_NONNULL7)

[`XPC_NONNULL8`](/documentation/XPC/XPC_NONNULL8)

[`XPC_NONNULL9`](/documentation/XPC/XPC_NONNULL9)

[`XPC_NONNULL_ALL`](/documentation/XPC/XPC_NONNULL_ALL)

[`XPC_NONNULL_ARRAY`](/documentation/XPC/XPC_NONNULL_ARRAY)

[`XPC_NORETURN`](/documentation/XPC/XPC_NORETURN)

[`XPC_NOTHROW`](/documentation/XPC/XPC_NOTHROW)

[`XPC_PACKED`](/documentation/XPC/XPC_PACKED)

[`XPC_PRINTF`](/documentation/XPC/XPC_PRINTF)

[`XPC_PURE`](/documentation/XPC/XPC_PURE)

[`XPC_RETURNS_RETAINED`](/documentation/XPC/XPC_RETURNS_RETAINED)

[`XPC_SENTINEL`](/documentation/XPC/XPC_SENTINEL)

[`XPC_SIZEDBY`](/documentation/XPC/XPC_SIZEDBY)

[`XPC_SWIFT_NAME`](/documentation/XPC/XPC_SWIFT_NAME)

[`XPC_SWIFT_NOEXPORT`](/documentation/XPC/XPC_SWIFT_NOEXPORT)

[`XPC_SWIFT_UNAVAILABLE`](/documentation/XPC/XPC_SWIFT_UNAVAILABLE)

[`XPC_TESTEXPORT`](/documentation/XPC/XPC_TESTEXPORT)

[`XPC_TESTSTATIC`](/documentation/XPC/XPC_TESTSTATIC)

[`XPC_TRANSPARENT_UNION`](/documentation/XPC/XPC_TRANSPARENT_UNION)

[`XPC_TYPE`](/documentation/XPC/XPC_TYPE)

[`XPC_TYPE_RICH_ERROR`](/documentation/XPC/XPC_TYPE_RICH_ERROR-c.macro)

[`XPC_TYPE_SESSION`](/documentation/XPC/XPC_TYPE_SESSION)

[`XPC_UNAVAILABLE`](/documentation/XPC/XPC_UNAVAILABLE)

[`XPC_UNSAFE_FORGE_SINGLE`](/documentation/XPC/XPC_UNSAFE_FORGE_SINGLE)

[`XPC_UNSAFE_FORGE_SIZED_BY`](/documentation/XPC/XPC_UNSAFE_FORGE_SIZED_BY)

[`XPC_UNUSED`](/documentation/XPC/XPC_UNUSED)

[`XPC_USED`](/documentation/XPC/XPC_USED)

[`XPC_WARN_RESULT`](/documentation/XPC/XPC_WARN_RESULT)

[`XPC_WEAKIMPORT`](/documentation/XPC/XPC_WEAKIMPORT)

### Obsolete macros

[Launch-related macros](/documentation/XPC/launch-macros)

Obsolete macros for use with the launch daemon.



---

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)
