You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(expo): add attribution handlers to scene-based AppDelegate - #707
Expo SDK 58's scene-based AppDelegate template no longer declares the URL and user-activity overrides that the plugin searches for. Prebuild finishes with a warning and leaves out the AppsFlyer calls.
When those methods are absent from an AppDelegate: ExpoAppDelegate, the plugin now inserts them. Each calls the existing AppsFlyer attribution facade and forwards to super so Expo's subscribers still receive the event. Expo's SceneEventForwarder handles React Native link delivery for this template.
Existing handlers keep their bodies. The plugin does not add a duplicate when it finds a handler with custom formatting it cannot instrument; that case retains the manual-integration warning. Objective-C handling is unchanged.
The report used AppsFlyer 6.18.0. This PR targets current master (7.0.2) and uses its attribution facade; it is not a v6 backport.
Validation
Added 10 config-plugin regression tests using Expo SDK 54, 57, and 58 AppDelegate fixtures. Three fail on the original implementation; all pass with this change.
SDK 54/57 output retains the original template byte-for-byte after removing the existing attribution insertions and import. Tests also cover custom method bodies, a missing individual handler, and repeat application.
Full Jest suite: 308 tests pass. npm run lint passes.
Installed the packed candidate into an Expo 58.0.0-preview.4 / RN 0.88.0-rc.1 app. Prebuild and the arm64 iOS simulator Debug build pass with Xcode 27. Repeating prebuild leaves AppDelegate unchanged.
I have not tested cold/warm attribution delivery against an AppsFlyer account. The native build check uses SDK 58; older SDK compatibility is checked through the generated-source regression tests.
We’re blocked on this for our Expo SDK 58 upgrade, and we’ve verified on the stable release that two separate fixes are needed:
iOS: this PR. On the SDK 58 template the plugin injects nothing into AppDelegate.swift (6.18.0), or only the import and handleLaunchOptions (7.0.2-v2), so OneLink / universal-link opens never reach AppsFlyerAttribution.
Android: fix(android): enable BuildConfig generation #708. SDK 58 ships AGP 9.2.1, where BuildConfig is off by default, so :react-native-appsflyer fails to configure (defaultConfig contains custom BuildConfig fields, but the feature is disabled).
We are also blocked because of unsupported Expo 58 release. Can we please get this checked?
This branch has not been deployed
No deployments
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
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.
What changed
Fixes #706.
Expo SDK 58's scene-based AppDelegate template no longer declares the URL and user-activity overrides that the plugin searches for. Prebuild finishes with a warning and leaves out the AppsFlyer calls.
When those methods are absent from an
AppDelegate: ExpoAppDelegate, the plugin now inserts them. Each calls the existing AppsFlyer attribution facade and forwards tosuperso Expo's subscribers still receive the event. Expo'sSceneEventForwarderhandles React Native link delivery for this template.Existing handlers keep their bodies. The plugin does not add a duplicate when it finds a handler with custom formatting it cannot instrument; that case retains the manual-integration warning. Objective-C handling is unchanged.
The report used AppsFlyer 6.18.0. This PR targets current master (7.0.2) and uses its attribution facade; it is not a v6 backport.
Validation
npm run lintpasses.I have not tested cold/warm attribution delivery against an AppsFlyer account. The native build check uses SDK 58; older SDK compatibility is checked through the generated-source regression tests.
Standalone reproduction: https://github.com/1kuko3/appsflyer-expo-58-prebuild-repro