Skip to content

fix(expo): add attribution handlers to scene-based AppDelegate - #707

Open
1kuko3 wants to merge 1 commit into
AppsFlyerSDK:masterfrom
1kuko3:codex/fix-expo-scene-attribution
Open

1kuko3 wants to merge 1 commit into
AppsFlyerSDK:masterfrom
1kuko3:codex/fix-expo-scene-attribution

Conversation

@1kuko3

@1kuko3 1kuko3 commented Sep 23, 2026

Copy link
Copy Markdown

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 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.

Standalone reproduction: https://github.com/1kuko3/appsflyer-expo-58-prebuild-repro

This branch has not been deployed

No deployments
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.

[Expo SDK 58 beta] Plugin misses attribution handlers in the scene-based AppDelegate template

1 participant