Pods/react-native-appsflyer: 'react_native_appsflyer-Swift.h' file not found
Plugin Version
6.17.2
App ID
Happens on differrent apps
Platform(s)
iOS
What did you do?
Run yarn i
Run expo prebuild --platform ios --clean
Run expo run:ios
What did you expect to happen?
The iOS app should be launched
What happened instead?
Got the error: ❌ Pods/react-native-appsflyer: 'react_native_appsflyer-Swift.h' file not found └─path_to_project/node_modules/react-native-appsflyer/ios/PCAppsFlyer.m:10:9
Any other relevant information
The issue started after upgrading the plugin version from 6.16.2 to 6.17.2
Happens ONLY if shouldUsePurchaseConnector is set to true
👋 Hi @susslik and Thank you for opening this issue. Please contact AppsFlyer support through the Customer Assistant Chatbot for assistance with troubleshooting issues or product guidance. To do so, please follow this article.
I'm getting the same error when trying to do an expo build using latest version of this package 6.17.2
+1
+1
Just an update, I was able to overcome this by using this version "react-native-appsflyer": "6.17.1", My expo is "expo": "53.0.20",
@singhagam1 I thought that 6.17.1 doesn't support AppDelegate.swift (I mean expo plugin)
Mine is working good in android and iOS, I am able to log events.
I'll try, thank you!
same issue with 6.17.1 and 6.17.2
+1 -- can we get an Appsflyer human to reply to this, I dont think going through support is the right answer.
+1
+1
+1
Here’s what worked for me to solve this problem:
Install patch-package:
npm install patch-package postinstall-postinstall --save-dev
Add the script in your package.json:
"scripts": {
...
"postinstall": "patch-package"
}
Open node_modules/react-native-appsflyer/ios/PCAppsFlyer.m and update the import:
-#import <react_native_appsflyer-Swift.h>
+#import <react_native_appsflyer/react_native_appsflyer-Swift.h>
Save the file and generate the patch:
npx patch-package react-native-appsflyer
This will create a patch file inside the patches/ folder, for example:
patches/react-native-appsflyer+<version>.patch
Now the fix will be automatically applied after every install or build. ✅
diff --git a/ios/PCAppsFlyer.m b/ios/PCAppsFlyer.m
index 389726bf92906f71458ecda24d7d5189b127cda4..3c3769e8fed39a3da6876f76f931492b58dae719 100644
--- a/ios/PCAppsFlyer.m
+++ b/ios/PCAppsFlyer.m
@@ -7,7 +7,7 @@
#if __has_include(<PurchaseConnector/PurchaseConnector.h>)
#import <PurchaseConnector/PurchaseConnector.h>
-#import <react_native_appsflyer-Swift.h>
+#import <react_native_appsflyer/react_native_appsflyer-Swift.h>
successful build confirmed. @hextiandro thanks a lot!
same in v6.17.5, patch fixed it.
same here - so odd that this issue persists. would love an official response from the AppsFlyer team!
Worked with the patch also @hextiandro many thanks!!!
same
same issue with 6.17.7 🥀
using expo 0.54 and react-native 0.81
Unfortunately the patch doesn't work for me.
Any update on this?
This just started happening to me after I added shouldUsePurchaseConnector: true to the plugin configuration. It was working fine before that.
This just started happening to me after I added shouldUsePurchaseConnector: true to the plugin configuration. It was working fine before that.
also for me.
Hi Everyone, just an update on this:
I'm in discussion with AppsFlyer support via the email for a couple of weeks already, but there is no normal solution yet. The suggestions they gave:
- Clear
DerivedDataand rebuild an app - which is not seems to work for me; - Manually create and setup
Bridging-Header.hafterexpo prebuild- which is more of a workaround than a real solution.
I've asked them for a few times to respond here as well, but they just ignoring it...
Upd 2, the latest response from AppsFlyer support:
We received an update from our internal team. They are aware of the issue and are working to resolve it in the next version of the plugin, which is expected to be released soon.
Fingers crossed :)
@susslik Appreciate the update.
Any update here, getting same issue.
I finally solved the problem by moving to Adjust. Good luck everyone :(
fixed in v6.17.8