<!--
{
  "documentType" : "article",
  "framework" : "ObjectiveC",
  "identifier" : "/documentation/ObjectiveC/objective-c-root-class",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Objective-C Root Class"
}
-->

# Objective-C Root Class

This macro annotates a class as being an Objective-C root class.

## Topics

### Constants

[`#define OBJC_ROOT_CLASS`](/documentation/ObjectiveC/OBJC_ROOT_CLASS)

If you define an Objective-C root class, you receive a compiler error indicating that the class is defined without specifying a base class. You can avoid this compiler error by preceding the definition of the root class (that is, before the `@interface` directive) with `OBJC_ROOT_CLASS`.



---

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)