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:1.0.0, then add the Biqli product to the application target.
For a manifest:
.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 Universal Link entitlement
Add the Associated Domains capability to the app target and include:SwiftUI lifecycle integration
Universal Links arrive as browsing-web user activities, not as custom URL schemes:resolveAttribution(deepLink: url).
UIKit lifecycle integration
ForwarduserActivity.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: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: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:
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 HTTP5xx. - Later-launch recovery: pending request, event ID, and idempotency key remain protected in Keychain.
resolveAttribution() on a later cold launch.
Consent and probabilistic matching
WhenconsentRequired 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:Errors
Follow Test and troubleshoot mobile links for simulator, device, and TestFlight coverage.

