---
title: "setMayContainProtectedContent(_:)"
framework: appkit
role: symbol
role_heading: Type Method
path: "appkit/nsaccessibility-swift.struct/setmaycontainprotectedcontent(_:)"
---

# setMayContainProtectedContent(_:)

Sets whether the app may have protected content.

## Declaration

```swift
static func setMayContainProtectedContent(_ flag: Bool) -> Bool
```

## Discussion

Discussion Uses the value of flag to specify whether the app may have protected content. Protected content is identified by a value of true for NSAccessibilityContainsProtectedContentAttribute, but if NSAccessibilitySetMayContainProtectedContent returns false, the value of NSAccessibilityContainsProtectedContentAttribute is ignored. This function returns true on success.
