Skip to main content

SpendOwlConfiguration

Configuration struct for customizing SDK behavior.

Initializer

Parameters

apiKey
String
required
Your SpendOwl API key from the dashboard.
baseURL
URL
default:"https://spendowl.io/api"
The API base URL. Only change for testing or if instructed by support.
timeoutInterval
TimeInterval
default:"10"
Network request timeout in seconds.
maxRetries
Int
default:"3"
Maximum retry attempts for failed requests. Client errors (4xx) are not retried.

Properties

apiKey

Your SpendOwl API key.

baseURL

The base URL for API requests. Default: https://spendowl.io/api

timeoutInterval

Network request timeout in seconds. Default: 10
Increase this value if users experience timeout issues on slow networks.

maxRetries

Maximum retry attempts for transient failures. Default: 3 Retry Behavior:
  • Network errors are retried with exponential backoff
  • Server errors (5xx) are retried
  • Client errors (4xx) are not retried

Usage Examples

Basic Configuration

For most apps, use the simple API key initializer:

Custom Timeout

For apps used on slower networks:

Aggressive Retries

For critical attribution tracking:

Testing Configuration

For integration tests:

Sendable Conformance

SpendOwlConfiguration conforms to Sendable, making it safe to pass across concurrency boundaries:

SpendOwl

Main SDK class

Configuration Guide

Configuration guide