Repository navigation
Wrapper parity 0.1.1: link buffering, camelCase errors, version - #23
Merged
Merged
Conversation
…olve true Android has no App Tracking Transparency, so the platform never restricts tracking. Resolve true (matching Flutter) and document it. Adds tests for the JS/TS layer with a mocked native module and an npm test script.
…ersion Merges #12 (Jest suite, Android requestTrackingAuthorization -> true). - Register native onLink only when the first JS listener subscribes; buffer re-engagement links (max 10) and replay the last attribution to the first listener. - camelCase error codes with native message, statusCode/body, legacyCode. - LinkTrail.version and LinkTrail.nativeSdkVersion. - Bump to 0.1.1.
Contributor
Author
|
Impact
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the wrapper parity 0.1.1 contract (linktrail-io/workspace
contracts/wrapper-parity-0.1.1.md).Includes #12. This branch merges
chore/sdk-hardening-114(Jest suite + AndroidrequestTrackingAuthorization→true), so #12 can be closed in favour of this PR, or merged first (this PR then shrinks to its own changes).Changes
onLinkis registered only when the first JSonLinklistener subscribes (newstartLinkDelivery()in the spec, iOS + Android), so the native SDK keeps a saved deferred link (persisted across launches) until JS actually receives it. Re-engagement links resolved byautoHandleLinksbefore then are buffered in JS (max 10, oldest dropped) and delivered once, in order, to the first listener.onAttributionkeeps the last value and replays it to the first listener. Later listeners get no replays.missingApiKey,notConfigured,notALinkTrailUrl, …). Promises reject with aLinkTrailError(native message unchanged,statusCode/bodyforserver,legacyCode= old snake_case).onErrorcarries the same fields. The JS layer also normalises snake_case input. CHANGELOG Changed has the mapping table.LinkTrail.version(package version, test keeps it equal to package.json) andLinkTrail.nativeSdkVersion(nativeLinkTrail.version/LinkTrail.VERSION).~> 0.1.0, Androidio.linktrail:sdk:0.1.0; RN has no SPM manifest). No change.setSDKIdentifier(needs iOS 0.1.1).Validation (local)
npm run lint(0 errors, 3 existing deep-import warnings),npm run typecheck,npm run prepare, codegen scriptnpx jest: 48 tests (22 new in__tests__/parity.test.ts)tsc, AndroidassembleDebug, iOS simulator build (Xcode 27 locally neededIPHONEOS_DEPLOYMENT_TARGET=15.1for an existing AsyncStorage pod target; CI uses macos-15)Closes #22