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 ("0.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 API key (wl_live_ or wl_test_ + 32 alphanumeric chars).
optionsWarpLinkOptions?Optional configuration overrides.

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

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.

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

On first launch, collects device signals and sends them to the attribution API. On subsequent launches, returns the cached result.

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


WarpLinkOptions

PropertyTypeDefaultDescription
apiEndpointString"https://api.warplink.app/v1"API endpoint URL.
debugLoggingBoolfalseEnable [WarpLink] console logging.
matchWindowHoursInt72Match window for deferred attribution (hours).

PropertyTypeDescription
linkIdStringUnique link identifier.
destinationStringResolved destination URL.
deepLinkUrlString?iOS-specific deep link URL (e.g., myapp://path).
customParams[String: Any]Custom parameters on the link.
isDeferredBoolWhether resolved via deferred attribution.
matchTypeMatchType?.deterministic or .probabilistic.
matchConfidenceDouble?Confidence score (0.0–1.0).

Access custom params with safe casting:


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_/wl_test_ + 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