---
title: iOS
description: Integrate the Human Token Journey into your iOS app using ASWebAuthenticationSession — native, secure, and no WebView needed.
canonical: https://developer.unico.io/human-token/integrations/app/ios
locale: en
generated_by: markdown-export
---

- [/](/)
- [Integrations](/human-token/integrations)
- App
- iOS

**On this pageiOSIntegrate the Human Token Journey into your iOS app using ASWebAuthenticationSession.

`ASWebAuthenticationSession` launches the Human Token Journey in a system-managed browser. When the journey finishes, the session returns to your app via the registered URL scheme.
### Prerequisites​

iOS 13 or later
Xcode 14+
`AuthenticationServices` framework (built-in)
A unique URL scheme for your app (e.g. `myapp`)

### Step 1: Define your URL scheme​

Choose a unique scheme (e.g. `myapp`). This is used as the `callbackUri` when creating the process:
```
callbackUri: myapp://callback
```

### Step 2: Create the presentation context provider​

```
import AuthenticationServicesimport UIKitclass UnicoAuthenticationController: NSObject, ASWebAuthenticationPresentationContextProviding {    func presentationAnchor(for session: ASWebAuthenticationSession) -> ASPresentationAnchor {        guard let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene,              let window = windowScene.windows.first else {            return ASPresentationAnchor()        }        return window    }}
```

### Step 3: Create the session manager​

```
import AuthenticationServicesclass AuthenticationSessionManager {    static let shared = AuthenticationSessionManager()    private var session: ASWebAuthenticationSession?    private let contextProvider = UnicoAuthenticationController()    func start(url: URL, completion: @escaping (String?) -> Void) {        let newSession = ASWebAuthenticationSession(            url: url,            callbackURLScheme: "myapp"        ) { callbackURL, error in            self.session = nil            if let callbackURL = callbackURL {                let components = URLComponents(url: callbackURL, resolvingAgainstBaseURL: false)                let processId = components?.queryItems?.first(where: { $0.name == "id" })?.value                completion(processId)            } else {                completion(nil)            }        }        newSession.presentationContextProvider = contextProvider        newSession.prefersEphemeralWebBrowserSession = true        newSession.start()        session = newSession    }}
```

### Step 4: Launch the journey​

```
guard let url = URL(string: processLink) else { return }AuthenticationSessionManager.shared.start(url: url) { processId in    if let processId = processId {        // Journey completed — send processId to your backend via Get Process    } else {        // User canceled the session    }}
```

infoThe `callbackURLScheme` parameter takes only the scheme name (`myapp`), without `://`.
### File summary​

FilePurpose`UnicoAuthenticationController.swift`Presentation context providerSession manager (your view or service)`ASWebAuthenticationSession` lifecycleLast updated on Oct 21, 2026**