appsflyer-react-native-plugin icon indicating copy to clipboard operation
appsflyer-react-native-plugin copied to clipboard

Pods/react-native-appsflyer: 'react_native_appsflyer-Swift.h' file not found

Open susslik opened this issue 8 months ago • 27 comments

Plugin Version

6.17.2

App ID

Happens on differrent apps

Email

[email protected]

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

susslik avatar Aug 14 '25 08:08 susslik

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

github-actions[bot] avatar Aug 14 '25 08:08 github-actions[bot]

I'm getting the same error when trying to do an expo build using latest version of this package 6.17.2

dsharer avatar Aug 19 '25 17:08 dsharer

+1

singhagam1 avatar Aug 23 '25 10:08 singhagam1

+1

sincerely-manny avatar Aug 25 '25 09:08 sincerely-manny

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 avatar Aug 25 '25 09:08 singhagam1

@singhagam1 I thought that 6.17.1 doesn't support AppDelegate.swift (I mean expo plugin)

sincerely-manny avatar Aug 25 '25 12:08 sincerely-manny

Mine is working good in android and iOS, I am able to log events.

singhagam1 avatar Aug 25 '25 12:08 singhagam1

I'll try, thank you!

sincerely-manny avatar Aug 25 '25 12:08 sincerely-manny

same issue with 6.17.1 and 6.17.2

Keshav-1973 avatar Aug 26 '25 18:08 Keshav-1973

+1 -- can we get an Appsflyer human to reply to this, I dont think going through support is the right answer.

joshmohrer avatar Aug 27 '25 13:08 joshmohrer

+1

cheraff avatar Sep 03 '25 22:09 cheraff

+1

hextiandro avatar Sep 09 '25 14:09 hextiandro

+1

teotorstensson avatar Sep 15 '25 13:09 teotorstensson

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

hextiandro avatar Sep 15 '25 13:09 hextiandro

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!

sincerely-manny avatar Sep 15 '25 15:09 sincerely-manny

same in v6.17.5, patch fixed it.

alzalabany avatar Sep 20 '25 22:09 alzalabany

same here - so odd that this issue persists. would love an official response from the AppsFlyer team!

AlexRuber avatar Oct 01 '25 01:10 AlexRuber

Worked with the patch also @hextiandro many thanks!!!

inakie avatar Oct 14 '25 20:10 inakie

same

bodrius avatar Oct 16 '25 11:10 bodrius

same issue with 6.17.7 🥀

using expo 0.54 and react-native 0.81

jefshe avatar Oct 23 '25 07:10 jefshe

Unfortunately the patch doesn't work for me.

hasanaktas avatar Oct 27 '25 02:10 hasanaktas

Any update on this?

uguraktas avatar Oct 27 '25 05:10 uguraktas

This just started happening to me after I added shouldUsePurchaseConnector: true to the plugin configuration. It was working fine before that.

tbonebrad avatar Oct 29 '25 13:10 tbonebrad

This just started happening to me after I added shouldUsePurchaseConnector: true to the plugin configuration. It was working fine before that.

also for me.

shojol-webappick avatar Nov 13 '25 08:11 shojol-webappick

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:

  1. Clear DerivedData and rebuild an app - which is not seems to work for me;
  2. Manually create and setup Bridging-Header.h after expo 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...

susslik avatar Dec 09 '25 10:12 susslik

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 avatar Dec 09 '25 13:12 susslik

@susslik Appreciate the update.

arapocket avatar Dec 09 '25 23:12 arapocket

Any update here, getting same issue.

Chasty avatar Dec 23 '25 01:12 Chasty

I finally solved the problem by moving to Adjust. Good luck everyone :(

joshmohrer avatar Dec 23 '25 01:12 joshmohrer

fixed in v6.17.8

al-af avatar Dec 29 '25 13:12 al-af