Skip to content

Conversation

@benjipott
Copy link

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

related #646

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

related AppsFlyerSDK#646
Copilot AI review requested due to automatic review settings October 20, 2025 09:12
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Updates the import path for the AppsFlyer React Native Swift header to resolve a build error where the header could not be found.

  • Change the import from react_native_appsflyer-Swift.h to the modular path react_native_appsflyer/react_native_appsflyer-Swift.h.
  • Keep existing conditional include for PurchaseConnector.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 8 to +10
#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>
Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid build breakages across different CocoaPods configurations (e.g., static libraries vs. frameworks, modular headers off/on) and older plugin versions, guard the AppsFlyer Swift header with __has_include and provide a fallback to the previous include path. Example:
#if __has_include(<react_native_appsflyer/react_native_appsflyer-Swift.h>)
#import <react_native_appsflyer/react_native_appsflyer-Swift.h>
#elif __has_include(<react_native_appsflyer-Swift.h>)
#import <react_native_appsflyer-Swift.h>
#else
#warning "react_native_appsflyer Swift header not found"
#endif

Copilot uses AI. Check for mistakes.
@Calvin-Huang
Copy link

Thanks a lot, your fork really helped!
I’m just confused how such a small issue sit there for months.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants