---
title: "GSSCreateCredentialFromUUID(_:)"
framework: GSS
role: symbol
role_heading: Function
platforms: [iOS 7.0+, iPadOS 7.0+, Mac Catalyst 13.1+, macOS 10.9+, visionOS 1.0+]
path: "gss/gsscreatecredentialfromuuid(_:)"
---

# GSSCreateCredentialFromUUID(_:)

Creates a credential from a universally unique identifier.

## Declaration

```swift
func GSSCreateCredentialFromUUID(_ uuid: CFUUID) -> gss_cred_id_t?
```

## Parameters

- `uuid`: The universally unique identifier of the credential to fetch.

## Return Value

Return Value A GSS credential for a given CF``UUID object if the credential exists, otherwise NULL. Free the credential’s memory with gss_release_cred(_:_:) when you are done with it.

## Discussion

Discussion Use this function to get the credential corresponding to a CFUUID object that you originally obtained using a call to GSSCredentialCopyUUID(_:).

## See Also

### Allocation and Deallocation

- [gss_add_cred(_:_:_:_:_:_:_:_:_:_:_:)](gss/gss_add_cred(_:_:_:_:_:_:_:_:_:_:_:).md)
- [gss_set_cred_option(_:_:_:_:)](gss/gss_set_cred_option(_:_:_:_:).md)
- [gss_release_cred(_:_:)](gss/gss_release_cred(_:_:).md)
- [gss_destroy_cred(_:_:)](gss/gss_destroy_cred(_:_:).md)
