> This page is for version 2022-09-01.
> For other versions, use one of these documentation indexes:
> - 2026-09-29 (default): https://docs.withpersona.com/2026-09-29/llms.txt
> - 2025-12-08: https://docs.withpersona.com/2025-12-08/llms.txt
> - 2025-10-27: https://docs.withpersona.com/2025-10-27/llms.txt
> - 2023-01-05: https://docs.withpersona.com/2023-01-05/llms.txt
> - 2022-09-01: https://docs.withpersona.com/2022-09-01/llms.txt
> - 2021-07-05: https://docs.withpersona.com/2021-07-05/llms.txt
> - 2021-05-14: https://docs.withpersona.com/2021-05-14/llms.txt
> - 2020-05-18: https://docs.withpersona.com/2020-05-18/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.withpersona.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.withpersona.com/_mcp/server.

# Sentinel iOS Integration Guide

This guide covers how to add Persona Sentinel SDK to your iOS project and how to use the SDK.

## Integration

### Requirements - Make sure the SDK is compatible

Your application needs to have a minimum deployment target set to iOS 15 or higher.

### Dependencies - Adding Persona to your project

#### Install via Swift Package Manager

To install the SDK with Swift Package Manager:

1. Select your project’s Swift Packages tab
2. Click on the + to add a package
3. Add the repository URL [https://github.com/persona-id/sentinel-ios.git](https://github.com/persona-id/sentinel-ios.git), and click Next
4. Choose the package options version rule you want to use. We recommend the default (up to next major version), and click Next
5. Check that the package is being added to the right target and click Finish.

#### Install via Cocoapods

To install the SDK with CocoaPods, add PersonaSentinel as one of your target dependencies in your Podfile:

**`ruby`**

```ruby ruby
source '<https://github.com/CocoaPods/Specs.git'>  
...

target 'Your Project' do  
  pod 'PersonaSentinel'  
end
```

### Versioning

If you're also using the Inquiries iOS SDK, ensure both implementations are using the same version of the SDK.

## Usage

The Persona Sentinel SDK collects passive signals from customers via events. The following sections describe how to configure and trigger a Sentinel event.

### Triggering a Sentinel Event

The `Sentinel` object is used to build and trigger an event.

**`Swift`**

```swift Swift
Sentinel
    .builder(
        clientToken: CLIENT_TOKEN,
        transactionTypeId: TRANSACTION_TYPE_ID,
    )
    .context()        // an optional string
    .identifiers()    // an optional array of strings
    .environmentId()  // an optional Persona environment ID: defaults to your production environment.
    .accountReferenceId("...") // optionally include account reference id for this event
    .autoCreateAccount(true)  // an optional boolean: defaults to true. Controls whether an account is automatically created.
    .autoCreateAccountTypeId("acttp_...")  // an optional account type token: defaults to the transaction type's configured default account type.
    .build()
    .trigger { result in
      switch result {
      case .success(let successData):
        // log or do something
        break
      case .failure(let error):
        // log or do something
        break
      }
    }
```

You may trigger events using `trigger()` or `triggerAsync()` for an awaitable interface.