Changelog
What changed in each release of react-native-lander.
Releases are published on npm. Upgrade with npm install react-native-lander@latest (or npx expo install react-native-lander with Expo), then run pod install and rebuild the app.
0.1.1
- Releases now use npm trusted publishing from the public SDK mirror, with verifiable provenance and no stored npm token. SDK behavior is unchanged.
0.1.0
First release, with the same behavior as lander_flutter 0.3.0.
Lander.initialize: validates the publishable key (pk_test_orpk_live_and at least 24 letters or digits; secret keys refused; the key never appears in errors), creates a random install ID (UUID v4, stored outside backups) and reports every launch withPOST /v1/sdk/initin the background, withisFirstLaunchand, on an Android first launch, the Play Install Referrer. Never rejects on network errors. A failed first launch report is retried in the same session (when the app becomes active, beforeclaimHandoffand before events are sent) and on the next launch;install_id_conflictgets a fresh install ID.Lander.onDeepLinkanduseLanderDeepLink: Universal Links, App Links and custom scheme URLs on cold and warm start, resolved throughPOST /v1/sdk/resolve, plus deferred links from the launch report. Links are buffered until a listener subscribes and replayed in order, the launch link is delivered exactly once (here or throughgetInitialLink), a launch link wins over a deferred one, duplicate URLs within 2 seconds count once, and unknown links (404), disabled links (410) and network failures still deliver the raw URL. Custom scheme URLs carrying a short link inlander_linkare resolved like the link itself.LanderLink: a frozen, serializable plain object withurl,shortUrl,linkId,path,route,params,campaign,channel,isDeferred,confidence,methodandisResolved, and helpersLanderLink.create,LanderLink.unresolvedandLanderLink.fromJsonfor tests.Lander.claimHandoff: returns the link your backend bound to a user withPOST /v1/handoffs, ornull. Retries reuse oneIdempotency-Key.Lander.createLink: short links from inside the app viaPOST /v1/sdk/links, with retries that never create a second link.Lander.trackEvent: persistent offline queue, batches of up to 100, exponential backoff with jitter andRetry-After, deduplication by client generated event ID, flush when the app goes to the background, held until the install is registered. OptionallinkIdfor attribution.LanderError: one error type withcode,message,statusCode,retryAfter(seconds) andisRetryable. Programming mistakes reject withinvalid_argument, calls beforeinitializewithnot_initialized.- Requests time out after 10 seconds, interactive calls wait at most 10 seconds in total between retries, and every write carries an
Idempotency-Keyreused across retries. Requests identify asX-Lander-Sdk: react-native/0.1.0. - Android (Kotlin): a TurboModule (also usable on the old architecture) that delivers the launch intent once, ignores intents replayed from Recents or restored after process death, picks up
onNewIntentand the launch link of a new activity, reads the Play Install Referrer and stores state innoBackupFilesDir. DeclaresINTERNET. - iOS (Swift): links through React Native's
Linking, storage in Application Support excluded from backups, privacy manifest. - Expo config plugin: adds Associated Domains, the App Links intent filter and an optional custom scheme during
expo prebuild. - Example app: Acme Shop.