<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSMutableCopying",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(pl)NSMutableCopying"
  },
  "title" : "NSMutableCopying"
}
-->

# NSMutableCopying

A protocol that mutable objects adopt to provide functional copies of themselves.

```
protocol NSMutableCopying
```

## Overview

The [`NSMutableCopying`](/documentation/Foundation/NSMutableCopying) protocol declares a method for providing mutable copies of an object. Only classes that define an “immutable vs. mutable” distinction should adopt this protocol. Classes that don’t define such a distinction should adopt [`NSCopying`](/documentation/Foundation/NSCopying) instead.

[`NSMutableCopying`](/documentation/Foundation/NSMutableCopying) declares one method, [`mutableCopy(with:)`](/documentation/Foundation/NSMutableCopying/mutableCopy(with:)), but mutable copying is commonly invoked with the convenience method <doc://com.apple.documentation/documentation/ObjectiveC/NSObject-swift.class/mutableCopy()>. The <doc://com.apple.documentation/documentation/ObjectiveC/NSObject-swift.class/mutableCopy()> method is defined for all NSObjects and simply invokes [`mutableCopy(with:)`](/documentation/Foundation/NSMutableCopying/mutableCopy(with:)) with the default zone.

If a subclass inherits [`NSMutableCopying`](/documentation/Foundation/NSMutableCopying) from its superclass and declares additional instance variables, the subclass has to override [`mutableCopy(with:)`](/documentation/Foundation/NSMutableCopying/mutableCopy(with:)) to properly handle its own instance variables, invoking the superclass’s implementation first.

## Topics

### Copying

[`-  mutableCopyWithZone:`](/documentation/Foundation/NSMutableCopying/mutableCopy(with:))

Returns a new instance that’s a mutable copy of the receiver.

## Relationships

### Conforming Types

[`NSSet`](/documentation/Foundation/NSSet)

[`NSMutableURLRequest`](/documentation/Foundation/NSMutableURLRequest)

[`NSArray`](/documentation/Foundation/NSArray)

[`NSString`](/documentation/Foundation/NSString)

[`NSMutableDictionary`](/documentation/Foundation/NSMutableDictionary)

[`NSURLRequest`](/documentation/Foundation/NSURLRequest)

[`NSAttributedString`](/documentation/Foundation/NSAttributedString)

[`NSMutableIndexSet`](/documentation/Foundation/NSMutableIndexSet)

[`NSCountedSet`](/documentation/Foundation/NSCountedSet)

[`NSIndexSet`](/documentation/Foundation/NSIndexSet)

[`NSOrderedSet`](/documentation/Foundation/NSOrderedSet)

[`NSMutableArray`](/documentation/Foundation/NSMutableArray)

[`NSMutableOrderedSet`](/documentation/Foundation/NSMutableOrderedSet)

[`NSCharacterSet`](/documentation/Foundation/NSCharacterSet)

[`NSMutableAttributedString`](/documentation/Foundation/NSMutableAttributedString)

[`NSMutableData`](/documentation/Foundation/NSMutableData)

[`NSMutableString`](/documentation/Foundation/NSMutableString)

[`NSPurgeableData`](/documentation/Foundation/NSPurgeableData)

[`NSMutableSet`](/documentation/Foundation/NSMutableSet)

[`NSDictionary`](/documentation/Foundation/NSDictionary)

[`NSData`](/documentation/Foundation/NSData)

[`NSMutableCharacterSet`](/documentation/Foundation/NSMutableCharacterSet)

---

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)