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.
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 prebuildfinishes with exit code 0, but printsAutomatic 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 prebuildThis 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:Expected: the plugin adds the attribution handlers for Expo's default template.
Actual warning:
Cause
expo/expo#46734 moved the default template to the UIScene lifecycle and removed the URL/user-activity override stubs from AppDelegate.
modifySwiftAppDelegateonly inserts the AppsFlyer calls when those exact stubs already exist.SDK 58's
SceneEventForwarderstill forwards these events to AppDelegate overrides. Supporting the new template could involve adding the overrides with calls tosuper, 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
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.