---
title: "setPolicies(_:)"
framework: securityinterface
role: symbol
role_heading: Instance Method
path: "securityinterface/sfcertificateview/setpolicies(_:)"
---

# setPolicies(_:)

Specifies the policies to use when evaluating this certificate’s status.

## Declaration

```swift
func setPolicies(_ policies: Any!)
```

## Parameters

- `policies`: The policy or policies to use. You can pass either a SecPolicyRef object or an NSArray (containing one or more objects of type SecPolicyRef ) in this parameter. If policies is set to nil, the Apple X.509 Basic Policy is used. See doc://com.apple.documentation/documentation/Security/certificate-key-and-trust-services for a list of policies and object identifiers provided by the AppleX509TP module.

## Discussion

Discussion Applications typically display a certificate view in the context of a specific use, such as SSL or S/MIME. You should set only the policy references that apply to your intended use.

## See Also

### Related Documentation

- [policies()](securityinterface/sfcertificateview/policies().md)

### Customizing the Appearance and Behavior of the View

- [setDetailsDisclosed(_:)](securityinterface/sfcertificateview/setdetailsdisclosed(_:).md)
- [setDisplayDetails(_:)](securityinterface/sfcertificateview/setdisplaydetails(_:).md)
- [setDisplayTrust(_:)](securityinterface/sfcertificateview/setdisplaytrust(_:).md)
- [setEditableTrust(_:)](securityinterface/sfcertificateview/seteditabletrust(_:).md)
- [setPoliciesDisclosed(_:)](securityinterface/sfcertificateview/setpoliciesdisclosed(_:).md)
