Support react-native-appsflyer 7.x (plugin calls APIs removed in 7.0.0)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 68/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- react-native, typescript
- Domain
- mobile
Research direction
Start with src/AppsflyerPlugin.tsx and the call sites in methods/track.ts and methods/identify.ts, then inspect the peer-dependency declaration. Migrate the listed 7.x APIs while preserving listener ordering and emitting Deep Link Opened once; update version support and document the removed ATT timing option.
Written by the indexing model from the issue text.
Description
Summary
We are trying to add AppsFlyer's Advanced-Matching Data Sharing by upgrading to the SDK v7. @segment/analytics-react-native-plugin-appsflyer does not support react-native-appsflyer 7.x.
Version 7.0.0 replaced the native bridge with a TurboModule RPC layer. It removed initSdk and the
three onX listener closures. The plugin calls all four. Its peer dependency also pins ^6.9.4,
which excludes 7.x.
The latest published plugin (0.9.0, 2026-03-03) still calls the removed API:
src/AppsflyerPlugin.tsx |
Call |
|---|---|
:94 |
appsFlyer.initSdk(...) |
:122 |
appsFlyer.onInstallConversionData(...) |
:174 |
appsFlyer.onAppOpenAttribution(...) |
:197 |
appsFlyer.onDeepLink(...) |
This blocks the upgrade completely. The plugin is the only caller of initSdk in a Segment-managed
setup, and it reads appsFlyerDevKey from the Segment destination settings. An app that upgrades to
7.x therefore never initializes AppsFlyer at all.
Proposed Solution
Migrate the nine call sites and bump the peer dependency to support both major versions, or ship a
new major that targets 7.x.
Call site replacements
| File | 6.x | 7.0.x |
|---|---|---|
AppsflyerPlugin.tsx:94 |
initSdk({devKey, appId, ...}) |
init({devKey, appId}), then start() inside registerSessionReadyListener |
AppsflyerPlugin.tsx:122 |
onInstallConversionData(cb) |
registerConversionListener({onConversionDataSuccess, onConversionDataFail}) |
AppsflyerPlugin.tsx:174 |
onAppOpenAttribution(cb) |
folds into registerDeepLinkListener |
AppsflyerPlugin.tsx:197 |
onDeepLink(cb) |
registerDeepLinkListener({onDeepLinking}) |
methods/track.ts:25,31 |
logEvent(name, values) |
logEvent({eventName, eventValues}) |
methods/identify.ts:10 |
setCustomerUserId(uid) |
setCustomerUserId({customerId}) |
methods/identify.ts:36 |
setCurrencyCode(code) |
setCurrencyCode({currencyCode}) |
methods/identify.ts:40 |
setAdditionalData(data) |
setAdditionalData({customData}) |
Three ordering rules 7.x requires
- Call
registerDeepLinkListenerbeforeinit(). Android drops a deep-link result that arrives
before a listener attaches, permanently. - Register every other listener synchronously after
init(), not insideinit().then(...). - Call
start()only inside theregisterSessionReadyListenercallback. Native never auto-starts.
Two behavior changes to handle
onAppOpenAttributionandonDeepLinkboth emitDeep Link Openedtoday. They merge into one
registerDeepLinkListenerin 7.x, so a direct port double-fires that event. Emit it once.timeToWaitForATTUserAuthorization(AppsflyerPlugin.tsx:56, default 60) has no replacement.
Dropping it silently shortens the iOS ATT window and degrades attribution. Please document the
change, and consider exposing a hook so apps can request ATT beforeinit().
The deep-link payload shape also changed. 7.x normalizes it to {status, error?, deepLink?}, so
callbacks reading data.data need to read data.deepLink.
- Dominant language
- TypeScript
- Stars
- 383
- Forks
- 206
- Avg merge
- 14h 45m
- Merged PRs (30d)
- 11
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from segmentio/analytics-react-native
-
bug investigate
Difficulty 1/5 Under an hour Newbie friendliness 72/100
segmentio/analytics-react-native#1145 ·
-
bug investigate
Difficulty 3/5 1-2 days Newbie friendliness 78/100
segmentio/analytics-react-native#1309 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
segmentio/analytics-react-native#1124 · 3 comments ·
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 48/100
segmentio/analytics-react-native#1114 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
segmentio/analytics-react-native#1109 ·
All issues in segmentio/analytics-react-native
Similar issues
-
comp/dashboard P3 type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
NousResearch/hermes-agent#117722 ·
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·