浏览代码

support native module ios dev environment

matrixbirds 5 年前
父节点
当前提交
dfd2fecf2a

+ 4
- 0
.gitignore 查看文件

66
 *.zip
66
 *.zip
67
 .byebug_history
67
 .byebug_history
68
 Untitled*
68
 Untitled*
69
+Pods
70
+**/*~
71
+xcuserdata*
72
+**/*/xcuserdata*

+ 4
- 0
.npmignore 查看文件

20
 CVS
20
 CVS
21
 npm-debug.log
21
 npm-debug.log
22
 node_modules
22
 node_modules
23
+ios/Pods
24
+ios/Podfile*
25
+xcuserdata*
26
+**/*/xcuserdata*

+ 12
- 0
ios/Podfile 查看文件

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 查看文件

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 查看文件

15
 		23C20DD11F0A6ED80095F60C /* AgoraConst.m in Sources */ = {isa = PBXBuildFile; fileRef = 23C20DCC1F0A6ED80095F60C /* AgoraConst.m */; };
15
 		23C20DD11F0A6ED80095F60C /* AgoraConst.m in Sources */ = {isa = PBXBuildFile; fileRef = 23C20DCC1F0A6ED80095F60C /* AgoraConst.m */; };
16
 		23C20DD21F0A6ED80095F60C /* RCTAgoraVideoView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23C20DCE1F0A6ED80095F60C /* RCTAgoraVideoView.m */; };
16
 		23C20DD21F0A6ED80095F60C /* RCTAgoraVideoView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23C20DCE1F0A6ED80095F60C /* RCTAgoraVideoView.m */; };
17
 		23C20DD31F0A6ED80095F60C /* RCTAgoraViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 23C20DD01F0A6ED80095F60C /* RCTAgoraViewManager.m */; };
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
 /* End PBXBuildFile section */
19
 /* End PBXBuildFile section */
19
 
20
 
20
 /* Begin PBXCopyFilesBuildPhase section */
21
 /* Begin PBXCopyFilesBuildPhase section */
43
 		23C20DCE1F0A6ED80095F60C /* RCTAgoraVideoView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTAgoraVideoView.m; sourceTree = "<group>"; };
44
 		23C20DCE1F0A6ED80095F60C /* RCTAgoraVideoView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTAgoraVideoView.m; sourceTree = "<group>"; };
44
 		23C20DCF1F0A6ED80095F60C /* RCTAgoraViewManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTAgoraViewManager.h; sourceTree = "<group>"; };
45
 		23C20DCF1F0A6ED80095F60C /* RCTAgoraViewManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTAgoraViewManager.h; sourceTree = "<group>"; };
45
 		23C20DD01F0A6ED80095F60C /* RCTAgoraViewManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTAgoraViewManager.m; sourceTree = "<group>"; };
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
 /* End PBXFileReference section */
50
 /* End PBXFileReference section */
47
 
51
 
48
 /* Begin PBXFrameworksBuildPhase section */
52
 /* Begin PBXFrameworksBuildPhase section */
53
 				08B28CF72211239F00E57CEB /* AgoraRtcEngineKit.framework in Frameworks */,
57
 				08B28CF72211239F00E57CEB /* AgoraRtcEngineKit.framework in Frameworks */,
54
 				085CF7D82204A7B7002075D5 /* libcrypto.a in Frameworks */,
58
 				085CF7D82204A7B7002075D5 /* libcrypto.a in Frameworks */,
55
 				085CF7D72204A7B7002075D5 /* AgoraRtcCryptoLoader.framework in Frameworks */,
59
 				085CF7D72204A7B7002075D5 /* AgoraRtcCryptoLoader.framework in Frameworks */,
60
+				A5E11A595539F6638D9619C2 /* libPods-RCTAgora.a in Frameworks */,
56
 			);
61
 			);
57
 			runOnlyForDeploymentPostprocessing = 0;
62
 			runOnlyForDeploymentPostprocessing = 0;
58
 		};
63
 		};
72
 			isa = PBXGroup;
77
 			isa = PBXGroup;
73
 			children = (
78
 			children = (
74
 				08B28CF62211239F00E57CEB /* AgoraRtcEngineKit.framework */,
79
 				08B28CF62211239F00E57CEB /* AgoraRtcEngineKit.framework */,
80
+				C2FCBA90F5ADC578F5914ABD /* libPods-RCTAgora.a */,
75
 			);
81
 			);
76
 			name = Frameworks;
82
 			name = Frameworks;
77
 			sourceTree = "<group>";
83
 			sourceTree = "<group>";
82
 				23AF281E1EEFECD800D771AB /* RCTAgora */,
88
 				23AF281E1EEFECD800D771AB /* RCTAgora */,
83
 				23AF281D1EEFECD800D771AB /* Products */,
89
 				23AF281D1EEFECD800D771AB /* Products */,
84
 				08B28CF52211239F00E57CEB /* Frameworks */,
90
 				08B28CF52211239F00E57CEB /* Frameworks */,
91
+				A255C129D266B0FA939457B2 /* Pods */,
85
 			);
92
 			);
86
 			sourceTree = "<group>";
93
 			sourceTree = "<group>";
87
 		};
94
 		};
109
 			path = RCTAgora;
116
 			path = RCTAgora;
110
 			sourceTree = "<group>";
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
 /* End PBXGroup section */
128
 /* End PBXGroup section */
113
 
129
 
114
 /* Begin PBXNativeTarget section */
130
 /* Begin PBXNativeTarget section */
116
 			isa = PBXNativeTarget;
132
 			isa = PBXNativeTarget;
117
 			buildConfigurationList = 23AF28251EEFECD800D771AB /* Build configuration list for PBXNativeTarget "RCTAgora" */;
133
 			buildConfigurationList = 23AF28251EEFECD800D771AB /* Build configuration list for PBXNativeTarget "RCTAgora" */;
118
 			buildPhases = (
134
 			buildPhases = (
135
+				B3851A406998F536E1F7EE0E /* [CP] Check Pods Manifest.lock */,
119
 				23AF28181EEFECD800D771AB /* Sources */,
136
 				23AF28181EEFECD800D771AB /* Sources */,
120
 				23AF28191EEFECD800D771AB /* Frameworks */,
137
 				23AF28191EEFECD800D771AB /* Frameworks */,
121
 				23AF281A1EEFECD800D771AB /* CopyFiles */,
138
 				23AF281A1EEFECD800D771AB /* CopyFiles */,
162
 		};
179
 		};
163
 /* End PBXProject section */
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
 /* Begin PBXSourcesBuildPhase section */
207
 /* Begin PBXSourcesBuildPhase section */
166
 		23AF28181EEFECD800D771AB /* Sources */ = {
208
 		23AF28181EEFECD800D771AB /* Sources */ = {
167
 			isa = PBXSourcesBuildPhase;
209
 			isa = PBXSourcesBuildPhase;
287
 		};
329
 		};
288
 		23AF28261EEFECD800D771AB /* Debug */ = {
330
 		23AF28261EEFECD800D771AB /* Debug */ = {
289
 			isa = XCBuildConfiguration;
331
 			isa = XCBuildConfiguration;
332
+			baseConfigurationReference = C0B631272109DCDA602914D3 /* Pods-RCTAgora.debug.xcconfig */;
290
 			buildSettings = {
333
 			buildSettings = {
291
 				DEVELOPMENT_TEAM = 342K4Q49RK;
334
 				DEVELOPMENT_TEAM = 342K4Q49RK;
292
 				ENABLE_BITCODE = YES;
335
 				ENABLE_BITCODE = YES;
294
 					"$(inherited)",
337
 					"$(inherited)",
295
 					"$(SRCROOT)/../../../ios/Pods/**",
338
 					"$(SRCROOT)/../../../ios/Pods/**",
296
 					"$(PROJECT_DIR)/RCTAgora/libs/**",
339
 					"$(PROJECT_DIR)/RCTAgora/libs/**",
340
+					"$(PROJECT_DIR)/Pods/**",
297
 				);
341
 				);
298
 				HEADER_SEARCH_PATHS = (
342
 				HEADER_SEARCH_PATHS = (
299
 					"$(inherited)",
343
 					"$(inherited)",
306
 					"$(PROJECT_DIR)",
350
 					"$(PROJECT_DIR)",
307
 					"$(SRCROOT)/../../../ios/Pods/**",
351
 					"$(SRCROOT)/../../../ios/Pods/**",
308
 					"$(PROJECT_DIR)/RCTAgora/libs/**",
352
 					"$(PROJECT_DIR)/RCTAgora/libs/**",
353
+					"$(PROJECT_DIR)/Pods/**",
309
 				);
354
 				);
310
 				OTHER_LDFLAGS = "-ObjC";
355
 				OTHER_LDFLAGS = "-ObjC";
311
 				PRODUCT_NAME = "$(TARGET_NAME)";
356
 				PRODUCT_NAME = "$(TARGET_NAME)";
315
 		};
360
 		};
316
 		23AF28271EEFECD800D771AB /* Release */ = {
361
 		23AF28271EEFECD800D771AB /* Release */ = {
317
 			isa = XCBuildConfiguration;
362
 			isa = XCBuildConfiguration;
363
+			baseConfigurationReference = 490A35EA6380B5E4C44524D5 /* Pods-RCTAgora.release.xcconfig */;
318
 			buildSettings = {
364
 			buildSettings = {
319
 				DEVELOPMENT_TEAM = 342K4Q49RK;
365
 				DEVELOPMENT_TEAM = 342K4Q49RK;
320
 				ENABLE_BITCODE = YES;
366
 				ENABLE_BITCODE = YES;
322
 					"$(inherited)",
368
 					"$(inherited)",
323
 					"$(SRCROOT)/../../../ios/Pods/**",
369
 					"$(SRCROOT)/../../../ios/Pods/**",
324
 					"$(PROJECT_DIR)/RCTAgora/libs/**",
370
 					"$(PROJECT_DIR)/RCTAgora/libs/**",
371
+					"$(PROJECT_DIR)/Pods/**",
325
 				);
372
 				);
326
 				HEADER_SEARCH_PATHS = (
373
 				HEADER_SEARCH_PATHS = (
327
 					"$(inherited)",
374
 					"$(inherited)",
334
 					"$(PROJECT_DIR)",
381
 					"$(PROJECT_DIR)",
335
 					"$(SRCROOT)/../../../ios/Pods/**",
382
 					"$(SRCROOT)/../../../ios/Pods/**",
336
 					"$(PROJECT_DIR)/RCTAgora/libs/**",
383
 					"$(PROJECT_DIR)/RCTAgora/libs/**",
384
+					"$(PROJECT_DIR)/Pods/**",
337
 				);
385
 				);
338
 				OTHER_LDFLAGS = "-ObjC";
386
 				OTHER_LDFLAGS = "-ObjC";
339
 				PRODUCT_NAME = "$(TARGET_NAME)";
387
 				PRODUCT_NAME = "$(TARGET_NAME)";

二进制
ios/RCTAgora.xcodeproj/project.xcworkspace/xcuserdata/ly.xcuserdatad/UserInterfaceState.xcuserstate 查看文件


+ 0
- 14
ios/RCTAgora.xcodeproj/xcuserdata/ly.xcuserdatad/xcschemes/xcschememanagement.plist 查看文件

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 查看文件

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

+ 0
- 1
ios/RCTAgora/RCTAgoraViewManager.h 查看文件

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