<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ObjectiveC",
  "identifier" : "/documentation/ObjectiveC/NSObject-swift.class/copyWithZone:",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Objective-C Runtime"
    ],
    "preciseIdentifier" : "c:objc(cs)NSObject(cm)copyWithZone:"
  },
  "title" : "copyWithZone:"
}
-->

# copyWithZone:

Returns the receiver.

```
+ (id) copyWithZone:(struct _NSZone *) zone;
```

## Parameters

`zone`

This argument is ignored.

## Return Value

The receiver.

## Discussion

This method exists so class objects can be used in situations where you need an object that conforms to the <doc://com.apple.documentation/documentation/Foundation/NSCopying> protocol. For example, this method lets you use a class object as a key to an `NSDictionary` object. You should not override this method.

---

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)