Skip to content
This repository was archived by the owner on Jun 24, 2021. It is now read-only.

Commit cbc818a

Browse files
author
Tobias Eisenschenk
committed
fix: allow deprecated import path
as discussed in facebook/react-native#13198 import paths in differ per RN version
1 parent a5e98b0 commit cbc818a

File tree

4 files changed

+27
-5
lines changed

4 files changed

+27
-5
lines changed

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# OSX
32
#
43
.DS_Store
@@ -8,7 +7,6 @@
87
node_modules/
98
npm-debug.log
109
yarn-error.log
11-
1210

1311
# Xcode
1412
#
@@ -29,7 +27,6 @@ DerivedData
2927
*.ipa
3028
*.xcuserstate
3129
project.xcworkspace
32-
3330

3431
# Android/IntelliJ
3532
#
@@ -39,8 +36,11 @@ build/
3936
local.properties
4037
*.iml
4138

39+
# VSCode
40+
#
41+
.vscode
42+
4243
# BUCK
4344
buck-out/
4445
\.buckd/
4546
*.keystore
46-

ios/RNSelectableTextManager.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
#if __has_include(<RCTText/RCTBaseTextInputViewManager.h>)
12
#import <RCTText/RCTBaseTextInputViewManager.h>
3+
#else
4+
#import "RCTBaseTextInputViewManager.h"
5+
#endif
26

37
NS_ASSUME_NONNULL_BEGIN
48

ios/RNSelectableTextView.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
#if __has_include(<RCTText/RCTBaseTextInputView.h>)
12
#import <RCTText/RCTBaseTextInputView.h>
3+
#else
4+
#import "RCTBaseTextInputView.h"
5+
#endif
26

37
NS_ASSUME_NONNULL_BEGIN
48

ios/RNSelectableTextView.m

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
1-
1+
#if __has_include(<RCTText/RCTTextSelection.h>)
22
#import <RCTText/RCTTextSelection.h>
3+
#else
4+
#import "RCTTextSelection.h"
5+
#endif
6+
7+
#if __has_include(<RCTText/RCTUITextView.h>)
38
#import <RCTText/RCTUITextView.h>
9+
#else
10+
#import "RCTUITextView.h"
11+
#endif
12+
413
#import "RNSelectableTextView.h"
14+
15+
#if __has_include(<RCTText/RCTTextAttributes.h>)
516
#import <RCTText/RCTTextAttributes.h>
17+
#else
18+
#import "RCTTextAttributes.h"
19+
#endif
620

721
#import <React/RCTUtils.h>
822

0 commit comments

Comments
 (0)