<!--
{
  "availability" : [
    "macOS: 10.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SecurityInterface",
  "identifier" : "/documentation/SecurityInterface/SFAuthorizationView/setString(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Security Interface"
    ],
    "preciseIdentifier" : "c:objc(cs)SFAuthorizationView(im)setString:"
  },
  "title" : "setString(_:)"
}
-->

# setString(_:)

Sets the requested-right string to use with the default authorization rights set.

```
func setString(_ authorizationString: AuthorizationString!)
```

## Parameters

`authorizationString`

The string to be displayed.

## Discussion

This is a convenience method that creates an authorization rights set when you specify only the name of the requested right. The requested-right string is displayed in the Details pane of the user authentication dialog box. Either this method or the [`setAuthorizationRights(_:)`](/documentation/SecurityInterface/SFAuthorizationView/setAuthorizationRights(_:)) method must be called before the view displays correctly.

## See Also

  [Authorization Services Programming Guide](https://developer.apple.com/library/archive/documentation/Security/Conceptual/authorization_concepts/01introduction/introduction.html#//apple_ref/doc/uid/TP30000995)

[`func authorizationRights() -> UnsafeMutablePointer<AuthorizationRights>!`](/documentation/SecurityInterface/SFAuthorizationView/authorizationRights())

Returns the authorization rights for this view.



---

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)