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

# autoContentAccessingProxy

A proxy for the receiving object

```
var autoContentAccessingProxy: Any { get }
```

## Discussion

This property returns a proxy for the receiving object if the receiver adopts the <doc://com.apple.documentation/documentation/Foundation/NSDiscardableContent> protocol and still has content that has not been discarded.

The proxy calls <doc://com.apple.documentation/documentation/Foundation/NSDiscardableContent/beginContentAccess()> on the receiver to keep the content available as long as the proxy lives, and calls <doc://com.apple.documentation/documentation/Foundation/NSDiscardableContent/endContentAccess()> when the proxy is deallocated.

The wrapper object is otherwise a subclass of <doc://com.apple.documentation/documentation/Foundation/NSProxy> and forwards messages to the original receiver object as an <doc://com.apple.documentation/documentation/Foundation/NSProxy> does.

This method can be used to hide an <doc://com.apple.documentation/documentation/Foundation/NSDiscardableContent> object’s content volatility by creating an object that responds to the same messages but holds the contents of the original receiver available as long as the created proxy lives. Thus hidden, the <doc://com.apple.documentation/documentation/Foundation/NSDiscardableContent> object (by way of the proxy) can be given out to unsuspecting recipients of the object who would otherwise not know they might have to call <doc://com.apple.documentation/documentation/Foundation/NSDiscardableContent/beginContentAccess()> and <doc://com.apple.documentation/documentation/Foundation/NSDiscardableContent/endContentAccess()> around particular usages (specific to each <doc://com.apple.documentation/documentation/Foundation/NSDiscardableContent> object) of the <doc://com.apple.documentation/documentation/Foundation/NSDiscardableContent> object.

---

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)