Skip to content

Persist install state for SDK 0.3.0 - #2

Merged
KennyYe merged 2 commits into
mainfrom
cursor/persist-install-state-0-3-0-1570
Oct 9, 2026
Merged

KennyYe merged 2 commits into
mainfrom
cursor/persist-install-state-0-3-0-1570

Conversation

@KennyYe

@KennyYe KennyYe commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Prepares @tapapplink/react-native@0.3.0 so install tracking survives cold launches. Does not tag or publish.

Changes

  • Persist installId, tracked flag, attribution id and offer via optional peer @react-native-async-storage/async-storage
  • trackInstall posts /ingestInstall once per install (body includes installId); later launches return stored values
  • setAppUserId / identify hydrate first and send the stored attributionId
  • Opt-in debug configure flag logs request, response and stored state with the API key redacted
  • Bump package.json to 0.3.0 and update the changelog so a future v0.3.0 tag will pass the release workflow check
  • Jest coverage for persistence, cold start skip, identify hydrate and debug redaction
  • README install step requires AsyncStorage (npx expo install for Expo; npm/yarn for bare RN)
  • Missing-AsyncStorage warning states that each cold launch will post a new install; logged once per session

Why AsyncStorage

The existing native module is Android-only. A SharedPreferences-style store there would not help iOS or Expo iOS builds. AsyncStorage is the usual cross-platform store for Expo and bare React Native, so one path covers both platforms. It remains an optional peer at the package level (SDK still loads without it), but docs treat it as required for correct install dedupe.

Out of scope

No tag, no npm publish. Kenny can cut v0.3.0 after merge when ready.

Status

GitHub Actions CI on this branch: both jobs green (JS checks + Android compile).

Open in Web Open in Cursor 

cursoragent and others added 2 commits October 9, 2026 13:31
Store installId, tracked flag, attribution id and offer via optional
AsyncStorage so trackInstall posts once per install, cold launches restore
values, and identify sends the stored attributionId. Add debug logging with
redacted API keys, Jest coverage, changelog and package version bump.

Co-authored-by: Kenny Ye <KennyYe@users.noreply.github.com>
Document Expo and bare RN install commands that include AsyncStorage, and
spell out that without it each cold launch posts a new ingestInstall.

Co-authored-by: Kenny Ye <KennyYe@users.noreply.github.com>
@KennyYe
KennyYe marked this pull request as ready for review October 9, 2026 13:45
@KennyYe
KennyYe merged commit e9c06e7 into main Oct 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants