From f15e413f1d517c0d12429625aa0ccd4b7b05bbda Mon Sep 17 00:00:00 2001 From: Axel Pettersson Date: Tue, 4 Apr 2023 11:15:08 +0200 Subject: [PATCH] fix: Import when using cocapods frameworks --- ios/RTNAirship.mm | 5 +++++ ios/RTNAirshipBootloader.m | 7 ++++++- ios/RTNAirshipMessageView.mm | 5 +++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ios/RTNAirship.mm b/ios/RTNAirship.mm index 5e3ee86b..e1aead83 100644 --- a/ios/RTNAirship.mm +++ b/ios/RTNAirship.mm @@ -1,7 +1,12 @@ /* Copyright Airship and Contributors */ #import "RTNAirship.h" + +#if __has_include() +#import +#else #import "react_native_airship-Swift.h" +#endif @implementation RTNAirship RCT_EXPORT_MODULE() diff --git a/ios/RTNAirshipBootloader.m b/ios/RTNAirshipBootloader.m index a523aebf..5a84474f 100644 --- a/ios/RTNAirshipBootloader.m +++ b/ios/RTNAirshipBootloader.m @@ -1,7 +1,12 @@ /* Copyright Airship and Contributors */ #import "RTNAirshipBootloader.h" -#import "react_nativE_airship-Swift.h" + +#if __has_include() +#import +#else +#import "react_native_airship-Swift.h" +#endif @implementation RTNAirshipBootloader diff --git a/ios/RTNAirshipMessageView.mm b/ios/RTNAirshipMessageView.mm index d6140c19..92926c3b 100644 --- a/ios/RTNAirshipMessageView.mm +++ b/ios/RTNAirshipMessageView.mm @@ -1,7 +1,12 @@ /* Copyright Airship and Contributors */ #import "RTNAirshipMessageView.h" + +#if __has_include() +#import +#else #import "react_native_airship-Swift.h" +#endif #ifdef RCT_NEW_ARCH_ENABLED #import