Structures
The following structures are available globally.
-
Encapsulates all configuration options for a TrustPin instance.
Pass a
TrustPinConfigurationtosetup(_:)(or the staticsetup(_:autoRegisterURLProtocol:)for the default instance). All properties are immutable — construct the value once and pass it directly tosetup.Basic usage
try await TrustPin.setup(TrustPinConfiguration( organizationId: "your-org-id", projectId: "your-project-id", publicKey: "your-base64-public-key" ))Custom mode
try await TrustPin.setup(TrustPinConfiguration( organizationId: "your-org-id", projectId: "your-project-id", publicKey: "your-base64-public-key", mode: .permissive ))Custom configuration URL
For self-hosted or BYOK deployments, supply a
configurationURLpointing to a signed JWS payload. CDN-managed projects should leave thisnil.
See moretry await TrustPin.setup(TrustPinConfiguration( organizationId: "org", projectId: "proj", publicKey: key, configurationURL: URL(string: "https://your-server.com/pins.jws") ))Declaration
Swift
public struct TrustPinConfiguration : Sendable
View on GitHub
Install in Dash
Structures Reference