---
title: "SecPolicyCreateWithProperties(_:_:)"
framework: security
role: symbol
role_heading: Function
path: "security/secpolicycreatewithproperties(_:_:)"
---

# SecPolicyCreateWithProperties(_:_:)

Returns a policy object based on an object identifier for the policy type.

## Declaration

```swift
func SecPolicyCreateWithProperties(_ policyIdentifier: CFTypeRef, _ properties: CFDictionary?) -> SecPolicy?
```

## Parameters

- `policyIdentifier`: The identifier for the desired policy type.
- `properties`: A properties dictionary. See doc://com.apple.security/documentation/Security/security-policy-keys for a list of valid property names to use as keys in this dictionary.

## Mentioned in

Creating a Trust Object

## Return Value

Return Value A new policy, or NULL if the policy could not be created.
