Repository navigation
Highlights
- Deep links are only claimed when they're yours.
handleDeepLinknow handles onlyhttpsLinkTrail links (onlinktrail.ioor a domain you list inlinkDomains) and returnsfalsefor everything else, so OAuth callbacks,mailto:and your ownmyapp://URLs go back to your routing. Host-confusion and look-alike URLs are rejected. - Deferred links aren't lost when
onLinkis registered late. The deferred link is saved and delivered as soon as you register the handler, in the same launch or a later one (it expires after 7 days). - Consent denials are always respected. After
setConsent(false), no event, retry or queued event leaves the device, whateverrequireConsentsays. - SDK state stays on the device. It's no longer copied by iCloud or device backups, so a restored or migrated app counts as a new install. Migration from earlier versions is automatic.
LinkTrail.configureis safe to call more than once. The same key and options return the existing instance; different ones replace it cleanly..automaticasks for "Allow Paste" once. The clipboard is read at most once per install, not on every launch.- New
LinkTrail.versionconstant, and every request sends anX-LinkTrail-SDK: ios/<version>header.
Breaking changes
- List your custom link domains. If your links use your own domain, add it, otherwise
handleDeepLinkignores them:Links ontry LinkTrail.configure(apiKey: "lt_live_…", options: LinkTrailOptions(linkDomains: ["go.acme.com"]))
*.linktrail.ioneed no change. Non-LinkTrail URLs now returnfalse(the async API throwsnotALinkTrailURL). LinkTrailPasteButtonrespects an earlier denial.grantsConsentis nowBool?, defaultnil: the tap grants consent only if the user hasn't decided yet. Passtruefor the old behaviour, orfalseif a CMP handles consent.configurereturns a singleton. Calling it again with a different key or options shuts down the previous instance. RegisteronLink,onAttributionandonErroron the instance it returns.setConsent(false)applies withrequireConsent: falsetoo. A denial sends one uncounted install with no device id and drops custom events.- Options are clamped at
configure.LinkTrailRetryPolicystores the values you give it; out-of-range values are fixed atconfigurewith a warning, never thrown. LinkTrailRetryPolicy.disabled.baseDelayis0.5(was0). No behaviour change; it only matters if your code reads the value.- Log format. Warnings print as
WARNING(wasWARN), a few lines changed level, and logged URLs no longer include the query or fragment. - Consent isn't restored from a backup. A user who restores the app or moves to a new phone is asked again.
- Stricter clipboard token. The clipboard is used (and cleared) only when it holds exactly
lt_click=<token>. - Rejected events aren't retried. Events the backend rejects (400, 401, 403, 404, 409, 422) go to
onErrorand are dropped instead of queued.
Fixes
- A paste after a consent denial no longer loses the click token, and a paste made before the SDK can read its saved state no longer overrides a saved denial.
- Retries stop as soon as consent is withdrawn, and a running flush stops sending queued events.
- Concurrent queue flushes no longer send the same event twice, and one corrupt queued event no longer wipes the queue.
- The
.automaticclick token survives a failed install and is sent on the retry. - Links whose
customDataorutmcontain nested objects or arrays no longer break the install; nested values arrive as JSON strings. - SKAdNetwork conversion values are reported on iOS 15.0–15.3.
- A malformed
Retry-Afterheader no longer causes an immediate retry. - If a re-engagement link can't be resolved without consent, the error now reaches
onError. - Before the device's first unlock, opens, events, consent changes and
onLinkregistrations are kept and applied once the SDK can read its state.
Install
.package(url: "https://github.com/linktrail-io/ios-sdk.git", from: "0.1.0")pod 'LinkTrailSDK', '~> 0.1.0'Full Changelog: 0.0.12...0.1.0