<!--
{
  "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/protocol_addProperty(_:_:_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Objective-C Runtime"
    ],
    "preciseIdentifier" : "c:@F@protocol_addProperty"
  },
  "title" : "protocol_addProperty(_:_:_:_:_:_:)"
}
-->

# protocol_addProperty(_:_:_:_:_:_:)

Adds a property to a protocol that is under construction.

```
func protocol_addProperty(_ proto: Protocol, _ name: UnsafePointer<CChar>, _ attributes: UnsafePointer<objc_property_attribute_t>?, _ attributeCount: UInt32, _ isRequiredProperty: Bool, _ isInstanceProperty: Bool)
```

## Parameters

`proto`

The protocol you want to add a property to.

`name`

The name of the property you want to add.

`attributes`

An array of property attributes.

`attributeCount`

The number of properties in `attributes`.

`isRequiredProperty`

A Boolean indicating whether the property’s accessor methods are required methods of the `proto` protocol. If [`YES`](/documentation/ObjectiveC/YES), the property’s accessor methods are required methods; if [`NO`](/documentation/ObjectiveC/NO), the property’s accessor methods are optional methods.

`isInstanceProperty`

A Boolean indicating whether the property’s accessor methods are instance methods. If [`YES`](/documentation/ObjectiveC/YES), the property’s accessor methods are instance methods. [`YES`](/documentation/ObjectiveC/YES) is the only value allowed for a property. As a result, if you set this value to [`NO`](/documentation/ObjectiveC/NO), the property will not be added to the protocol.

## Discussion

The protocol you want to add the property to must be under construction—allocated but not yet registered with the Objective-C runtime (via the [`objc_registerProtocol(_:)`](/documentation/ObjectiveC/objc_registerProtocol(_:)) function).

---

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)