ios-appstack-sdk Swift package, newest first. Always integrate against the latest
stable release — appstack-cli review will tell you what you
are on.
Swift integration guide
Install, configure, and send your first events.
Added
- Custom event parameters are encrypted on the device before being sent, so personal data such as an
email or phone number leaves the app already protected. Parameter names that need to stay readable
— for example
currency,revenueand campaign fields — are excluded, and that list is controlled server-side, so no code change is required in your app. Requires iOS 17 or later; on iOS 15 and 16 the values are encrypted server-side as before. Purchasetransaction_detailsand deeplink user data are unaffected, so revenue reporting is unchanged. A value that cannot be encrypted is omitted from the event, and the rest of the event still sends.
- A
nullin the attribution match response no longer discards the whole response. Previously one null query parameter could cost an install its attribution data. - Event parameters holding
nullno longer cause the event to be silently dropped. Null values are now omitted from the payload (nulls inside arrays are kept), matching the Android SDK. This covered a nil SwiftOptionalpassed as a parameter, any dictionary decoded from JSON that carries a null field, Dartnullfrom Flutter, and nested nulls from React Native. sendEvent(event:name:parameters:)no longer crashes the app when a parameter holds a value JSON cannot represent — aDate,URL,Data,Set, custom object, or aNaN/infinite number. Such keys are now dropped individually and named in an error log; the event still sends with its remaining parameters. Send strings, finite numbers, booleans, arrays, and nested string-keyed dictionaries.
Added
- Events now carry an internal diagnostic recording whether Apple Ads attribution was enabled and whether the AdServices token fetch is pending, succeeded, or failed. The SDK sends an automatic diagnostic event when the token resolution completes, so no later app event is required.
Added
- Added an Apple privacy manifest declaring the SDK’s required-reason API usage.
Added
setCustomerUserId(_:)sets the customer user id afterconfigure(), for when the id is only known once the user logs in. It applies to every event sent from that point on, including events already buffered but not yet delivered.getAttributionParams()now always carries anappstack_match_statuskey telling you whether the attribution request succeeded:matched,matched_no_params,organic,skipped,failedornot_configured. Onlyfailedis worth re-reading later; the rest are settled answers.- Attribution match outcomes are now visible on the
.debuglog channel.
getAttributionParams()no longer returnsnil— where the result was previouslynilor empty, it now carries the status key explaining why. Existing call sites keep compiling, but code using an empty result to mean “not attributed” should switch to the status key.
deleteUserData()now also clears the stored customer user id.- A blank customer user id is treated as absent instead of being sent as an empty string.
- A
setCustomerUserId(...)call made immediately afterconfigure()is no longer overwritten by the value passed toconfigure().
Added
- Attribution matching now includes additional network context to improve match diagnostics.
sendEvent(event:)now ignoresINSTALL, which the SDK already tracks automatically. Sending it by hand previously double-counted installs; such calls are now logged and discarded.
Added
- Added Mac Catalyst support to the prebuilt XCFramework.
- Improved install detection and attribution reliability.
- Improved Swift Package Manager resolution: installations now download the prebuilt XCFramework directly from the GitHub release asset instead of cloning the complete source repository.
- Deprecated
isDebugandendpointBaseUrl; both arguments are now ignored and will be removed in a future version. Integrations should migrate toconfigure(apiKey:logLevel:customerUserId:).
- Improved SDK behavior during initialization and temporary connectivity failures.
- Removed the test-only
AppstackAttributionSdk.setInstallDateForTesting(_:)API.