Skip to content

Commit e99796b

Browse files
authored
Merge pull request #496 from Ackuq/ackuq/fix/objective-c-imports
fix: Import when using cocapods frameworks
2 parents 6733263 + f15e413 commit e99796b

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

ios/RTNAirship.mm

+5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
/* Copyright Airship and Contributors */
22

33
#import "RTNAirship.h"
4+
5+
#if __has_include(<react_native_airship/react_native_airship-Swift.h>)
6+
#import <react_native_airship/react_native_airship-Swift.h>
7+
#else
48
#import "react_native_airship-Swift.h"
9+
#endif
510

611
@implementation RTNAirship
712
RCT_EXPORT_MODULE()

ios/RTNAirshipBootloader.m

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
/* Copyright Airship and Contributors */
22

33
#import "RTNAirshipBootloader.h"
4-
#import "react_nativE_airship-Swift.h"
4+
5+
#if __has_include(<react_native_airship/react_native_airship-Swift.h>)
6+
#import <react_native_airship/react_native_airship-Swift.h>
7+
#else
8+
#import "react_native_airship-Swift.h"
9+
#endif
510

611
@implementation RTNAirshipBootloader
712

ios/RTNAirshipMessageView.mm

+5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
/* Copyright Airship and Contributors */
22

33
#import "RTNAirshipMessageView.h"
4+
5+
#if __has_include(<react_native_airship/react_native_airship-Swift.h>)
6+
#import <react_native_airship/react_native_airship-Swift.h>
7+
#else
48
#import "react_native_airship-Swift.h"
9+
#endif
510

611
#ifdef RCT_NEW_ARCH_ENABLED
712
#import <React/RCTConversions.h>

0 commit comments

Comments
 (0)