WarpLink
SDKsiOS

API Reference

The complete Swift API reference for the WarpLink iOS SDK: initialization, deep link handling, and attribution methods.

The main entry point. All methods are static.

Properties

PropertyTypeDescription
sdkVersionStringThe current SDK version ("1.1.0").
isConfiguredBoolWhether configure() has been called. Thread-safe.

configure(apiKey:options:)

Initialize the SDK. Must be called before any other SDK methods.

ParameterTypeDescription
apiKeyStringYour WarpLink SDK key (wl_live_ + 32 alphanumeric chars). Create it in the dashboard under API Keys > SDK key. An API key is rejected by install attribution.
optionsWarpLinkOptions?Optional configuration overrides, including the onLink callback and opt-out flags.

Validates the key format locally, then performs async server-side validation via /sdk/validate. The validation result is cached for 24 hours.

When options.onLink is set, configure() also wires up cold start, warm start, and the deferred deep link check. The single callback receives every resolved link (a tap or a deferred install match). Set autoDeepLinkHandling or autoDeferredCheck to false to disable either piece and drive it with the manual methods below.

continue(_:) and open(_:)

Forward an incoming Universal Link to the SDK from your scene or app delegate. The SDK resolves it and dispatches to onLink. Use these when you keep your own delegate instead of the drop-in WarpLinkSceneDelegate / WarpLinkAppDelegate. continue(_:) extracts webpageURL and forwards it to open(_:).

Both return true if the URL was a WarpLink link the SDK will handle: a WarpLink domain and a path of exactly one segment, which is what a slug always is. A custom domain counts as a WarpLink domain once you declare it in linkDomains or WarpLinkDomains. They return false (and do nothing) when configure() has not run, when autoDeepLinkHandling is disabled, when the URL is not on a WarpLink domain, or when the path is not a single segment. By default your app is associated with every path on the domain, so pass every URL here and route the ones that return false with your own router.

Resolve an incoming Universal Link URL to a deep link.

ParameterTypeDescription
urlURLThe Universal Link URL received by the app.
completion(Result<WarpLinkDeepLink, WarpLinkError>) -> VoidCalled on the main thread.

Errors: .notConfigured, .invalidURL, .linkNotFound, .networkError, .serverError, .invalidApiKey, .decodingError

checkDeferredDeepLink(completion:)

Check for a deferred deep link on first launch. Returns nil if no match found. Called automatically by configure() unless autoDeferredCheck is false.

ParameterTypeDescription
completion(Result<WarpLinkDeepLink?, WarpLinkError>) -> VoidCalled on the main thread.

On first launch, collects device signals (preferred language, timezone offset, IDFV) and sends them to the attribution API. The server derives the IP and computes the fingerprint. On subsequent launches, returns the cached result.

"First launch" means the first launch of the current install. A reinstall is a new install and runs the check again, with is_reinstall set on the request. See App Reinstall.

Errors: .notConfigured, .networkError, .serverError, .invalidApiKey, .decodingError


WarpLinkOptions

PropertyTypeDefaultDescription
apiEndpointString"https://api.warplink.app/v1"API endpoint URL.
debugLoggingBoolfalseEnable [WarpLink] console logging.
autoDeepLinkHandlingBooltrueAutomatically resolve forwarded Universal Links and dispatch to onLink.
autoDeferredCheckBooltrueAutomatically run the deferred deep link check on first launch.
linkDomains[String][]Extra hosts the SDK should treat as yours, for links served from a custom domain.
onLink((Result<WarpLinkDeepLink?, WarpLinkError>) -> Void)?nilSingle callback for cold start, warm start, and deferred results. Disambiguate with isDeferred.

The match window is server-side (set per link in the dashboard), so there is no matchWindowHours option.

linkDomains and the WarpLinkDomains plist key

linkDomains is additive, never a replacement. The SDK recognizes the union of aplnk.to, linkDomains, the WarpLinkDomains string array in Info.plist, and the domains returned by /sdk/validate. The first three are known synchronously at configure(), so open(_:) claims a custom-domain link on the first launch instead of waiting for the server.

Entries are normalized: trimmed, lowercased, and reduced to a host if a full URL is given. A port is dropped, because the host of an incoming URL never carries one. Empty entries are dropped. A www. prefix is preserved, since it is a different host.

WarpLinkDomains is an array of strings. A single comma separated string is accepted too, because that is the row type Xcode's plist editor creates by default.


PropertyTypeDescription
linkIdStringUnique link identifier.
destinationStringResolved destination URL.
deepLinkUrlString?iOS-specific deep link URL (e.g., myapp://path).
customParams[String: JSONValue]Custom parameters on the link. Read values with the typed accessors (.stringValue, .intValue, .doubleValue, .boolValue).
isDeferredBoolWhether resolved via deferred attribution.
matchTypeMatchType?.deterministic or .probabilistic.
matchConfidenceDouble?Confidence score (0.0–1.0). Useful for reporting, not for a trust decision.
matchGuaranteedBoolTrue only for a deterministic match. Gate anything sensitive (auto sign-in, showing personal data) on this rather than on a confidence threshold.

Access custom params with the typed accessors:


MatchType

CaseDescription
.deterministicMatched via IDFV. Confidence is always 1.0.
.probabilisticMatched via enriched fingerprint. Confidence varies.

WarpLinkError

CaseDescription
.notConfiguredSDK used before configure().
.invalidApiKeyFormatKey format invalid (wl_live_ + 32 chars).
.invalidApiKeyKey rejected by server.
.networkError(Error)Network request failed.
.serverError(statusCode: Int, message: String)API error response.
.invalidURLNot a recognized WarpLink domain.
.linkNotFoundLink not found or inactive.
.decodingError(Error)Response parsing failed.

Thread Safety

  • isConfigured is thread-safe (protected by NSLock)
  • All completion handlers are dispatched to the main thread
  • configure() can be called from any thread but should be called once during initialization

On this page