Skip to content

0.1.0

Latest

Choose a tag to compare

@ahsanalidotme ahsanalidotme released this 26 Oct 20:27
· 5 commits to main since this release
2b700aa

Highlights

  • Deep links are only claimed when they're yours. handleDeepLink now handles only https LinkTrail links (on linktrail.io or a domain you list in linkDomains) and returns false for everything else, so OAuth callbacks, mailto: and your own myapp:// URLs go back to your routing. Host-confusion and look-alike URLs are rejected.
  • Deferred links aren't lost when onLink is 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, whatever requireConsent says.
  • 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.configure is safe to call more than once. The same key and options return the existing instance; different ones replace it cleanly.
  • .automatic asks for "Allow Paste" once. The clipboard is read at most once per install, not on every launch.
  • New LinkTrail.version constant, and every request sends an X-LinkTrail-SDK: ios/<version> header.

Breaking changes

  1. List your custom link domains. If your links use your own domain, add it, otherwise handleDeepLink ignores them:
    try LinkTrail.configure(apiKey: "lt_live_…",
                            options: LinkTrailOptions(linkDomains: ["go.acme.com"]))
    Links on *.linktrail.io need no change. Non-LinkTrail URLs now return false (the async API throws notALinkTrailURL).
  2. LinkTrailPasteButton respects an earlier denial. grantsConsent is now Bool?, default nil: the tap grants consent only if the user hasn't decided yet. Pass true for the old behaviour, or false if a CMP handles consent.
  3. configure returns a singleton. Calling it again with a different key or options shuts down the previous instance. Register onLink, onAttribution and onError on the instance it returns.
  4. setConsent(false) applies with requireConsent: false too. A denial sends one uncounted install with no device id and drops custom events.
  5. Options are clamped at configure. LinkTrailRetryPolicy stores the values you give it; out-of-range values are fixed at configure with a warning, never thrown.
  6. LinkTrailRetryPolicy.disabled.baseDelay is 0.5 (was 0). No behaviour change; it only matters if your code reads the value.
  7. Log format. Warnings print as WARNING (was WARN), a few lines changed level, and logged URLs no longer include the query or fragment.
  8. Consent isn't restored from a backup. A user who restores the app or moves to a new phone is asked again.
  9. Stricter clipboard token. The clipboard is used (and cleared) only when it holds exactly lt_click=<token>.
  10. Rejected events aren't retried. Events the backend rejects (400, 401, 403, 404, 409, 422) go to onError and 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 .automatic click token survives a failed install and is sent on the retry.
  • Links whose customData or utm contain 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-After header 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 onLink registrations 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