# AppLinkAPI

```swift
struct AppLinkAPI
```

Inbound referral links and the wallet app handoff. Obtained from `FrakClient.appLink`.

**Conforms to** `Swift.Sendable`

Defined in: [Sources/FrakSDK/AppLinkAPI.swift:4](https://github.com/frak-id/wallet/blob/35995d05c807efe1e0d6319fdede3ad363124d1e/sdk/ios/Sources/FrakSDK/AppLinkAPI.swift#L4)

## Methods

### handleReferral(_:)

```swift
@discardableResult func handleReferral(_ url: String) async -> Bool
```

- Returns: whether the link carried a Frak referral context. Not a "stop routing"
  signal — still navigate to the URL either way.

### handleReferral(_:)

```swift
@discardableResult func handleReferral(_ url: URL) async -> Bool
```

### installPageURL(returnScheme:sessionId:)

```swift
func installPageURL(returnScheme: String, sessionId: String) async throws -> String
```

The wallet's hosted install page for this device.

Not the store listing — `openFrakApp()` handles that handoff itself. This page shows the
install code that carries attribution across an install, plus the store link, and it
carries a freshly minted `frak-install-v1` proof. The sharing sheet navigates to it in
place, so the user never leaves the merchant app to reach it.

- Throws: `FrakError` when the page cannot be minted: tracking is disabled, the device
  refused key material, or no merchant could be resolved.

### isFrakAppInstalled()

```swift
func isFrakAppInstalled() async -> Bool
```

### openFrakApp()

```swift
func openFrakApp() async -> OpenAppResult
```