<!--
{
  "availability" : [
    "iOS: 4.3.0 -",
    "iPadOS: 4.3.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ObjectiveC",
  "identifier" : "/documentation/ObjectiveC/objc_registerProtocol(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Objective-C Runtime"
    ],
    "preciseIdentifier" : "c:@F@objc_registerProtocol"
  },
  "title" : "objc_registerProtocol(_:)"
}
-->

# objc_registerProtocol(_:)

Registers a newly created protocol with the Objective-C runtime.

```
func objc_registerProtocol(_ proto: Protocol)
```

## Parameters

`proto`

The protocol you want to register with the Objective-C runtime.

## Discussion

When you create a new protocol using the [`objc_allocateProtocol(_:)`](/documentation/ObjectiveC/objc_allocateProtocol(_:)), you then register it with the Objective-C runtime by calling this function. After a protocol is successfully registered, it is immutable and ready to use.

---

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)