Skip to main content
The iOS SDK is in Public Beta. It supports iOS 15 and later. Validate deferred installation with a TestFlight or App Store build before production use.
The open-source Swift package supports Universal Links, user-initiated deferred handoff, protected pending state, idempotent retries, and optional consent-gated probabilistic matching.

Requirements

  • iOS 15 or later
  • Xcode 15 or later
  • Swift 5.9 or later

Install with Swift Package Manager

In Xcode, select File → Add Package Dependencies and enter:
Select Up to Next Major Version from 1.0.0, then add the Biqli product to the application target. For a manifest:
Add .product(name: "Biqli", package: "biqli-ios") to the target dependency list.

Configure

The attached verified domain must match attributionDomain. Never embed a biqli_... secret workspace API key. Add the Associated Domains capability to the app target and include:
Use the exact hostname without a scheme, path, query, or trailing slash. Each hostname needs its own association entry and Apple App Site Association file.

SwiftUI lifecycle integration

Universal Links arrive as browsing-web user activities, not as custom URL schemes:
You may also pass a known verified link directly as resolveAttribution(deepLink: url).

UIKit lifecycle integration

Forward userActivity.webpageURL from application(_:continue:restorationHandler:) or the corresponding scene delegate method:

Exact deferred handoff on iOS 16 and later

Use the system-backed SwiftUI control after the first launch:
UIKit can construct BiqliPasteControl(consentGranted:completion:). Both use Apple’s user-operated UIPasteControl; the SDK never polls or silently reads the pasteboard. See Apple’s UIPasteControl reference for the platform control’s user-initiated behavior.

Explicit paste on iOS 15

Provide your own clearly labeled user-tapped paste action. After the person supplies a URL, call the actual SDK API:
There is no resolveFromPasteboard API. The SDK accepts a complete HTTPS handoff URL containing a valid opaque biqli_token; malformed text produces BiqliError.invalidHandoffURL.

Result model

BiqliAttributionResult contains open, optional click, optional link, optional attribution, optional attributionReceipt, and requestId. The attribution metadata is represented by the JSONValue enum, and dynamic values are [String: String]. Match values are:
An iOS integration normally observes exact_app_link, exact_handoff, probabilistic, or none.

State, reinstall, and receipts

The app-instance ID, pending link or opaque handoff, pending idempotent request, and cached matched result use Keychain storage with this-device-only accessibility. A UserDefaults installation marker is removed by uninstall; when the marker is absent after reinstall, the SDK clears surviving Keychain state and creates a new app instance. A matched first-open result is cached without its signed receipt. A later cold launch with no new link or handoff returns that cache without creating another open. Unmatched iOS first opens remain eligible for later recovery during the 24-hour first-open window. The ten-minute receipt exists only on the live matched response. Send it to a trusted backend immediately if the operation needs proof.

Retry and timeout behavior

  • Request timeout: 5 seconds.
  • Immediate attempts: at most three.
  • Backoff between attempts: approximately 400 ms, then 800 ms, plus 0–250 ms random jitter.
  • Immediate retries: transport errors, HTTP 429, and HTTP 5xx.
  • Later-launch recovery: pending request, event ID, and idempotency key remain protected in Keychain.
The SDK does not perform an autonomous background retry loop. Call resolveAttribution() on a later cold launch. When consentRequired is true, a call with consentGranted: false throws BiqliError.consentRequired before networking. To request probabilistic matching, both the Mobile App and SDK must enable it, attributionDomain must name the attached verified hostname, and consent must be granted. The wire request uses probabilisticAllowed; probabilisticConsent is not a supported field. An ambiguous candidate returns none.

Diagnostics

The bounded diagnostic enum contains:
The callback never receives raw URLs, opaque tokens, mobile keys, or resolver payloads.

Errors

Follow Test and troubleshoot mobile links for simulator, device, and TestFlight coverage.