Skip to content

Commit

Permalink
💫 Update: Header Imports
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicstop committed Dec 11, 2024
1 parent 1a7a823 commit 01ba1f3
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 2 deletions.
4 changes: 4 additions & 0 deletions ios/RNIContextMenuButton/RNIContextMenuButton.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
// Created by Dominic Go on 8/24/24.
//

#if __has_include(<react_native_ios_utilities/RNIBaseView.h>)
#import <react_native_ios_utilities/RNIBaseView.h>
#else
#import <react-native-ios-utilities/RNIBaseView.h>
#endif

#if RCT_NEW_ARCH_ENABLED
#import <React/RCTViewComponentView.h>
Expand Down
8 changes: 7 additions & 1 deletion ios/RNIContextMenuButton/RNIContextMenuButton.mm
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@
#import "RNIContextMenuButton.h"
#import "../Swift.h"

#if __has_include(<react_native_ios_utilities/RNIBaseView.h>)
#import <react_native_ios_utilities/RNIBaseView.h>
#import <react_native_ios_utilities/RNIContentViewParentDelegate.h>
#import <react_native_ios_utilities/UIApplication+RNIHelpers.h>
#import <react_native_ios_utilities/RNIObjcUtils.h>

#else
#import <react-native-ios-utilities/RNIBaseView.h>
#import <react-native-ios-utilities/RNIContentViewParentDelegate.h>
#import <react-native-ios-utilities/UIApplication+RNIHelpers.h>
#import <react-native-ios-utilities/RNIObjcUtils.h>
#endif

#if RCT_NEW_ARCH_ENABLED
#include "RNIContextMenuButtonComponentDescriptor.h"
Expand Down
4 changes: 4 additions & 0 deletions ios/RNIContextMenuButton/RNIContextMenuButtonViewManager.mm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
#import "RNIContextMenuButton.h"
#import <objc/runtime.h>

#if __has_include(<react_native_ios_utilities/RNIBaseViewUtils.h>)
#import <react_native_ios_utilities/RNIBaseViewUtils.h>
#else
#import <react-native-ios-utilities/RNIBaseViewUtils.h>
#endif

#import "RCTBridge.h"
#import <React/RCTViewManager.h>
Expand Down
4 changes: 4 additions & 0 deletions ios/RNIContextMenuView/RNIContextMenuView.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
// Created by Dominic Go on 8/24/24.
//

#if __has_include(<react_native_ios_utilities/RNIBaseView.h>)
#import <react_native_ios_utilities/RNIBaseView.h>
#else
#import <react-native-ios-utilities/RNIBaseView.h>
#endif

#if RCT_NEW_ARCH_ENABLED
#import <React/RCTViewComponentView.h>
Expand Down
13 changes: 12 additions & 1 deletion ios/RNIContextMenuView/RNIContextMenuView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,28 @@
#import "RNIContextMenuView.h"
#import "../Swift.h"

#if __has_include(<react_native_ios_utilities/RNIBaseView.h>)
#import <react_native_ios_utilities/RNIBaseView.h>
#import <react_native_ios_utilities/RNIContentViewParentDelegate.h>
#import <react_native_ios_utilities/UIApplication+RNIHelpers.h>
#import <react_native_ios_utilities/RNIObjcUtils.h>

#else
#import <react-native-ios-utilities/RNIBaseView.h>
#import <react-native-ios-utilities/RNIContentViewParentDelegate.h>
#import <react-native-ios-utilities/UIApplication+RNIHelpers.h>
#import <react-native-ios-utilities/RNIObjcUtils.h>
#endif

#if RCT_NEW_ARCH_ENABLED
#include "RNIContextMenuViewComponentDescriptor.h"

#if __has_include(<react_native_ios_utilities/RNIBaseViewState.h>)
#include <react_native_ios_utilities/RNIBaseViewState.h>
#include <react_native_ios_utilities/RNIBaseViewProps.h>
#else
#include <react-native-ios-utilities/RNIBaseViewState.h>
#include <react-native-ios-utilities/RNIBaseViewProps.h>
#endif

#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>
Expand Down
4 changes: 4 additions & 0 deletions ios/RNIContextMenuView/RNIContextMenuViewManager.mm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
#import "RNIContextMenuView.h"
#import <objc/runtime.h>

#if __has_include(<react_native_ios_utilities/RNIBaseViewUtils.h>)
#import <react_native_ios_utilities/RNIBaseViewUtils.h>
#else
#import <react-native-ios-utilities/RNIBaseViewUtils.h>
#endif

#import "RCTBridge.h"
#import <React/RCTViewManager.h>
Expand Down
4 changes: 4 additions & 0 deletions ios/Swift.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
// Otherwise, it's available only locally with double-quoted imports.
#if __has_include(<react_native_ios_context_menu/react_native_ios_context_menu-Swift.h>)
#import <react_native_ios_context_menu/react_native_ios_context_menu-Swift.h>

#elif __has_include(<react-native-ios-context-menu/react_native_ios_context_menu-Swift.h>)
#import <react-native-ios-context-menu/react_native_ios_context_menu-Swift.h>

#else
#import "react_native_ios_context_menu-Swift.h"
#endif
Expand Down

0 comments on commit 01ba1f3

Please sign in to comment.