소스 검색

WIP: WebView extraction - iOS working both UI and WK versions

Jamon Holmgren 6 년 전
부모
커밋
922151ec42

ios/archive/RNCWebView.h → ios/RCTUIWebView.h 파일 보기

@@ -1,6 +1,6 @@
1 1
 #import <React/RCTView.h>
2 2
 
3
-@class RNCWebView;
3
+@class RCTUIWebView;
4 4
 
5 5
 /**
6 6
  * Special scheme used to pass messages to the injectedJavaScript
@@ -10,17 +10,17 @@
10 10
  */
11 11
 extern NSString *const RNCJSNavigationScheme;
12 12
 
13
-@protocol RNCWebViewDelegate <NSObject>
13
+@protocol RCTUIWebViewDelegate <NSObject>
14 14
 
15
-- (BOOL)webView:(RNCWebView *)webView
15
+- (BOOL)webView:(RCTUIWebView *)webView
16 16
 shouldStartLoadForRequest:(NSMutableDictionary<NSString *, id> *)request
17 17
    withCallback:(RCTDirectEventBlock)callback;
18 18
 
19 19
 @end
20 20
 
21
-@interface RNCWebView : RCTView
21
+@interface RCTUIWebView : RCTView
22 22
 
23
-@property (nonatomic, weak) id<RNCWebViewDelegate> delegate;
23
+@property (nonatomic, weak) id<RCTUIWebViewDelegate> delegate;
24 24
 
25 25
 @property (nonatomic, copy) NSDictionary *source;
26 26
 @property (nonatomic, assign) UIEdgeInsets contentInset;

ios/archive/RNCWebView.m → ios/RCTUIWebView.m 파일 보기

@@ -1,4 +1,4 @@
1
-#import "RNCWebView.h"
1
+#import "RCTUIWebView.h"
2 2
 
3 3
 // #import <UIKit/UIKit.h>
4 4
 #import <React/RCTAutoInsetsProtocol.h>
@@ -13,7 +13,7 @@ NSString *const RNCJSNavigationScheme = @"react-js-navigation";
13 13
 
14 14
 static NSString *const kPostMessageHost = @"postMessage";
15 15
 
16
-@interface RNCWebView () <UIWebViewDelegate, RCTAutoInsetsProtocol>
16
+@interface RCTUIWebView () <UIWebViewDelegate, RCTAutoInsetsProtocol>
17 17
 
18 18
 @property (nonatomic, copy) RCTDirectEventBlock onLoadingStart;
19 19
 @property (nonatomic, copy) RCTDirectEventBlock onLoadingFinish;
@@ -23,7 +23,7 @@ static NSString *const kPostMessageHost = @"postMessage";
23 23
 
24 24
 @end
25 25
 
26
-@implementation RNCWebView
26
+@implementation RCTUIWebView
27 27
 {
28 28
   UIWebView *_webView;
29 29
   NSString *_injectedJavaScript;

+ 5
- 0
ios/RCTUIWebViewManager.h 파일 보기

@@ -0,0 +1,5 @@
1
+#import <React/RCTViewManager.h>
2
+
3
+@interface RCTUIWebViewManager : RCTViewManager
4
+
5
+@end

ios/archive/RNCWebViewManager.m → ios/RCTUIWebViewManager.m 파일 보기

@@ -1,15 +1,15 @@
1
-#import "RNCWebViewManager.h"
1
+#import "RCTUIWebViewManager.h"
2 2
 
3 3
 #import <React/RCTBridge.h>
4 4
 #import <React/RCTUIManager.h>
5 5
 #import <React/UIView+React.h>
6
-#import "RNCWebView.h"
6
+#import "RCTUIWebView.h"
7 7
 
8
-@interface RNCWebViewManager () <RNCWebViewDelegate>
8
+@interface RCTUIWebViewManager () <RCTUIWebViewDelegate>
9 9
 
10 10
 @end
11 11
 
12
-@implementation RNCWebViewManager
12
+@implementation RCTUIWebViewManager
13 13
 {
14 14
   NSConditionLock *_shouldStartLoadLock;
15 15
   BOOL _shouldStartLoad;
@@ -19,7 +19,7 @@ RCT_EXPORT_MODULE()
19 19
 
20 20
 - (UIView *)view
21 21
 {
22
-  RNCWebView *webView = [RNCWebView new];
22
+  RCTUIWebView *webView = [RCTUIWebView new];
23 23
   webView.delegate = self;
24 24
   return webView;
25 25
 }
@@ -44,10 +44,10 @@ RCT_REMAP_VIEW_PROPERTY(dataDetectorTypes, _webView.dataDetectorTypes, UIDataDet
44 44
 
45 45
 RCT_EXPORT_METHOD(goBack:(nonnull NSNumber *)reactTag)
46 46
 {
47
-  [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, RNCWebView *> *viewRegistry) {
48
-    RNCWebView *view = viewRegistry[reactTag];
49
-    if (![view isKindOfClass:[RNCWebView class]]) {
50
-      RCTLogError(@"Invalid view returned from registry, expecting RNCWebView, got: %@", view);
47
+  [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, RCTUIWebView *> *viewRegistry) {
48
+    RCTUIWebView *view = viewRegistry[reactTag];
49
+    if (![view isKindOfClass:[RCTUIWebView class]]) {
50
+      RCTLogError(@"Invalid view returned from registry, expecting RCTUIWebView, got: %@", view);
51 51
     } else {
52 52
       [view goBack];
53 53
     }
@@ -58,8 +58,8 @@ RCT_EXPORT_METHOD(goForward:(nonnull NSNumber *)reactTag)
58 58
 {
59 59
   [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
60 60
     id view = viewRegistry[reactTag];
61
-    if (![view isKindOfClass:[RNCWebView class]]) {
62
-      RCTLogError(@"Invalid view returned from registry, expecting RNCWebView, got: %@", view);
61
+    if (![view isKindOfClass:[RCTUIWebView class]]) {
62
+      RCTLogError(@"Invalid view returned from registry, expecting RCTUIWebView, got: %@", view);
63 63
     } else {
64 64
       [view goForward];
65 65
     }
@@ -68,10 +68,10 @@ RCT_EXPORT_METHOD(goForward:(nonnull NSNumber *)reactTag)
68 68
 
69 69
 RCT_EXPORT_METHOD(reload:(nonnull NSNumber *)reactTag)
70 70
 {
71
-  [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, RNCWebView *> *viewRegistry) {
72
-    RNCWebView *view = viewRegistry[reactTag];
73
-    if (![view isKindOfClass:[RNCWebView class]]) {
74
-      RCTLogError(@"Invalid view returned from registry, expecting RNCWebView, got: %@", view);
71
+  [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, RCTUIWebView *> *viewRegistry) {
72
+    RCTUIWebView *view = viewRegistry[reactTag];
73
+    if (![view isKindOfClass:[RCTUIWebView class]]) {
74
+      RCTLogError(@"Invalid view returned from registry, expecting RCTUIWebView, got: %@", view);
75 75
     } else {
76 76
       [view reload];
77 77
     }
@@ -80,10 +80,10 @@ RCT_EXPORT_METHOD(reload:(nonnull NSNumber *)reactTag)
80 80
 
81 81
 RCT_EXPORT_METHOD(stopLoading:(nonnull NSNumber *)reactTag)
82 82
 {
83
-  [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, RNCWebView *> *viewRegistry) {
84
-    RNCWebView *view = viewRegistry[reactTag];
85
-    if (![view isKindOfClass:[RNCWebView class]]) {
86
-      RCTLogError(@"Invalid view returned from registry, expecting RNCWebView, got: %@", view);
83
+  [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, RCTUIWebView *> *viewRegistry) {
84
+    RCTUIWebView *view = viewRegistry[reactTag];
85
+    if (![view isKindOfClass:[RCTUIWebView class]]) {
86
+      RCTLogError(@"Invalid view returned from registry, expecting RCTUIWebView, got: %@", view);
87 87
     } else {
88 88
       [view stopLoading];
89 89
     }
@@ -92,10 +92,10 @@ RCT_EXPORT_METHOD(stopLoading:(nonnull NSNumber *)reactTag)
92 92
 
93 93
 RCT_EXPORT_METHOD(postMessage:(nonnull NSNumber *)reactTag message:(NSString *)message)
94 94
 {
95
-  [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, RNCWebView *> *viewRegistry) {
96
-    RNCWebView *view = viewRegistry[reactTag];
97
-    if (![view isKindOfClass:[RNCWebView class]]) {
98
-      RCTLogError(@"Invalid view returned from registry, expecting RNCWebView, got: %@", view);
95
+  [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, RCTUIWebView *> *viewRegistry) {
96
+    RCTUIWebView *view = viewRegistry[reactTag];
97
+    if (![view isKindOfClass:[RCTUIWebView class]]) {
98
+      RCTLogError(@"Invalid view returned from registry, expecting RCTUIWebView, got: %@", view);
99 99
     } else {
100 100
       [view postMessage:message];
101 101
     }
@@ -104,10 +104,10 @@ RCT_EXPORT_METHOD(postMessage:(nonnull NSNumber *)reactTag message:(NSString *)m
104 104
 
105 105
 RCT_EXPORT_METHOD(injectJavaScript:(nonnull NSNumber *)reactTag script:(NSString *)script)
106 106
 {
107
-  [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, RNCWebView *> *viewRegistry) {
108
-    RNCWebView *view = viewRegistry[reactTag];
109
-    if (![view isKindOfClass:[RNCWebView class]]) {
110
-      RCTLogError(@"Invalid view returned from registry, expecting RNCWebView, got: %@", view);
107
+  [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, RCTUIWebView *> *viewRegistry) {
108
+    RCTUIWebView *view = viewRegistry[reactTag];
109
+    if (![view isKindOfClass:[RCTUIWebView class]]) {
110
+      RCTLogError(@"Invalid view returned from registry, expecting RCTUIWebView, got: %@", view);
111 111
     } else {
112 112
       [view injectJavaScript:script];
113 113
     }
@@ -116,7 +116,7 @@ RCT_EXPORT_METHOD(injectJavaScript:(nonnull NSNumber *)reactTag script:(NSString
116 116
 
117 117
 #pragma mark - Exported synchronous methods
118 118
 
119
-- (BOOL)webView:(__unused RNCWebView *)webView
119
+- (BOOL)webView:(__unused RCTUIWebView *)webView
120 120
 shouldStartLoadForRequest:(NSMutableDictionary<NSString *, id> *)request
121 121
    withCallback:(RCTDirectEventBlock)callback
122 122
 {

+ 12
- 0
ios/RCTWebView.xcodeproj/project.pbxproj 파일 보기

@@ -7,6 +7,8 @@
7 7
 	objects = {
8 8
 
9 9
 /* Begin PBXBuildFile section */
10
+		E914DBF6214474710071092B /* RCTUIWebViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E914DBF3214474710071092B /* RCTUIWebViewManager.m */; };
11
+		E914DBF7214474710071092B /* RCTUIWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = E914DBF4214474710071092B /* RCTUIWebView.m */; };
10 12
 		E91B351D21446E6C00F9801F /* RCTWKWebViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E91B351B21446E6C00F9801F /* RCTWKWebViewManager.m */; };
11 13
 		E91B351E21446E6C00F9801F /* RCTWKWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = E91B351C21446E6C00F9801F /* RCTWKWebView.m */; };
12 14
 /* End PBXBuildFile section */
@@ -25,6 +27,10 @@
25 27
 
26 28
 /* Begin PBXFileReference section */
27 29
 		134814201AA4EA6300B7C361 /* libRCTWebView.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRCTWebView.a; sourceTree = BUILT_PRODUCTS_DIR; };
30
+		E914DBF2214474710071092B /* RCTUIWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTUIWebView.h; sourceTree = "<group>"; };
31
+		E914DBF3214474710071092B /* RCTUIWebViewManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTUIWebViewManager.m; sourceTree = "<group>"; };
32
+		E914DBF4214474710071092B /* RCTUIWebView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTUIWebView.m; sourceTree = "<group>"; };
33
+		E914DBF5214474710071092B /* RCTUIWebViewManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTUIWebViewManager.h; sourceTree = "<group>"; };
28 34
 		E91B351921446E6C00F9801F /* RCTWKWebViewManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTWKWebViewManager.h; sourceTree = "<group>"; };
29 35
 		E91B351A21446E6C00F9801F /* RCTWKWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTWKWebView.h; sourceTree = "<group>"; };
30 36
 		E91B351B21446E6C00F9801F /* RCTWKWebViewManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTWKWebViewManager.m; sourceTree = "<group>"; };
@@ -53,6 +59,10 @@
53 59
 		58B511D21A9E6C8500147676 = {
54 60
 			isa = PBXGroup;
55 61
 			children = (
62
+				E914DBF2214474710071092B /* RCTUIWebView.h */,
63
+				E914DBF4214474710071092B /* RCTUIWebView.m */,
64
+				E914DBF5214474710071092B /* RCTUIWebViewManager.h */,
65
+				E914DBF3214474710071092B /* RCTUIWebViewManager.m */,
56 66
 				E91B351A21446E6C00F9801F /* RCTWKWebView.h */,
57 67
 				E91B351C21446E6C00F9801F /* RCTWKWebView.m */,
58 68
 				E91B351921446E6C00F9801F /* RCTWKWebViewManager.h */,
@@ -118,6 +128,8 @@
118 128
 			buildActionMask = 2147483647;
119 129
 			files = (
120 130
 				E91B351D21446E6C00F9801F /* RCTWKWebViewManager.m in Sources */,
131
+				E914DBF7214474710071092B /* RCTUIWebView.m in Sources */,
132
+				E914DBF6214474710071092B /* RCTUIWebViewManager.m in Sources */,
121 133
 				E91B351E21446E6C00F9801F /* RCTWKWebView.m in Sources */,
122 134
 			);
123 135
 			runOnlyForDeploymentPostprocessing = 0;

+ 0
- 265
ios/archive/RCTWKWebView.xcodeproj/project.pbxproj 파일 보기

@@ -1,265 +0,0 @@
1
-// !$*UTF8*$!
2
-{
3
-	archiveVersion = 1;
4
-	classes = {
5
-	};
6
-	objectVersion = 46;
7
-	objects = {
8
-
9
-/* Begin PBXBuildFile section */
10
-		E91B3466214383EF00F9801F /* RCTWKWebViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E91B3464214383EF00F9801F /* RCTWKWebViewManager.m */; };
11
-		E91B3467214383EF00F9801F /* RCTWKWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = E91B3465214383EF00F9801F /* RCTWKWebView.m */; };
12
-/* End PBXBuildFile section */
13
-
14
-/* Begin PBXCopyFilesBuildPhase section */
15
-		58B511D91A9E6C8500147676 /* CopyFiles */ = {
16
-			isa = PBXCopyFilesBuildPhase;
17
-			buildActionMask = 2147483647;
18
-			dstPath = "include/$(PRODUCT_NAME)";
19
-			dstSubfolderSpec = 16;
20
-			files = (
21
-			);
22
-			runOnlyForDeploymentPostprocessing = 0;
23
-		};
24
-/* End PBXCopyFilesBuildPhase section */
25
-
26
-/* Begin PBXFileReference section */
27
-		134814201AA4EA6300B7C361 /* libRCTWKWebView.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRCTWKWebView.a; sourceTree = BUILT_PRODUCTS_DIR; };
28
-		E91B3462214383EF00F9801F /* RCTWKWebViewManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTWKWebViewManager.h; sourceTree = "<group>"; };
29
-		E91B3463214383EF00F9801F /* RCTWKWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTWKWebView.h; sourceTree = "<group>"; };
30
-		E91B3464214383EF00F9801F /* RCTWKWebViewManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTWKWebViewManager.m; sourceTree = "<group>"; };
31
-		E91B3465214383EF00F9801F /* RCTWKWebView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTWKWebView.m; sourceTree = "<group>"; };
32
-/* End PBXFileReference section */
33
-
34
-/* Begin PBXFrameworksBuildPhase section */
35
-		58B511D81A9E6C8500147676 /* Frameworks */ = {
36
-			isa = PBXFrameworksBuildPhase;
37
-			buildActionMask = 2147483647;
38
-			files = (
39
-			);
40
-			runOnlyForDeploymentPostprocessing = 0;
41
-		};
42
-/* End PBXFrameworksBuildPhase section */
43
-
44
-/* Begin PBXGroup section */
45
-		134814211AA4EA7D00B7C361 /* Products */ = {
46
-			isa = PBXGroup;
47
-			children = (
48
-				134814201AA4EA6300B7C361 /* libRCTWKWebView.a */,
49
-			);
50
-			name = Products;
51
-			sourceTree = "<group>";
52
-		};
53
-		58B511D21A9E6C8500147676 = {
54
-			isa = PBXGroup;
55
-			children = (
56
-				E91B3463214383EF00F9801F /* RCTWKWebView.h */,
57
-				E91B3465214383EF00F9801F /* RCTWKWebView.m */,
58
-				E91B3462214383EF00F9801F /* RCTWKWebViewManager.h */,
59
-				E91B3464214383EF00F9801F /* RCTWKWebViewManager.m */,
60
-				134814211AA4EA7D00B7C361 /* Products */,
61
-			);
62
-			sourceTree = "<group>";
63
-		};
64
-/* End PBXGroup section */
65
-
66
-/* Begin PBXNativeTarget section */
67
-		58B511DA1A9E6C8500147676 /* RCTWKWebView */ = {
68
-			isa = PBXNativeTarget;
69
-			buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RCTWKWebView" */;
70
-			buildPhases = (
71
-				58B511D71A9E6C8500147676 /* Sources */,
72
-				58B511D81A9E6C8500147676 /* Frameworks */,
73
-				58B511D91A9E6C8500147676 /* CopyFiles */,
74
-			);
75
-			buildRules = (
76
-			);
77
-			dependencies = (
78
-			);
79
-			name = RCTWKWebView;
80
-			productName = RCTDataManager;
81
-			productReference = 134814201AA4EA6300B7C361 /* libRCTWKWebView.a */;
82
-			productType = "com.apple.product-type.library.static";
83
-		};
84
-/* End PBXNativeTarget section */
85
-
86
-/* Begin PBXProject section */
87
-		58B511D31A9E6C8500147676 /* Project object */ = {
88
-			isa = PBXProject;
89
-			attributes = {
90
-				LastUpgradeCheck = 0830;
91
-				ORGANIZATIONNAME = Facebook;
92
-				TargetAttributes = {
93
-					58B511DA1A9E6C8500147676 = {
94
-						CreatedOnToolsVersion = 6.1.1;
95
-					};
96
-				};
97
-			};
98
-			buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RCTWKWebView" */;
99
-			compatibilityVersion = "Xcode 3.2";
100
-			developmentRegion = English;
101
-			hasScannedForEncodings = 0;
102
-			knownRegions = (
103
-				en,
104
-			);
105
-			mainGroup = 58B511D21A9E6C8500147676;
106
-			productRefGroup = 58B511D21A9E6C8500147676;
107
-			projectDirPath = "";
108
-			projectRoot = "";
109
-			targets = (
110
-				58B511DA1A9E6C8500147676 /* RCTWKWebView */,
111
-			);
112
-		};
113
-/* End PBXProject section */
114
-
115
-/* Begin PBXSourcesBuildPhase section */
116
-		58B511D71A9E6C8500147676 /* Sources */ = {
117
-			isa = PBXSourcesBuildPhase;
118
-			buildActionMask = 2147483647;
119
-			files = (
120
-				E91B3466214383EF00F9801F /* RCTWKWebViewManager.m in Sources */,
121
-				E91B3467214383EF00F9801F /* RCTWKWebView.m in Sources */,
122
-			);
123
-			runOnlyForDeploymentPostprocessing = 0;
124
-		};
125
-/* End PBXSourcesBuildPhase section */
126
-
127
-/* Begin XCBuildConfiguration section */
128
-		58B511ED1A9E6C8500147676 /* Debug */ = {
129
-			isa = XCBuildConfiguration;
130
-			buildSettings = {
131
-				ALWAYS_SEARCH_USER_PATHS = NO;
132
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
133
-				CLANG_CXX_LIBRARY = "libc++";
134
-				CLANG_ENABLE_MODULES = YES;
135
-				CLANG_ENABLE_OBJC_ARC = YES;
136
-				CLANG_WARN_BOOL_CONVERSION = YES;
137
-				CLANG_WARN_CONSTANT_CONVERSION = YES;
138
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
139
-				CLANG_WARN_EMPTY_BODY = YES;
140
-				CLANG_WARN_ENUM_CONVERSION = YES;
141
-				CLANG_WARN_INFINITE_RECURSION = YES;
142
-				CLANG_WARN_INT_CONVERSION = YES;
143
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
144
-				CLANG_WARN_SUSPICIOUS_MOVE = YES;
145
-				CLANG_WARN_UNREACHABLE_CODE = YES;
146
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
147
-				COPY_PHASE_STRIP = NO;
148
-				ENABLE_STRICT_OBJC_MSGSEND = YES;
149
-				ENABLE_TESTABILITY = YES;
150
-				GCC_C_LANGUAGE_STANDARD = gnu99;
151
-				GCC_DYNAMIC_NO_PIC = NO;
152
-				GCC_NO_COMMON_BLOCKS = YES;
153
-				GCC_OPTIMIZATION_LEVEL = 0;
154
-				GCC_PREPROCESSOR_DEFINITIONS = (
155
-					"DEBUG=1",
156
-					"$(inherited)",
157
-				);
158
-				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
159
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
160
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
161
-				GCC_WARN_UNDECLARED_SELECTOR = YES;
162
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
163
-				GCC_WARN_UNUSED_FUNCTION = YES;
164
-				GCC_WARN_UNUSED_VARIABLE = YES;
165
-				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
166
-				MTL_ENABLE_DEBUG_INFO = YES;
167
-				ONLY_ACTIVE_ARCH = YES;
168
-				SDKROOT = iphoneos;
169
-			};
170
-			name = Debug;
171
-		};
172
-		58B511EE1A9E6C8500147676 /* Release */ = {
173
-			isa = XCBuildConfiguration;
174
-			buildSettings = {
175
-				ALWAYS_SEARCH_USER_PATHS = NO;
176
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
177
-				CLANG_CXX_LIBRARY = "libc++";
178
-				CLANG_ENABLE_MODULES = YES;
179
-				CLANG_ENABLE_OBJC_ARC = YES;
180
-				CLANG_WARN_BOOL_CONVERSION = YES;
181
-				CLANG_WARN_CONSTANT_CONVERSION = YES;
182
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
183
-				CLANG_WARN_EMPTY_BODY = YES;
184
-				CLANG_WARN_ENUM_CONVERSION = YES;
185
-				CLANG_WARN_INFINITE_RECURSION = YES;
186
-				CLANG_WARN_INT_CONVERSION = YES;
187
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
188
-				CLANG_WARN_SUSPICIOUS_MOVE = YES;
189
-				CLANG_WARN_UNREACHABLE_CODE = YES;
190
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
191
-				COPY_PHASE_STRIP = YES;
192
-				ENABLE_NS_ASSERTIONS = NO;
193
-				ENABLE_STRICT_OBJC_MSGSEND = YES;
194
-				GCC_C_LANGUAGE_STANDARD = gnu99;
195
-				GCC_NO_COMMON_BLOCKS = YES;
196
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
197
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
198
-				GCC_WARN_UNDECLARED_SELECTOR = YES;
199
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
200
-				GCC_WARN_UNUSED_FUNCTION = YES;
201
-				GCC_WARN_UNUSED_VARIABLE = YES;
202
-				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
203
-				MTL_ENABLE_DEBUG_INFO = NO;
204
-				SDKROOT = iphoneos;
205
-				VALIDATE_PRODUCT = YES;
206
-			};
207
-			name = Release;
208
-		};
209
-		58B511F01A9E6C8500147676 /* Debug */ = {
210
-			isa = XCBuildConfiguration;
211
-			buildSettings = {
212
-				HEADER_SEARCH_PATHS = (
213
-					"$(inherited)",
214
-					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
215
-					"$(SRCROOT)/../../../React/**",
216
-					"$(SRCROOT)/../../react-native/React/**",
217
-				);
218
-				LIBRARY_SEARCH_PATHS = "$(inherited)";
219
-				OTHER_LDFLAGS = "-ObjC";
220
-				PRODUCT_NAME = RCTWKWebView;
221
-				SKIP_INSTALL = YES;
222
-			};
223
-			name = Debug;
224
-		};
225
-		58B511F11A9E6C8500147676 /* Release */ = {
226
-			isa = XCBuildConfiguration;
227
-			buildSettings = {
228
-				HEADER_SEARCH_PATHS = (
229
-					"$(inherited)",
230
-					/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
231
-					"$(SRCROOT)/../../../React/**",
232
-					"$(SRCROOT)/../../react-native/React/**",
233
-				);
234
-				LIBRARY_SEARCH_PATHS = "$(inherited)";
235
-				OTHER_LDFLAGS = "-ObjC";
236
-				PRODUCT_NAME = RCTWKWebView;
237
-				SKIP_INSTALL = YES;
238
-			};
239
-			name = Release;
240
-		};
241
-/* End XCBuildConfiguration section */
242
-
243
-/* Begin XCConfigurationList section */
244
-		58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RCTWKWebView" */ = {
245
-			isa = XCConfigurationList;
246
-			buildConfigurations = (
247
-				58B511ED1A9E6C8500147676 /* Debug */,
248
-				58B511EE1A9E6C8500147676 /* Release */,
249
-			);
250
-			defaultConfigurationIsVisible = 0;
251
-			defaultConfigurationName = Release;
252
-		};
253
-		58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RCTWKWebView" */ = {
254
-			isa = XCConfigurationList;
255
-			buildConfigurations = (
256
-				58B511F01A9E6C8500147676 /* Debug */,
257
-				58B511F11A9E6C8500147676 /* Release */,
258
-			);
259
-			defaultConfigurationIsVisible = 0;
260
-			defaultConfigurationName = Release;
261
-		};
262
-/* End XCConfigurationList section */
263
-	};
264
-	rootObject = 58B511D31A9E6C8500147676 /* Project object */;
265
-}

+ 0
- 9
ios/archive/RCTWKWebView.xcworkspace/contents.xcworkspacedata 파일 보기

@@ -1,9 +0,0 @@
1
-// !$*UTF8*$!
2
-<?xml version="1.0" encoding="UTF-8"?>
3
-<Workspace
4
-   version = "1.0">
5
-   <FileRef
6
-      location = "group:RCTWKWebView.xcodeproj">
7
-   </FileRef>
8
-</Workspace>
9
-  

+ 0
- 24
ios/archive/RNCWebView.podspec 파일 보기

@@ -1,24 +0,0 @@
1
-
2
-Pod::Spec.new do |s|
3
-  s.name         = "RNCWebView"
4
-  s.version      = "1.0.0"
5
-  s.summary      = "RNCWebView"
6
-  s.description  = <<-DESC
7
-                  RNCWebView
8
-                   DESC
9
-  s.homepage     = ""
10
-  s.license      = "MIT"
11
-  # s.license      = { :type => "MIT", :file => "FILE_LICENSE" }
12
-  s.author             = { "author" => "author@domain.cn" }
13
-  s.platform     = :ios, "7.0"
14
-  s.source       = { :git => "https://github.com/author/RNCWebView.git", :tag => "master" }
15
-  s.source_files  = "RNCWebView/**/*.{h,m}"
16
-  s.requires_arc = true
17
-
18
-
19
-  s.dependency "React"
20
-  #s.dependency "others"
21
-
22
-end
23
-
24
-  

+ 0
- 5
ios/archive/RNCWebViewManager.h 파일 보기

@@ -1,5 +0,0 @@
1
-#import <React/RCTViewManager.h>
2
-
3
-@interface RNCWebViewManager : RCTViewManager
4
-
5
-@end

+ 2
- 2
js/WebView.ios.js 파일 보기

@@ -42,7 +42,7 @@ function processDecelerationRate(decelerationRate) {
42 42
   return decelerationRate;
43 43
 }
44 44
 
45
-const RCTWebViewManager = NativeModules.WKWebViewManager;
45
+const RCTUIWebViewManager = NativeModules.UIWebViewManager;
46 46
 const RCTWKWebViewManager = NativeModules.WKWebViewManager;
47 47
 
48 48
 const BGWASH = 'rgba(255,255,255,0.8)';
@@ -193,7 +193,7 @@ class WebView extends React.Component {
193 193
     if (this.props.useWebKit) {
194 194
       viewManager = viewManager || RCTWKWebViewManager;
195 195
     } else {
196
-      viewManager = viewManager || RCTWebViewManager;
196
+      viewManager = viewManager || RCTUIWebViewManager;
197 197
     }
198 198
 
199 199
     const compiledWhitelist = [