Explorar el Código

support native module ios dev environment

matrixbirds hace 5 años
padre
commit
dfd2fecf2a

+ 4
- 0
.gitignore Ver fichero

@@ -66,3 +66,7 @@ lib
66 66
 *.zip
67 67
 .byebug_history
68 68
 Untitled*
69
+Pods
70
+**/*~
71
+xcuserdata*
72
+**/*/xcuserdata*

+ 4
- 0
.npmignore Ver fichero

@@ -20,3 +20,7 @@ config.gypi
20 20
 CVS
21 21
 npm-debug.log
22 22
 node_modules
23
+ios/Pods
24
+ios/Podfile*
25
+xcuserdata*
26
+**/*/xcuserdata*

+ 12
- 0
ios/Podfile Ver fichero

@@ -0,0 +1,12 @@
1
+platform :ios, '9.0'
2
+react_native_path = "../node_modules/react-native"
3
+project "RCTAgora.xcodeproj"
4
+
5
+target 'RCTAgora' do
6
+  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
7
+  # use_frameworks!
8
+
9
+  pod 'react-native-agora', path: '../react-native-agora.podspec'
10
+  pod 'yoga', path: '../node_modules/react-native/ReactCommon/yoga/Yoga.podspec'
11
+  pod 'React', path: '../node_modules/react-native'
12
+end

+ 41
- 0
ios/Podfile.lock Ver fichero

@@ -0,0 +1,41 @@
1
+PODS:
2
+  - AgoraRtcEngine_iOS (2.3.3)
3
+  - React (0.58.3):
4
+    - React/Core (= 0.58.3)
5
+  - react-native-agora (2.3.3):
6
+    - AgoraRtcEngine_iOS (= 2.3.3)
7
+    - React
8
+    - react-native-agora/AgoraRtcCryptoLoader (= 2.3.3)
9
+  - react-native-agora/AgoraRtcCryptoLoader (2.3.3):
10
+    - AgoraRtcEngine_iOS (= 2.3.3)
11
+    - React
12
+  - React/Core (0.58.3):
13
+    - yoga (= 0.58.3.React)
14
+  - yoga (0.58.3.React)
15
+
16
+DEPENDENCIES:
17
+  - React (from `../node_modules/react-native`)
18
+  - react-native-agora (from `../react-native-agora.podspec`)
19
+  - yoga (from `../node_modules/react-native/ReactCommon/yoga/Yoga.podspec`)
20
+
21
+SPEC REPOS:
22
+  https://github.com/cocoapods/specs.git:
23
+    - AgoraRtcEngine_iOS
24
+
25
+EXTERNAL SOURCES:
26
+  React:
27
+    :path: "../node_modules/react-native"
28
+  react-native-agora:
29
+    :path: "../react-native-agora.podspec"
30
+  yoga:
31
+    :path: "../node_modules/react-native/ReactCommon/yoga/Yoga.podspec"
32
+
33
+SPEC CHECKSUMS:
34
+  AgoraRtcEngine_iOS: 8ad4b58dafed2cec5df03fa1f0ddbdad2c9ff958
35
+  React: 9b873b38b92ed8012d7cdf3b965477095ed364c4
36
+  react-native-agora: ad538661771e745fac8920412002e0e90903bbc8
37
+  yoga: 0885622311729a02c2bc02dca97167787a51488b
38
+
39
+PODFILE CHECKSUM: c44eb1b552e841acb746a3b74d0dfd53b6349e56
40
+
41
+COCOAPODS: 1.5.3

+ 48
- 0
ios/RCTAgora.xcodeproj/project.pbxproj Ver fichero

@@ -15,6 +15,7 @@
15 15
 		23C20DD11F0A6ED80095F60C /* AgoraConst.m in Sources */ = {isa = PBXBuildFile; fileRef = 23C20DCC1F0A6ED80095F60C /* AgoraConst.m */; };
16 16
 		23C20DD21F0A6ED80095F60C /* RCTAgoraVideoView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23C20DCE1F0A6ED80095F60C /* RCTAgoraVideoView.m */; };
17 17
 		23C20DD31F0A6ED80095F60C /* RCTAgoraViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 23C20DD01F0A6ED80095F60C /* RCTAgoraViewManager.m */; };
18
+		A5E11A595539F6638D9619C2 /* libPods-RCTAgora.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C2FCBA90F5ADC578F5914ABD /* libPods-RCTAgora.a */; };
18 19
 /* End PBXBuildFile section */
19 20
 
20 21
 /* Begin PBXCopyFilesBuildPhase section */
@@ -43,6 +44,9 @@
43 44
 		23C20DCE1F0A6ED80095F60C /* RCTAgoraVideoView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTAgoraVideoView.m; sourceTree = "<group>"; };
44 45
 		23C20DCF1F0A6ED80095F60C /* RCTAgoraViewManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTAgoraViewManager.h; sourceTree = "<group>"; };
45 46
 		23C20DD01F0A6ED80095F60C /* RCTAgoraViewManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTAgoraViewManager.m; sourceTree = "<group>"; };
47
+		490A35EA6380B5E4C44524D5 /* Pods-RCTAgora.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RCTAgora.release.xcconfig"; path = "Pods/Target Support Files/Pods-RCTAgora/Pods-RCTAgora.release.xcconfig"; sourceTree = "<group>"; };
48
+		C0B631272109DCDA602914D3 /* Pods-RCTAgora.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RCTAgora.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RCTAgora/Pods-RCTAgora.debug.xcconfig"; sourceTree = "<group>"; };
49
+		C2FCBA90F5ADC578F5914ABD /* libPods-RCTAgora.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RCTAgora.a"; sourceTree = BUILT_PRODUCTS_DIR; };
46 50
 /* End PBXFileReference section */
47 51
 
48 52
 /* Begin PBXFrameworksBuildPhase section */
@@ -53,6 +57,7 @@
53 57
 				08B28CF72211239F00E57CEB /* AgoraRtcEngineKit.framework in Frameworks */,
54 58
 				085CF7D82204A7B7002075D5 /* libcrypto.a in Frameworks */,
55 59
 				085CF7D72204A7B7002075D5 /* AgoraRtcCryptoLoader.framework in Frameworks */,
60
+				A5E11A595539F6638D9619C2 /* libPods-RCTAgora.a in Frameworks */,
56 61
 			);
57 62
 			runOnlyForDeploymentPostprocessing = 0;
58 63
 		};
@@ -72,6 +77,7 @@
72 77
 			isa = PBXGroup;
73 78
 			children = (
74 79
 				08B28CF62211239F00E57CEB /* AgoraRtcEngineKit.framework */,
80
+				C2FCBA90F5ADC578F5914ABD /* libPods-RCTAgora.a */,
75 81
 			);
76 82
 			name = Frameworks;
77 83
 			sourceTree = "<group>";
@@ -82,6 +88,7 @@
82 88
 				23AF281E1EEFECD800D771AB /* RCTAgora */,
83 89
 				23AF281D1EEFECD800D771AB /* Products */,
84 90
 				08B28CF52211239F00E57CEB /* Frameworks */,
91
+				A255C129D266B0FA939457B2 /* Pods */,
85 92
 			);
86 93
 			sourceTree = "<group>";
87 94
 		};
@@ -109,6 +116,15 @@
109 116
 			path = RCTAgora;
110 117
 			sourceTree = "<group>";
111 118
 		};
119
+		A255C129D266B0FA939457B2 /* Pods */ = {
120
+			isa = PBXGroup;
121
+			children = (
122
+				C0B631272109DCDA602914D3 /* Pods-RCTAgora.debug.xcconfig */,
123
+				490A35EA6380B5E4C44524D5 /* Pods-RCTAgora.release.xcconfig */,
124
+			);
125
+			name = Pods;
126
+			sourceTree = "<group>";
127
+		};
112 128
 /* End PBXGroup section */
113 129
 
114 130
 /* Begin PBXNativeTarget section */
@@ -116,6 +132,7 @@
116 132
 			isa = PBXNativeTarget;
117 133
 			buildConfigurationList = 23AF28251EEFECD800D771AB /* Build configuration list for PBXNativeTarget "RCTAgora" */;
118 134
 			buildPhases = (
135
+				B3851A406998F536E1F7EE0E /* [CP] Check Pods Manifest.lock */,
119 136
 				23AF28181EEFECD800D771AB /* Sources */,
120 137
 				23AF28191EEFECD800D771AB /* Frameworks */,
121 138
 				23AF281A1EEFECD800D771AB /* CopyFiles */,
@@ -162,6 +179,31 @@
162 179
 		};
163 180
 /* End PBXProject section */
164 181
 
182
+/* Begin PBXShellScriptBuildPhase section */
183
+		B3851A406998F536E1F7EE0E /* [CP] Check Pods Manifest.lock */ = {
184
+			isa = PBXShellScriptBuildPhase;
185
+			buildActionMask = 2147483647;
186
+			files = (
187
+			);
188
+			inputFileListPaths = (
189
+			);
190
+			inputPaths = (
191
+				"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
192
+				"${PODS_ROOT}/Manifest.lock",
193
+			);
194
+			name = "[CP] Check Pods Manifest.lock";
195
+			outputFileListPaths = (
196
+			);
197
+			outputPaths = (
198
+				"$(DERIVED_FILE_DIR)/Pods-RCTAgora-checkManifestLockResult.txt",
199
+			);
200
+			runOnlyForDeploymentPostprocessing = 0;
201
+			shellPath = /bin/sh;
202
+			shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
203
+			showEnvVarsInLog = 0;
204
+		};
205
+/* End PBXShellScriptBuildPhase section */
206
+
165 207
 /* Begin PBXSourcesBuildPhase section */
166 208
 		23AF28181EEFECD800D771AB /* Sources */ = {
167 209
 			isa = PBXSourcesBuildPhase;
@@ -287,6 +329,7 @@
287 329
 		};
288 330
 		23AF28261EEFECD800D771AB /* Debug */ = {
289 331
 			isa = XCBuildConfiguration;
332
+			baseConfigurationReference = C0B631272109DCDA602914D3 /* Pods-RCTAgora.debug.xcconfig */;
290 333
 			buildSettings = {
291 334
 				DEVELOPMENT_TEAM = 342K4Q49RK;
292 335
 				ENABLE_BITCODE = YES;
@@ -294,6 +337,7 @@
294 337
 					"$(inherited)",
295 338
 					"$(SRCROOT)/../../../ios/Pods/**",
296 339
 					"$(PROJECT_DIR)/RCTAgora/libs/**",
340
+					"$(PROJECT_DIR)/Pods/**",
297 341
 				);
298 342
 				HEADER_SEARCH_PATHS = (
299 343
 					"$(inherited)",
@@ -306,6 +350,7 @@
306 350
 					"$(PROJECT_DIR)",
307 351
 					"$(SRCROOT)/../../../ios/Pods/**",
308 352
 					"$(PROJECT_DIR)/RCTAgora/libs/**",
353
+					"$(PROJECT_DIR)/Pods/**",
309 354
 				);
310 355
 				OTHER_LDFLAGS = "-ObjC";
311 356
 				PRODUCT_NAME = "$(TARGET_NAME)";
@@ -315,6 +360,7 @@
315 360
 		};
316 361
 		23AF28271EEFECD800D771AB /* Release */ = {
317 362
 			isa = XCBuildConfiguration;
363
+			baseConfigurationReference = 490A35EA6380B5E4C44524D5 /* Pods-RCTAgora.release.xcconfig */;
318 364
 			buildSettings = {
319 365
 				DEVELOPMENT_TEAM = 342K4Q49RK;
320 366
 				ENABLE_BITCODE = YES;
@@ -322,6 +368,7 @@
322 368
 					"$(inherited)",
323 369
 					"$(SRCROOT)/../../../ios/Pods/**",
324 370
 					"$(PROJECT_DIR)/RCTAgora/libs/**",
371
+					"$(PROJECT_DIR)/Pods/**",
325 372
 				);
326 373
 				HEADER_SEARCH_PATHS = (
327 374
 					"$(inherited)",
@@ -334,6 +381,7 @@
334 381
 					"$(PROJECT_DIR)",
335 382
 					"$(SRCROOT)/../../../ios/Pods/**",
336 383
 					"$(PROJECT_DIR)/RCTAgora/libs/**",
384
+					"$(PROJECT_DIR)/Pods/**",
337 385
 				);
338 386
 				OTHER_LDFLAGS = "-ObjC";
339 387
 				PRODUCT_NAME = "$(TARGET_NAME)";

BIN
ios/RCTAgora.xcodeproj/project.xcworkspace/xcuserdata/ly.xcuserdatad/UserInterfaceState.xcuserstate Ver fichero


+ 0
- 14
ios/RCTAgora.xcodeproj/xcuserdata/ly.xcuserdatad/xcschemes/xcschememanagement.plist Ver fichero

@@ -1,14 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
-<plist version="1.0">
4
-<dict>
5
-	<key>SchemeUserState</key>
6
-	<dict>
7
-		<key>RCTAgora.xcscheme_^#shared#^_</key>
8
-		<dict>
9
-			<key>orderHint</key>
10
-			<integer>0</integer>
11
-		</dict>
12
-	</dict>
13
-</dict>
14
-</plist>

+ 2
- 2
ios/RCTAgora/RCTAgora.m Ver fichero

@@ -954,7 +954,7 @@ RCT_EXPORT_METHOD(startEchoTest
954 954
                   :(RCTPromiseResolveBlock)resolve
955 955
                   reject:(RCTPromiseRejectBlock)reject) {
956 956
   NSInteger res = [self.rtcEngine startEchoTest:^(NSString * _Nonnull channel, NSUInteger uid, NSInteger elapsed) {
957
-    sender(@{
957
+    _block(@{
958 958
              @"channel": channel,
959 959
              @"uid": @(uid),
960 960
              @"elapsed": @(elapsed)
@@ -1491,7 +1491,7 @@ RCT_EXPORT_METHOD(setCameraAutoFocusFaceModeEnabled:(BOOL)enable
1491 1491
 
1492 1492
 // getCallId
1493 1493
 RCT_EXPORT_METHOD(getCallId
1494
-                  :(RCTPromiseResolveBlock)resolve)
1494
+                  :(RCTPromiseResolveBlock)resolve
1495 1495
                   reject:(RCTPromiseRejectBlock)reject) {
1496 1496
   resolve(@{
1497 1497
             @"success": @(YES),

+ 0
- 1
ios/RCTAgora/RCTAgoraViewManager.h Ver fichero

@@ -8,7 +8,6 @@
8 8
 
9 9
 #import <React/RCTViewManager.h>
10 10
 
11
-
12 11
 @interface RCTAgoraViewManager : RCTViewManager
13 12
 
14 13
 @end