-
Notifications
You must be signed in to change notification settings - Fork 222
Description
Bug Report: Unsupported Swift Architecture Error in [email protected]
Summary
Version 6.17.7 of react-native-appsflyer introduces a regression that causes iOS Release builds to fail with the error: unsupported Swift architecture.
Environment
- Package:
react-native-appsflyer - Broken Version: 6.17.7 (published October 22, 2025)
- Working Versions: 6.17.2, 6.17.5
- Platform: iOS
- Build Configuration: Release mode
- Framework: Expo SDK 54
- React Native: 0.81.5
- Xcode: 26.1 (Build version 17B55)
- macOS: Darwin 25.0.0
Steps to Reproduce
- Create an Expo project with Swift AppDelegate (default in Expo SDK 53+)
- Install
[email protected] - Run
expo prebuild --clean --platform ios - Run
expo run:ios --configuration Release
Expected Behavior
The iOS app should build successfully in Release mode, as it does with versions 6.17.2 and 6.17.5.
Actual Behavior
Build fails with the following error:
❌ (../../node_modules/react-native-appsflyer/ios/AppsFlyerLib-Swift.h:330:2)
328 |
329 | #else
> 330 | #error unsupported Swift architecture
| ^ unsupported Swift architecture
331 | #endif
332 |
Analysis
The AppsFlyerLib-Swift.h file only supports the __arm64__ architecture (line 2 of the header file):
#if 0
#elif defined(__arm64__) && __arm64__
// Generated by Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
...
#else
#error unsupported Swift architecture
#endifWhen building in Release mode, the build process appears to be including architectures that AppsFlyer doesn't support, triggering the error.
Version Testing Results
- ✅ 6.17.2 (July 30, 2025) - Works correctly
- ✅ 6.17.5 (September 3, 2025) - Works correctly
- ❌ 6.17.7 (October 22, 2025) - Fails with architecture error
Workaround
Downgrade to version 6.17.5:
npm install [email protected]
# or
bun add [email protected]Then run:
expo prebuild --clean --platform iosAdditional Context
- This issue is related to PR feat: add Swift AppDelegate support for expo #624 which added Swift AppDelegate support
- Version 6.17.7 is not documented in the CHANGELOG.md file
- The issue only affects Release builds; Debug builds may work
- This regression blocks developers from using the latest version with Expo SDK 53+ which uses Swift AppDelegate by default
Suggested Fix
Investigate changes made between 6.17.5 and 6.17.7 that might have affected the iOS Swift header generation or architecture support. The issue appears to be specific to how the AppsFlyer SDK's Swift interface is being compiled for different architectures.