Skip to content

Commit 5b0eb51

Browse files
committed
Enhance Swift header import with fallback for CocoaPods compatibility
1 parent 47b88a1 commit 5b0eb51

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

ios/PCAppsFlyer.m

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,15 @@
77

88
#if __has_include(<PurchaseConnector/PurchaseConnector.h>)
99
#import <PurchaseConnector/PurchaseConnector.h>
10+
// Try modular import path first (for newer CocoaPods configurations)
11+
#if __has_include(<react_native_appsflyer/react_native_appsflyer-Swift.h>)
12+
#import <react_native_appsflyer/react_native_appsflyer-Swift.h>
13+
#elif __has_include(<react_native_appsflyer-Swift.h>)
14+
// Fallback to legacy import path (for older CocoaPods configurations)
1015
#import <react_native_appsflyer-Swift.h>
16+
#else
17+
#warning "react_native_appsflyer Swift header not found"
18+
#endif
1119

1220
@implementation PCAppsFlyer
1321
@synthesize bridge = _bridge;

0 commit comments

Comments
 (0)