Skip to content

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

Description

@1kuko3

Report

The Expo plugin in react-native-appsflyer 6.18.0 fails to add the URL and user-activity attribution handlers to Expo SDK 58's default Swift AppDelegate.

expo prebuild finishes with exit code 0, but prints Automatic Swift AppDelegate modification failed. The generated file is missing both AppsFlyer calls.

Reproduction

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

git clone https://github.com/1kuko3/appsflyer-expo-58-prebuild-repro.git
cd appsflyer-expo-58-prebuild-repro
npm ci
npm run prebuild

This runs expo prebuild --platform ios --no-install. The config contains only the AppsFlyer plugin, with no credentials or other config plugins.

Inspect ios/AppsflyerRepro/AppDelegate.swift. Neither of these calls is present:

AppsFlyerAttribution.shared().handleOpen(url, options: options)
AppsFlyerAttribution.shared().continue(userActivity, restorationHandler: nil)

Expected: the plugin adds the attribution handlers for Expo's default template.

Actual warning:

Automatic Swift AppDelegate modification failed.
Please add AppsFlyer integration manually:

1. Add this to your openURL method:
  AppsFlyerAttribution.shared().handleOpen(url, options: options)

2. Add this to your continueUserActivity method:
  AppsFlyerAttribution.shared().continue(userActivity, restorationHandler: nil)

Supported format: Expo SDK default template

Cause

expo/expo#46734 moved the default template to the UIScene lifecycle and removed the URL/user-activity override stubs from AppDelegate. modifySwiftAppDelegate only inserts the AppsFlyer calls when those exact stubs already exist.

SDK 58's SceneEventForwarder still forwards these events to AppDelegate overrides. Supporting the new template could involve adding the overrides with calls to super, or using Expo's subscriber integration.

The current upstream plugin, including the v7 migration, still matches the old method stubs. I inspected that source; the executable reproduction targets 6.18.0. I found #620 and #638 about initial Swift AppDelegate support, which was added in #624. This failure happens after that support, with the newer scene-based template.

Versions and scope

  • react-native-appsflyer: 6.18.0
  • Expo: 58.0.0-preview.4
  • React Native: 0.88.0-rc.1
  • React: 19.3.0
  • Node: 22.22.0; npm: 10.9.4
  • Host: macOS 26.6.2 arm64
  • Platform: iOS prebuild

The reproduction verifies generated integration only. It does not run CocoaPods, compile an iOS app, or test cold/warm attribution delivery. Full prebuild output is in evidence/prebuild.txt.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions