diff --git a/ios/RNIContextMenuButton/RNIContextMenuButton.h b/ios/RNIContextMenuButton/RNIContextMenuButton.h index ca26ea0f..1efb6235 100644 --- a/ios/RNIContextMenuButton/RNIContextMenuButton.h +++ b/ios/RNIContextMenuButton/RNIContextMenuButton.h @@ -5,9 +5,9 @@ // Created by Dominic Go on 8/24/24. // -#import "RNIHeaderUtils.h" +#import "../RNIHeaderUtils.h" -RNI_INCLUDE_HEADER(RNIBaseView.h) +#import RNI_INCLUDE_HEADER(RNIBaseView.h) #if RCT_NEW_ARCH_ENABLED #import diff --git a/ios/RNIContextMenuButton/RNIContextMenuButton.mm b/ios/RNIContextMenuButton/RNIContextMenuButton.mm index feed0101..1aba1422 100644 --- a/ios/RNIContextMenuButton/RNIContextMenuButton.mm +++ b/ios/RNIContextMenuButton/RNIContextMenuButton.mm @@ -7,16 +7,16 @@ #import "RNIContextMenuButton.h" #import "../Swift.h" -#import "RNIHeaderUtils.h" +#import "../RNIHeaderUtils.h" -RNI_INCLUDE_HEADER(RNIContentViewParentDelegate.h) -RNI_INCLUDE_HEADER(UIApplication+RNIHelpers.h) -RNI_INCLUDE_HEADER(RNIObjcUtils.h) +#import RNI_INCLUDE_HEADER(RNIContentViewParentDelegate.h) +#import RNI_INCLUDE_HEADER(UIApplication+RNIHelpers.h) +#import RNI_INCLUDE_HEADER(RNIObjcUtils.h) #if RCT_NEW_ARCH_ENABLED #include "RNIContextMenuButtonComponentDescriptor.h" -RNI_INCLUDE_HEADER(RNIBaseViewState.h) -RNI_INCLUDE_HEADER(RNIBaseViewProps.h) +#import RNI_INCLUDE_HEADER(RNIBaseViewState.h) +#import RNI_INCLUDE_HEADER(RNIBaseViewProps.h) #import #import diff --git a/ios/RNIContextMenuButton/RNIContextMenuButtonComponentDescriptor.h b/ios/RNIContextMenuButton/RNIContextMenuButtonComponentDescriptor.h index 0da4b3c8..d8e05ff0 100644 --- a/ios/RNIContextMenuButton/RNIContextMenuButtonComponentDescriptor.h +++ b/ios/RNIContextMenuButton/RNIContextMenuButtonComponentDescriptor.h @@ -10,9 +10,9 @@ #include "RNIContextMenuButtonShadowNode.h" #include "RNIBaseViewComponentDescriptor.h" -#include "RNIHeaderUtils.h" +#include "../RNIHeaderUtils.h" -RNI_INCLUDE_HEADER(RNIBaseViewState.h) +#import RNI_INCLUDE_HEADER(RNIBaseViewState.h) #include diff --git a/ios/RNIContextMenuButton/RNIContextMenuButtonShadowNode.h b/ios/RNIContextMenuButton/RNIContextMenuButtonShadowNode.h index 190f34f5..aac287f4 100644 --- a/ios/RNIContextMenuButton/RNIContextMenuButtonShadowNode.h +++ b/ios/RNIContextMenuButton/RNIContextMenuButtonShadowNode.h @@ -8,11 +8,11 @@ #if __cplusplus #pragma once -#include "RNIHeaderUtils.h" +#include "../RNIHeaderUtils.h" -RNI_INCLUDE_HEADER(RNIBaseViewShadowNode.h) -RNI_INCLUDE_HEADER(RNIBaseViewProps.h) -RNI_INCLUDE_HEADER(RNIBaseViewEventEmitter.h) +#import RNI_INCLUDE_HEADER(RNIBaseViewShadowNode.h) +#import RNI_INCLUDE_HEADER(RNIBaseViewProps.h) +#import RNI_INCLUDE_HEADER(RNIBaseViewEventEmitter.h) #include #include diff --git a/ios/RNIContextMenuButton/RNIContextMenuButtonViewManager.mm b/ios/RNIContextMenuButton/RNIContextMenuButtonViewManager.mm index f5f39054..405101f0 100644 --- a/ios/RNIContextMenuButton/RNIContextMenuButtonViewManager.mm +++ b/ios/RNIContextMenuButton/RNIContextMenuButtonViewManager.mm @@ -8,9 +8,9 @@ #import "RNIContextMenuButton.h" #import -#import "RNIHeaderUtils.h" +#import "../RNIHeaderUtils.h" -RNI_INCLUDE_HEADER(RNIBaseViewUtils.h) +#import RNI_INCLUDE_HEADER(RNIBaseViewUtils.h) #import "RCTBridge.h" #import diff --git a/ios/RNIContextMenuView/RNIContextMenuView.h b/ios/RNIContextMenuView/RNIContextMenuView.h index 30b12fdf..e84505c6 100644 --- a/ios/RNIContextMenuView/RNIContextMenuView.h +++ b/ios/RNIContextMenuView/RNIContextMenuView.h @@ -5,9 +5,9 @@ // Created by Dominic Go on 8/24/24. // -#import "RNIHeaderUtils.h" +#import "../RNIHeaderUtils.h" -RNI_INCLUDE_HEADER(RNIBaseView.h) +#import RNI_INCLUDE_HEADER(RNIBaseView.h) #if RCT_NEW_ARCH_ENABLED #import diff --git a/ios/RNIContextMenuView/RNIContextMenuView.mm b/ios/RNIContextMenuView/RNIContextMenuView.mm index caa5e550..8880a0fd 100644 --- a/ios/RNIContextMenuView/RNIContextMenuView.mm +++ b/ios/RNIContextMenuView/RNIContextMenuView.mm @@ -7,27 +7,23 @@ #import "RNIContextMenuView.h" #import "../Swift.h" -#import "RNIHeaderUtils.h" -RNI_INCLUDE_HEADER(RNIBaseView.h) -RNI_INCLUDE_HEADER(RNIContentViewParentDelegate.h) -RNI_INCLUDE_HEADER(UIApplication+RNIHelpers.h) -RNI_INCLUDE_HEADER(RNIObjcUtils.h) +#import "../RNIHeaderUtils.h" + +#import RNI_INCLUDE_HEADER(RNIBaseView.h) +#import RNI_INCLUDE_HEADER(RNIContentViewParentDelegate.h) +#import RNI_INCLUDE_HEADER(UIApplication+RNIHelpers.h) +#import RNI_INCLUDE_HEADER(RNIObjcUtils.h) #if RCT_NEW_ARCH_ENABLED -RNI_INCLUDE_HEADER(RNIBaseViewState.h) -#else -RNI_INCLUDE_HEADER(RNIBaseView.h) -RNI_INCLUDE_HEADER(RNIContentViewParentDelegate.h) -RNI_INCLUDE_HEADER(UIApplication+RNIHelpers.h) -RNI_INCLUDE_HEADER(RNIObjcUtils.h) +#import RNI_INCLUDE_HEADER(RNIBaseViewState.h) #endif #if RCT_NEW_ARCH_ENABLED #include "RNIContextMenuViewComponentDescriptor.h" -RNI_INCLUDE_HEADER(RNIBaseViewState.h) -RNI_INCLUDE_HEADER(RNIBaseViewProps.h) +#import RNI_INCLUDE_HEADER(RNIBaseViewState.h) +#import RNI_INCLUDE_HEADER(RNIBaseViewProps.h) #import #import diff --git a/ios/RNIContextMenuView/RNIContextMenuViewManager.mm b/ios/RNIContextMenuView/RNIContextMenuViewManager.mm index df9ab9f3..eac9da0a 100644 --- a/ios/RNIContextMenuView/RNIContextMenuViewManager.mm +++ b/ios/RNIContextMenuView/RNIContextMenuViewManager.mm @@ -7,9 +7,10 @@ #import "RNIContextMenuView.h" #import -#import "RNIHeaderUtils.h" -RNI_INCLUDE_HEADER(RNIBaseViewUtils.h) +#import "../RNIHeaderUtils.h" + +#import RNI_INCLUDE_HEADER(RNIBaseViewUtils.h) #import "RCTBridge.h" #import diff --git a/ios/RNIContextMenuView/RNIContextMenuViewShadowNode.h b/ios/RNIContextMenuView/RNIContextMenuViewShadowNode.h index a22c5aa6..c91e6ba6 100644 --- a/ios/RNIContextMenuView/RNIContextMenuViewShadowNode.h +++ b/ios/RNIContextMenuView/RNIContextMenuViewShadowNode.h @@ -8,11 +8,11 @@ #if __cplusplus #pragma once -#include "RNIHeaderUtils.h" +#include "../RNIHeaderUtils.h" -RNI_INCLUDE_HEADER(RNIBaseViewShadowNode.h) -RNI_INCLUDE_HEADER(RNIBaseViewProps.h) -RNI_INCLUDE_HEADER(RNIBaseViewEventEmitter.h) +#import RNI_INCLUDE_HEADER(RNIBaseViewShadowNode.h) +#import RNI_INCLUDE_HEADER(RNIBaseViewProps.h) +#import RNI_INCLUDE_HEADER(RNIBaseViewEventEmitter.h) #include #include diff --git a/ios/RNIHeaderUtils.h b/ios/RNIHeaderUtils.h index 29970f29..66b12192 100644 --- a/ios/RNIHeaderUtils.h +++ b/ios/RNIHeaderUtils.h @@ -1,8 +1,7 @@ #pragma once -#define RNI_INCLUDE_HEADER(header) \ -#if __has_include() \ -#include \ -#else \ -#include \ +#if __has_include() + #define RNI_INCLUDE_HEADER(header) +#else + #define RNI_INCLUDE_HEADER(header) #endif diff --git a/ios/Swift.h b/ios/Swift.h index 11234851..c4f38791 100644 --- a/ios/Swift.h +++ b/ios/Swift.h @@ -4,9 +4,16 @@ // // Created by Dominic Go on 8/24/24. // -#import "RNIHeaderUtils.h" +#if __has_include() +#import + +#elif __has_include() +#import + +#else +#import "react_native_ios_context_menu-Swift.h" +#endif -RNI_INCLUDE_HEADER(react_native_ios_context_menu-Swift.h) // #import // #import "" diff --git a/react-native-ios-context-menu.podspec b/react-native-ios-context-menu.podspec index 8f22bb29..9df98bf7 100644 --- a/react-native-ios-context-menu.podspec +++ b/react-native-ios-context-menu.podspec @@ -68,7 +68,7 @@ Pod::Spec.new do |s| '"${PODS_CONFIGURATION_BUILD_DIR}/react-native-ios-utilities/**"', '"${PODS_CONFIGURATION_BUILD_DIR}/react-native-ios-utilities/Swift Compatibility Header"', '"${PODS_CONFIGURATION_BUILD_DIR}/react-native-ios-context-menu/Swift Compatibility Header"', - + #'"$(PODS_ROOT)/Headers/Private/react-native-ios-utilities"', #'"$(PODS_ROOT)/Headers/Public/react-native-ios-utilities"', @@ -76,7 +76,7 @@ Pod::Spec.new do |s| '"$(PODS_CONFIGURATION_BUILD_DIR)/React-bridging/react_bridging.framework/Headers"', '"$(PODS_ROOT)/Headers/Private/Yoga"', ] - + if fabric_enabled && ENV['USE_FRAMEWORKS'] user_header_search_paths << "\"$(PODS_ROOT)/DoubleConversion\"" user_header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers\"" @@ -91,7 +91,7 @@ Pod::Spec.new do |s| "HEADER_SEARCH_PATHS" => user_header_search_paths, } - # s.xcconfig = { + # s.xcconfig = { # 'HEADER_SEARCH_PATHS' => [ # '"${PODS_CONFIGURATION_BUILD_DIR}/react-native-ios-utilities/Swift Compatibility Header"', # '"${PODS_CONFIGURATION_BUILD_DIR}/react-native-ios-utilities/**"', @@ -138,5 +138,5 @@ Pod::Spec.new do |s| s.exclude_files = exclude_files s.compiler_flags = compiler_flags - s.private_header_files = ['ios/**/*+Private.h', 'ios/**/Swift.h'] + s.private_header_files = ['ios/**/*+Private.h', 'ios/**/Swift.h', 'ios/**/RNIHeaderUtils.h'] end