Kaynağa Gözat

fix. iOS demo

matrixbirds 5 yıl önce
ebeveyn
işleme
ff71bbca87

+ 1
- 0
.gitignore Dosyayı Görüntüle

@@ -65,3 +65,4 @@ lib
65 65
 *.xcworkspace
66 66
 *.zip
67 67
 .byebug_history
68
+Untitled*

+ 1
- 0
.npmignore Dosyayı Görüntüle

@@ -19,3 +19,4 @@ docs
19 19
 config.gypi
20 20
 CVS
21 21
 npm-debug.log
22
+node_modules

+ 16
- 0
ios/RCTAgora.xcodeproj/project.pbxproj Dosyayı Görüntüle

@@ -290,13 +290,21 @@
290 290
 			buildSettings = {
291 291
 				DEVELOPMENT_TEAM = 342K4Q49RK;
292 292
 				ENABLE_BITCODE = YES;
293
+				FRAMEWORK_SEARCH_PATHS = (
294
+					"$(inherited)",
295
+					"$(SRCROOT)/../../../ios/Pods/**",
296
+					"$(PROJECT_DIR)/RCTAgora/libs/**",
297
+				);
293 298
 				HEADER_SEARCH_PATHS = (
299
+					"$(inherited)",
294 300
 					"\"$(SRCROOT)/../../react-native/React\"/**",
295 301
 					"\"$(SRCROOT)/../../react-native/Libraries\"/**",
302
+					"$(SRCROOT)/../../../ios/Pods/**",
296 303
 				);
297 304
 				LIBRARY_SEARCH_PATHS = (
298 305
 					"$(inherited)",
299 306
 					"$(PROJECT_DIR)",
307
+					"$(SRCROOT)/../../../ios/Pods/**",
300 308
 					"$(PROJECT_DIR)/RCTAgora/libs/**",
301 309
 				);
302 310
 				OTHER_LDFLAGS = "-ObjC";
@@ -310,13 +318,21 @@
310 318
 			buildSettings = {
311 319
 				DEVELOPMENT_TEAM = 342K4Q49RK;
312 320
 				ENABLE_BITCODE = YES;
321
+				FRAMEWORK_SEARCH_PATHS = (
322
+					"$(inherited)",
323
+					"$(SRCROOT)/../../../ios/Pods/**",
324
+					"$(PROJECT_DIR)/RCTAgora/libs/**",
325
+				);
313 326
 				HEADER_SEARCH_PATHS = (
327
+					"$(inherited)",
314 328
 					"\"$(SRCROOT)/../../react-native/React\"/**",
315 329
 					"\"$(SRCROOT)/../../react-native/Libraries\"/**",
330
+					"$(SRCROOT)/../../../ios/Pods/**",
316 331
 				);
317 332
 				LIBRARY_SEARCH_PATHS = (
318 333
 					"$(inherited)",
319 334
 					"$(PROJECT_DIR)",
335
+					"$(SRCROOT)/../../../ios/Pods/**",
320 336
 					"$(PROJECT_DIR)/RCTAgora/libs/**",
321 337
 				);
322 338
 				OTHER_LDFLAGS = "-ObjC";

BIN
ios/RCTAgora.xcodeproj/project.xcworkspace/xcuserdata/ly.xcuserdatad/UserInterfaceState.xcuserstate Dosyayı Görüntüle


+ 1
- 1
ios/RCTAgora.xcodeproj/xcuserdata/ly.xcuserdatad/xcschemes/xcschememanagement.plist Dosyayı Görüntüle

@@ -7,7 +7,7 @@
7 7
 		<key>RCTAgora.xcscheme_^#shared#^_</key>
8 8
 		<dict>
9 9
 			<key>orderHint</key>
10
-			<integer>8</integer>
10
+			<integer>0</integer>
11 11
 		</dict>
12 12
 	</dict>
13 13
 </dict>

+ 42
- 42
ios/RCTAgora/AgoraConst.h Dosyayı Görüntüle

@@ -10,50 +10,50 @@
10 10
 
11 11
 static NSString *RCTAgoraErrorDomain = @"RCTAgoraErrorDomain";
12 12
 
13
-static NSString *DidOccurWarning = @"DidOccurWarning";
14
-static NSString *DidOccurError = @"DidOccurError";
15
-static NSString *DidApiCallExecute = @"DidApiCallExecute";
16
-static NSString *DidJoinChannel = @"DidJoinChannel";
17
-static NSString *DidRejoinChannel = @"DidRejoinChannel";
18
-static NSString *DidLeaveChannel = @"DidLeaveChannel";
19
-static NSString *DidClientRoleChanged = @"DidClientRoleChanged";
20
-static NSString *DidJoinedOfUid = @"DidJoinedOfUid";
21
-static NSString *DidOfflineOfUid = @"DidOfflineOfUid";
22
-static NSString *ConnectionChangedToState = @"ConnectionChangedToState";
23
-static NSString *ConnectionDidLost = @"ConnectionDidLost";
24
-static NSString *TokenPrivilegeWillExpire = @"T=okenPrivilegeWillExpire";
25
-static NSString *RequestToken = @"RequestToken";
26
-
27
-static NSString *DidMicrophoneEnabled = @"DidMicrophoneEnabled";
28
-static NSString *ReportAudioVolumeIndicationOfSpeakers = @"ReportAudioVolumeIndicationOfSpeakers";
29
-static NSString *ActiveSpeaker = @"ActiveSpeaker";
30
-static NSString *FirstLocalAudioFrame = @"FirstLocalAudioFrame";
31
-static NSString *FirstRemoteAudioFrameOfUid = @"FirstRemoteAudioFrameOfUid";
32
-static NSString *VideoDidStop = @"VideoDidStop";
33
-static NSString *FirstLocalVideoFrameWithSize = @"FirstLocalVideoFrameWithSize";
34
-static NSString *FirstRemoteVideoDecodedOfUid = @"FirstRemoteVideoDecodedOfUid";
35
-static NSString *FirstRemoteVideoFrameOfUid = @"FirstRemoteVideoFrameOfUid";
36
-static NSString *DidAudioMuted = @"DidAudioMuted";
37
-static NSString *DidVideoMuted = @"DidVideoMuted";
38
-static NSString *DidVideoEnabled = @"DidVideoEnabled";
39
-static NSString *DidLocalVideoEnabled = @"DidLocalVideoEnabled";
40
-static NSString *VideoSizeChangedOfUid = @"VideoSizeChangedOfUid";
41
-static NSString *RemoteVideoStateChangedOfUid = @"RemoteVideoStateChangedOfUid";
42
-static NSString *DidLocalPublishFallbackToAudioOnly = @"DidLocalPublishFallbackToAudioOnly";
43
-static NSString *DidRemoteSubscribeFallbackToAudioOnly = @"DidRemoteSubscribeFallbackToAudioOnly";
13
+static NSString *DidOccurWarning = @"onWarning";
14
+static NSString *DidOccurError = @"onError";
15
+static NSString *DidApiCallExecute = @"onApiCallExecute";
16
+static NSString *DidJoinChannel = @"onJoinChannelSuccess";
17
+static NSString *DidRejoinChannel = @"onRejoinChannelSuccess";
18
+static NSString *DidLeaveChannel = @"onLeaveChannel";
19
+static NSString *DidClientRoleChanged = @"onClientRoleChanged";
20
+static NSString *DidJoinedOfUid = @"onUserJoined";
21
+static NSString *DidOfflineOfUid = @"onUserOffline";
22
+static NSString *ConnectionChangedToState = @"onConnectionStateChanged";
23
+static NSString *ConnectionDidLost = @"onConnectionLost";
24
+static NSString *TokenPrivilegeWillExpire = @"onTokenPrivilegeWillExpire";
25
+static NSString *RequestToken = @"onRequestToken";
26
+
27
+static NSString *DidMicrophoneEnabled = @"onMicrophoneEnabled";
28
+static NSString *ReportAudioVolumeIndicationOfSpeakers = @"onAudioVolumeIndication";
29
+static NSString *ActiveSpeaker = @"onActiveSpeaker";
30
+static NSString *FirstLocalAudioFrame = @"onFirstLocalAudioFrame";
31
+static NSString *FirstRemoteAudioFrameOfUid = @"onFirstRemoteAudioFrame";
32
+static NSString *VideoDidStop = @"onVideoStopped";
33
+static NSString *FirstLocalVideoFrameWithSize = @"onFirstLocalVideoFrame";
34
+static NSString *FirstRemoteVideoDecodedOfUid = @"onFirstRemoteVideoDecoded";
35
+static NSString *FirstRemoteVideoFrameOfUid = @"onFirstRemoteVideoFrame";
36
+static NSString *DidAudioMuted = @"onUserMuteAudio";
37
+static NSString *DidVideoMuted = @"onUserMuteVideo";
38
+static NSString *DidVideoEnabled = @"onUserEnableVideo";
39
+static NSString *DidLocalVideoEnabled = @"onUserEnableLocalVideo";
40
+static NSString *VideoSizeChangedOfUid = @"onVideoSizeChanged";
41
+static NSString *RemoteVideoStateChangedOfUid = @"onRemoteVideoStateChanged";
42
+static NSString *DidLocalPublishFallbackToAudioOnly = @"onLocalPublishFallbackToAudioOnly";
43
+static NSString *DidRemoteSubscribeFallbackToAudioOnly = @"onRemoteSubscribeFallbackToAudioOnly";
44 44
 
45 45
 static NSString *DeviceTypeStateChanged = @"DeviceTypeStateChanged";
46
-static NSString *DidAudioRouteChanged = @"DidAudioRouteChanged";
47
-static NSString *CameraDidReady = @"CameraDidReady";
48
-static NSString *CameraFocusDidChangedToRect = @"CameraFocusDidChangedToRect";
49
-static NSString *CameraExposureDidChangedToRect = @"CameraExposureDidChangedToRect";
50
-
51
-static NSString *ReportRtcStats = @"ReportRtcStats";
52
-static NSString *LastmileQuality = @"LastmileQuality";
53
-static NSString *NetworkQuality = @"NetworkQuality";
54
-static NSString *LocalVideoStats = @"LocalVideoStats";
55
-static NSString *RemoteVideoStats = @"RemoteVideoStats";
56
-static NSString *RemoteAudioStats = @"RemoteAudioStats";
46
+static NSString *DidAudioRouteChanged = @"onAudioRouteChanged";
47
+static NSString *CameraDidReady = @"onCameraReady";
48
+static NSString *CameraFocusDidChangedToRect = @"onCameraFocusAreaChanged";
49
+static NSString *CameraExposureDidChangedToRect = @"onCameraExposureAreaChanged";
50
+
51
+static NSString *ReportRtcStats = @"onRtcStats";
52
+static NSString *LastmileQuality = @"onLastmileQuality";
53
+static NSString *NetworkQuality = @"onNetworkQuality";
54
+static NSString *LocalVideoStats = @"onLocalVideoStats";
55
+static NSString *RemoteVideoStats = @"onRemoteVideoStats";
56
+static NSString *RemoteAudioStats = @"onRemoteAudioStats";
57 57
 static NSString *AudioTransportStatsOfUid = @"AudioTransportStatsOfUid";
58 58
 static NSString *VideoTransportStatsOfUid = @"VideoTransportStatsOfUid";
59 59
 

+ 11
- 11
ios/RCTAgora/AgoraConst.m Dosyayı Görüntüle

@@ -12,23 +12,23 @@
12 12
 
13 13
 static AgoraConst *_person;
14 14
 + (instancetype)allocWithZone:(struct _NSZone *)zone{
15
-    static dispatch_once_t predicate;
16
-    dispatch_once(&predicate, ^{
17
-        _person = [super allocWithZone:zone];
18
-    });
19
-    return _person;
15
+  static dispatch_once_t predicate;
16
+  dispatch_once(&predicate, ^{
17
+    _person = [super allocWithZone:zone];
18
+  });
19
+  return _person;
20 20
 }
21 21
 
22 22
 + (instancetype)share {
23
-    static dispatch_once_t onceToken;
24
-    dispatch_once(&onceToken, ^{
25
-        _person = [[self alloc]init];
26
-    });
27
-    return _person;
23
+  static dispatch_once_t onceToken;
24
+  dispatch_once(&onceToken, ^{
25
+    _person = [[self alloc]init];
26
+  });
27
+  return _person;
28 28
 }
29 29
 
30 30
 - (id)copyWithZone:(NSZone *)zone {
31
-    return _person;
31
+  return _person;
32 32
 }
33 33
 
34 34
 @end

+ 104
- 82
ios/RCTAgora/RCTAgora.m Dosyayı Görüntüle

@@ -133,7 +133,7 @@ RCT_EXPORT_METHOD(init:(NSDictionary *)options) {
133 133
     }
134 134
   }
135 135
   
136
-  AgoraVideoEncoderConfiguration *video_encoder_config = [[AgoraVideoEncoderConfiguration init] initWithWidth:[options[@"videoEncoderConfig.width"] integerValue] height:[options[@"videoEncoderConfig.height"] integerValue] frameRate:(AgoraVideoFrameRate)[options[@"videoEncoderConfig.frameRate"] integerValue] bitrate:[options[@"videoEncoderConfig.bitrate"] integerValue] orientationMode: (AgoraVideoOutputOrientationMode)[options[@"videoEncoderCnofig.orientationMode"] integerValue]];
136
+  AgoraVideoEncoderConfiguration *video_encoder_config = [[AgoraVideoEncoderConfiguration new] initWithWidth:[options[@"videoEncoderConfig.width"] integerValue] height:[options[@"videoEncoderConfig.height"] integerValue] frameRate:(AgoraVideoFrameRate)[options[@"videoEncoderConfig.frameRate"] integerValue] bitrate:[options[@"videoEncoderConfig.bitrate"] integerValue] orientationMode: (AgoraVideoOutputOrientationMode)[options[@"videoEncoderCnofig.orientationMode"] integerValue]];
137 137
   [self.rtcEngine setVideoEncoderConfiguration:video_encoder_config];
138 138
   [self.rtcEngine setClientRole:(AgoraClientRole)[options[@"clientRole"] integerValue]];
139 139
   [self.rtcEngine setAudioProfile:(AgoraAudioProfile)[options[@"audioProfile"] integerValue]
@@ -144,7 +144,8 @@ RCT_EXPORT_METHOD(init:(NSDictionary *)options) {
144 144
 }
145 145
 
146 146
 // renew token
147
-RCT_EXPORT_METHOD(renewToken:(NSString *)token
147
+RCT_EXPORT_METHOD(renewToken
148
+                  :(NSString *)token
148 149
                   resolve:(RCTPromiseResolveBlock)resolve
149 150
                   reject:(RCTPromiseRejectBlock)reject) {
150 151
   NSInteger res = [self.rtcEngine renewToken:token];
@@ -180,7 +181,9 @@ RCT_EXPORT_METHOD(enableWebSdkInteroperability: (BOOL)enabled
180 181
 }
181 182
 
182 183
 // get agora connection state
183
-RCT_EXPORT_METHOD(getConnectionState: (RCTPromiseResolveBlock)resolve) {
184
+RCT_EXPORT_METHOD(getConnectionState
185
+                  :(RCTPromiseResolveBlock) resolve
186
+                  reject:(RCTPromiseRejectBlock) reject) {
184 187
   resolve(@{@"success": @(YES), @"state": @([self.rtcEngine getConnectionState])});
185 188
 }
186 189
 
@@ -190,9 +193,9 @@ RCT_EXPORT_METHOD(setClientRole:(NSString *) role) {
190 193
 }
191 194
 
192 195
 // join channel
193
-RCT_EXPORT_METHOD(joinChannel:(NSDictionary *) options:success) {
196
+RCT_EXPORT_METHOD(joinChannel:(NSDictionary *) options) {
194 197
   [AgoraConst share].localUid = [options[@"uid"] integerValue];
195
-  [self.rtcEngine joinChannelByToken:options[@"token"] channelId:options[@"channelId"] info:options[@"info"] uid:[AgoraConst share].localUid joinSuccess:nil];
198
+  [self.rtcEngine joinChannelByToken:options[@"token"] channelId:options[@"channelName"] info:options[@"info"] uid:[AgoraConst share].localUid joinSuccess:nil];
196 199
 }
197 200
 
198 201
 // leave channel
@@ -200,7 +203,7 @@ RCT_EXPORT_METHOD(leaveChannel
200 203
                   :(RCTPromiseResolveBlock) resolve
201 204
                   reject:(RCTPromiseRejectBlock) reject) {
202 205
   int res = [self.rtcEngine leaveChannel:^(AgoraChannelStats * _Nonnull stat) {
203
-    [self sendEvent:@"leaveChannel" params:@{
206
+    [self sendEvent:DidLeaveChannel params:@{
204 207
                                              @"message": @"leaveChannel",
205 208
                                              @"duration": @(stat.duration),
206 209
                                              @"txBytes": @(stat.txBytes),
@@ -215,7 +218,7 @@ RCT_EXPORT_METHOD(leaveChannel
215 218
                                              @"cpuTotalUsage": @(stat.cpuTotalUsage)
216 219
                                              }];
217 220
   }];
218
-  if (res < 0) {
221
+  if (res != 0) {
219 222
     reject(@"131038", @"leaveChannel failed", [self makeNSError:@{
220 223
                                                                   @"code": @(131038),
221 224
                                                                   @"message":@{
@@ -369,7 +372,10 @@ RCT_EXPORT_METHOD(enableAudioVolumeIndication: (NSInteger) interval smooth:(NSIn
369 372
 }
370 373
 
371 374
 // create data stream
372
-RCT_EXPORT_METHOD(createDataStream:(NSDictionary *)options resolve:(RCTPromiseResolveBlock)resolve) {
375
+RCT_EXPORT_METHOD(createDataStream
376
+                  :(NSDictionary *)options
377
+                  resolve:(RCTPromiseResolveBlock)resolve
378
+                  reject:(RCTPromiseRejectBlock)reject) {
373 379
   NSInteger streamId = 0;
374 380
   if (options[@"streamId"] != nil) {
375 381
     streamId = [options[@"streamId"] integerValue];
@@ -498,10 +504,11 @@ RCT_EXPORT_METHOD(adjustAudioMixingPublishVolume:(NSInteger) volume) {
498 504
 }
499 505
 
500 506
 // get audio mixing duration
501
-RCT_EXPORT_METHOD(getAudioMixingDuration: (RCTPromiseResolveBlock)resolve
507
+RCT_EXPORT_METHOD(getAudioMixingDuration
508
+                  : (RCTPromiseResolveBlock)resolve
502 509
                   reject:(RCTPromiseRejectBlock)reject) {
503 510
   NSInteger res = [self.rtcEngine getAudioMixingDuration];
504
-  if (res < 0) {
511
+  if (res != 0) {
505 512
     reject(@"131004", @"getAudioMixingDuration failed", [self makeNSError:@{
506 513
                                                                             @"code": @(131004),
507 514
                                                                             @"message":@{
@@ -518,10 +525,11 @@ RCT_EXPORT_METHOD(getAudioMixingDuration: (RCTPromiseResolveBlock)resolve
518 525
 }
519 526
 
520 527
 // get audio mixing current position
521
-RCT_EXPORT_METHOD(getAudioMixingCurrentPosition: (RCTPromiseResolveBlock)resolve
528
+RCT_EXPORT_METHOD(getAudioMixingCurrentPosition
529
+                  :(RCTPromiseResolveBlock)resolve
522 530
                   reject:(RCTPromiseRejectBlock)reject) {
523 531
   NSInteger res = [self.rtcEngine getAudioMixingDuration];
524
-  if (res < 0) {
532
+  if (res != 0) {
525 533
     reject(@"131005", @"getAudioMixingCurrentPosition failed", [self makeNSError:@{
526 534
                                                                                    @"code": @(131005),
527 535
                                                                                    @"message":@{
@@ -538,11 +546,12 @@ RCT_EXPORT_METHOD(getAudioMixingCurrentPosition: (RCTPromiseResolveBlock)resolve
538 546
 }
539 547
 
540 548
 // set audio mixing position
541
-RCT_EXPORT_METHOD(setAudioMixingPosition: (NSInteger) pos
549
+RCT_EXPORT_METHOD(setAudioMixingPosition
550
+                  :(NSInteger) pos
542 551
                   resolve:(RCTPromiseResolveBlock)resolve
543 552
                   reject:(RCTPromiseRejectBlock)reject) {
544 553
   NSInteger res = [self.rtcEngine setAudioMixingPosition:pos];
545
-  if (res < 0) {
554
+  if (res != 0) {
546 555
     reject(@"131006", @"setAudioMixingPosition failed", [self makeNSError:@{
547 556
                                                                             @"code": @(131006),
548 557
                                                                             @"message":@{
@@ -562,7 +571,7 @@ RCT_EXPORT_METHOD(getEffectsVolume
562 571
                   :(RCTPromiseResolveBlock)resolve
563 572
                   reject:(RCTPromiseRejectBlock)reject) {
564 573
   double res = [self.rtcEngine getEffectsVolume];
565
-  if (res < 0) {
574
+  if (res != 0) {
566 575
     reject(@"131007", @"getEffectsVolume failed", [self makeNSError:@{
567 576
                                                                       @"code": @(131007),
568 577
                                                                       @"message":@{
@@ -579,11 +588,12 @@ RCT_EXPORT_METHOD(getEffectsVolume
579 588
 }
580 589
 
581 590
 // set effects volume
582
-RCT_EXPORT_METHOD(setEffectsVolume:(double) volume
591
+RCT_EXPORT_METHOD(setEffectsVolume
592
+                  :(double) volume
583 593
                   resolve:(RCTPromiseResolveBlock)resolve
584 594
                   reject:(RCTPromiseRejectBlock)reject) {
585 595
   NSInteger res = [self.rtcEngine setEffectsVolume:volume];
586
-  if (res < 0) {
596
+  if (res != 0) {
587 597
     reject(@"131008", @"setEffectsVolume failed", [self makeNSError:@{
588 598
                                                                       @"code": @(131008),
589 599
                                                                       @"message":@{
@@ -600,12 +610,13 @@ RCT_EXPORT_METHOD(setEffectsVolume:(double) volume
600 610
 }
601 611
 
602 612
 // set volume of effect
603
-RCT_EXPORT_METHOD(setVolumeOfEffect:(NSInteger) soundId
613
+RCT_EXPORT_METHOD(setVolumeOfEffect
614
+                  :(NSInteger) soundId
604 615
                   volume:(double)volume
605 616
                   resolve:(RCTPromiseResolveBlock)resolve
606 617
                   reject:(RCTPromiseRejectBlock)reject) {
607 618
   NSInteger res = [self.rtcEngine setVolumeOfEffect:soundId withVolume:volume];
608
-  if (res < 0) {
619
+  if (res != 0) {
609 620
     reject(@"131009", @"setVolumeOfEffect failed", [self makeNSError:@{
610 621
                                                                        @"code": @(131009),
611 622
                                                                        @"message":@{
@@ -622,7 +633,8 @@ RCT_EXPORT_METHOD(setVolumeOfEffect:(NSInteger) soundId
622 633
 }
623 634
 
624 635
 // play effect
625
-RCT_EXPORT_METHOD(playEffect:(NSDictionary *)options
636
+RCT_EXPORT_METHOD(playEffect
637
+                  :(NSDictionary *)options
626 638
                   resolve:(RCTPromiseResolveBlock)resolve
627 639
                   reject:(RCTPromiseRejectBlock)reject) {
628 640
   NSInteger res = [self.rtcEngine playEffect:(int)[options[@"soundId"] integerValue]
@@ -632,7 +644,7 @@ RCT_EXPORT_METHOD(playEffect:(NSDictionary *)options
632 644
                                          pan:[options[@"pan"] doubleValue]
633 645
                                         gain:[options[@"gain"] boolValue]
634 646
                                      publish:[options[@"publish"] boolValue]];
635
-  if (res < 0) {
647
+  if (res != 0) {
636 648
     reject(@"131010", @"playEffect failed", [self makeNSError:@{
637 649
                                                                 @"code": @(131010),
638 650
                                                                 @"message":@{
@@ -649,11 +661,12 @@ RCT_EXPORT_METHOD(playEffect:(NSDictionary *)options
649 661
 }
650 662
 
651 663
 // stop effect by soundId
652
-RCT_EXPORT_METHOD(stopEffect:(NSInteger) soundId
664
+RCT_EXPORT_METHOD(stopEffect
665
+                  :(NSInteger) soundId
653 666
                   resolve:(RCTPromiseResolveBlock)resolve
654 667
                   reject:(RCTPromiseRejectBlock)reject) {
655 668
   NSInteger res = [self.rtcEngine stopEffect:(int)soundId];
656
-  if (res < 0) {
669
+  if (res != 0) {
657 670
     reject(@"131011", @"stopEffect failed", [self makeNSError:@{
658 671
                                                                 @"code": @(131011),
659 672
                                                                 @"message":@{
@@ -670,11 +683,11 @@ RCT_EXPORT_METHOD(stopEffect:(NSInteger) soundId
670 683
 }
671 684
 
672 685
 // stopAllEffects
673
-RCT_EXPORT_METHOD(stopAllEffects:
674
-                  (RCTPromiseResolveBlock)resolve
686
+RCT_EXPORT_METHOD(stopAllEffects
687
+                  :(RCTPromiseResolveBlock)resolve
675 688
                   reject:(RCTPromiseRejectBlock)reject) {
676 689
   NSInteger res = [self.rtcEngine stopAllEffects];
677
-  if (res < 0) {
690
+  if (res != 0) {
678 691
     reject(@"131012", @"stopAllEffects failed", [self makeNSError:@{
679 692
                                                                     @"code": @(131012),
680 693
                                                                     @"message":@{
@@ -691,12 +704,13 @@ RCT_EXPORT_METHOD(stopAllEffects:
691 704
 }
692 705
 
693 706
 // preloadEffect
694
-RCT_EXPORT_METHOD(preloadEffect:(NSInteger) soundId
707
+RCT_EXPORT_METHOD(preloadEffect
708
+                  :(NSInteger) soundId
695 709
                   filePath:(NSString *)filePath
696 710
                   resolve:(RCTPromiseResolveBlock)resolve
697 711
                   reject:(RCTPromiseRejectBlock)reject) {
698 712
   NSInteger res = [self.rtcEngine preloadEffect:(int)soundId filePath:filePath];
699
-  if (res < 0) {
713
+  if (res != 0) {
700 714
     reject(@"131013", @"preloadEffect failed", [self makeNSError:@{
701 715
                                                                    @"code": @(131013),
702 716
                                                                    @"message":@{
@@ -713,11 +727,12 @@ RCT_EXPORT_METHOD(preloadEffect:(NSInteger) soundId
713 727
 }
714 728
 
715 729
 // unload effect
716
-RCT_EXPORT_METHOD(unloadEffect:(NSInteger) soundId
730
+RCT_EXPORT_METHOD(unloadEffect
731
+                  :(NSInteger) soundId
717 732
                   resolve:(RCTPromiseResolveBlock)resolve
718 733
                   reject:(RCTPromiseRejectBlock)reject) {
719 734
   NSInteger res = [self.rtcEngine unloadEffect:(int)soundId];
720
-  if (res < 0) {
735
+  if (res != 0) {
721 736
     reject(@"131014", @"unloadEffect failed", [self makeNSError:@{
722 737
                                                                   @"code": @(131014),
723 738
                                                                   @"message":@{
@@ -734,11 +749,12 @@ RCT_EXPORT_METHOD(unloadEffect:(NSInteger) soundId
734 749
 }
735 750
 
736 751
 // pause effect by id
737
-RCT_EXPORT_METHOD(pauseEffect:(NSInteger) soundId
752
+RCT_EXPORT_METHOD(pauseEffect
753
+                  :(NSInteger) soundId
738 754
                   resolve:(RCTPromiseResolveBlock)resolve
739 755
                   reject:(RCTPromiseRejectBlock)reject) {
740 756
   NSInteger res = [self.rtcEngine unloadEffect:(int)soundId];
741
-  if (res < 0) {
757
+  if (res != 0) {
742 758
     reject(@"131014", @"pauseEffect failed", [self makeNSError:@{
743 759
                                                                  @"code": @(131014),
744 760
                                                                  @"message":@{
@@ -759,7 +775,7 @@ RCT_EXPORT_METHOD(pauseAllEffects:(NSInteger) soundId
759 775
                   resolve:(RCTPromiseResolveBlock)resolve
760 776
                   reject:(RCTPromiseRejectBlock)reject) {
761 777
   NSInteger res = [self.rtcEngine unloadEffect:(int)soundId];
762
-  if (res < 0) {
778
+  if (res != 0) {
763 779
     reject(@"131014", @"pauseAllEffects failed", [self makeNSError:@{
764 780
                                                                      @"code": @(131014),
765 781
                                                                      @"message":@{
@@ -780,7 +796,7 @@ RCT_EXPORT_METHOD(resumeEffect:(NSInteger) soundId
780 796
                   resolve:(RCTPromiseResolveBlock)resolve
781 797
                   reject:(RCTPromiseRejectBlock)reject) {
782 798
   NSInteger res = [self.rtcEngine resumeEffect:(int)soundId];
783
-  if (res < 0) {
799
+  if (res != 0) {
784 800
     reject(@"131015", @"resumeEffect failed", [self makeNSError:@{
785 801
                                                                   @"code": @(131015),
786 802
                                                                   @"message":@{
@@ -801,7 +817,7 @@ RCT_EXPORT_METHOD(resumeAllEffects
801 817
                   :(RCTPromiseResolveBlock)resolve
802 818
                   reject:(RCTPromiseRejectBlock)reject) {
803 819
   NSInteger res = [self.rtcEngine resumeAllEffects];
804
-  if (res < 0) {
820
+  if (res != 0) {
805 821
     reject(@"131016", @"resumeAllEffects failed", [self makeNSError:@{
806 822
                                                                       @"code": @(131016),
807 823
                                                                       @"message":@{
@@ -834,7 +850,7 @@ RCT_EXPORT_METHOD(startAudioRecording:(NSDictionary *)options
834 850
       break;
835 851
   }
836 852
   NSInteger res = [self.rtcEngine startAudioRecording:[options[@"filePath"] stringValue] quality:qualityType];
837
-  if (res < 0) {
853
+  if (res != 0) {
838 854
     reject(@"131017", @"startAudioRecording failed", [self makeNSError:@{
839 855
                                                                          @"code": @(131017),
840 856
                                                                          @"message":@{
@@ -855,7 +871,7 @@ RCT_EXPORT_METHOD(stopAudioRecording
855 871
                   :(RCTPromiseResolveBlock)resolve
856 872
                   reject:(RCTPromiseRejectBlock)reject) {
857 873
   NSInteger res = [self.rtcEngine stopAudioRecording];
858
-  if (res < 0) {
874
+  if (res != 0) {
859 875
     reject(@"131018", @"stopAudioRecording failed", [self makeNSError:@{
860 876
                                                                         @"code": @(131018),
861 877
                                                                         @"message":@{
@@ -907,7 +923,7 @@ RCT_EXPORT_METHOD(startEchoTest
907 923
              @"elapsed": @(elapsed)
908 924
              });
909 925
   }];
910
-  if (res < 0) {
926
+  if (res != 0) {
911 927
     reject(@"131019", @"startEchoTest failed", [self makeNSError:@{
912 928
                                                                    @"code": @(131019),
913 929
                                                                    @"message":@{
@@ -928,7 +944,7 @@ RCT_EXPORT_METHOD(stopEchoTest
928 944
                   :(RCTPromiseResolveBlock)resolve
929 945
                   reject:(RCTPromiseRejectBlock)reject) {
930 946
   NSInteger res = [self.rtcEngine stopEchoTest];
931
-  if (res < 0) {
947
+  if (res != 0) {
932 948
     reject(@"131020", @"stopEchoTest failed", [self makeNSError:@{
933 949
                                                                   @"code": @(131020),
934 950
                                                                   @"message":@{
@@ -949,7 +965,7 @@ RCT_EXPORT_METHOD(enableLastmileTest
949 965
                   :(RCTPromiseResolveBlock)resolve
950 966
                   reject:(RCTPromiseRejectBlock)reject) {
951 967
   NSInteger res = [self.rtcEngine enableLastmileTest];
952
-  if (res < 0) {
968
+  if (res != 0) {
953 969
     reject(@"131021", @"enableLastmileTest failed", [self makeNSError:@{
954 970
                                                                         @"code": @(131021),
955 971
                                                                         @"message":@{
@@ -970,7 +986,7 @@ RCT_EXPORT_METHOD(disableLastmileTest
970 986
                   :(RCTPromiseResolveBlock)resolve
971 987
                   reject:(RCTPromiseRejectBlock)reject) {
972 988
   NSInteger res = [self.rtcEngine disableLastmileTest];
973
-  if (res < 0) {
989
+  if (res != 0) {
974 990
     reject(@"131022", @"disableLastmileTest failed", [self makeNSError:@{
975 991
                                                                          @"code": @(131022),
976 992
                                                                          @"message":@{
@@ -995,7 +1011,7 @@ RCT_EXPORT_METHOD(setRecordingAudioFrameParametersWithSampleRate:(NSDictionary *
995 1011
                                                                             mode:(AgoraAudioRawFrameOperationMode)[options[@"mode"] integerValue]
996 1012
                                                                   samplesPerCall:[options[@"samplesPerCall"] integerValue]
997 1013
                    ];
998
-  if (res < 0) {
1014
+  if (res != 0) {
999 1015
     reject(@"131023", @"setRecordingAudioFrameParametersWithSampleRate failed", [self makeNSError:@{
1000 1016
                                                                                                     @"code": @(131023),
1001 1017
                                                                                                     @"message":@{
@@ -1020,7 +1036,7 @@ RCT_EXPORT_METHOD(setPlaybackAudioFrameParametersWithSampleRate:(NSDictionary *)
1020 1036
                                                                            mode:(AgoraAudioRawFrameOperationMode)[options[@"mode"] integerValue]
1021 1037
                                                                  samplesPerCall:[options[@"samplesPerCall"] integerValue]
1022 1038
                    ];
1023
-  if (res < 0) {
1039
+  if (res != 0) {
1024 1040
     reject(@"131024", @"setPlaybackAudioFrameParametersWithSampleRate failed", [self makeNSError:@{
1025 1041
                                                                                                    @"code": @(131024),
1026 1042
                                                                                                    @"message":@{
@@ -1042,7 +1058,7 @@ RCT_EXPORT_METHOD(setMixedAudioFrameParametersWithSampleRate
1042 1058
                   resolve:(RCTPromiseResolveBlock)resolve
1043 1059
                   reject:(RCTPromiseRejectBlock)reject) {
1044 1060
   NSInteger res = [self.rtcEngine setMixedAudioFrameParametersWithSampleRate:[options[@"sampleRate"] integerValue] samplesPerCall:[options[@"samplesPerCall"] integerValue]];
1045
-  if (res < 0) {
1061
+  if (res != 0) {
1046 1062
     reject(@"131025", @"setMixedAudioFrameParametersWithSampleRate failed", [self makeNSError:@{
1047 1063
                                                                                                 @"code": @(131025),
1048 1064
                                                                                                 @"message":@{
@@ -1069,7 +1085,7 @@ RCT_EXPORT_METHOD(addVideoWatermark:(NSDictionary *)options
1069 1085
                                                                            @"width": options[@"width"],
1070 1086
                                                                            @"height": options[@"height"]
1071 1087
                                                                            }]];
1072
-  if (res < 0) {
1088
+  if (res != 0) {
1073 1089
     reject(@"131026", @"addVideoWatermark failed", [self makeNSError:@{
1074 1090
                                                                        @"code": @(131026),
1075 1091
                                                                        @"message":@{
@@ -1090,7 +1106,7 @@ RCT_EXPORT_METHOD(clearVideoWatermarks
1090 1106
                   :(RCTPromiseResolveBlock)resolve
1091 1107
                   reject:(RCTPromiseRejectBlock)reject) {
1092 1108
   NSInteger res = [self.rtcEngine clearVideoWatermarks];
1093
-  if (res < 0) {
1109
+  if (res != 0) {
1094 1110
     reject(@"131027", @"clearVideoWatermarks failed", [self makeNSError:@{
1095 1111
                                                                           @"code": @(131027),
1096 1112
                                                                           @"message":@{
@@ -1112,7 +1128,7 @@ RCT_EXPORT_METHOD(enableDualStreamMode
1112 1128
                   resolve:(RCTPromiseResolveBlock)resolve
1113 1129
                   reject:(RCTPromiseRejectBlock)reject) {
1114 1130
   NSInteger res = [self.rtcEngine enableDualStreamMode:enabled];
1115
-  if (res < 0) {
1131
+  if (res != 0) {
1116 1132
     reject(@"131028", @"enableDualStreamMode failed", [self makeNSError:@{
1117 1133
                                                                           @"code": @(131028),
1118 1134
                                                                           @"message":@{
@@ -1135,7 +1151,7 @@ RCT_EXPORT_METHOD(setRemoteVideoStream
1135 1151
                   reject:(RCTPromiseRejectBlock)reject) {
1136 1152
   NSInteger res = [self.rtcEngine setRemoteVideoStream:[options[@"uid"] integerValue]
1137 1153
                                                   type:(AgoraVideoStreamType)[options[@"streamType"] integerValue]];
1138
-  if (res < 0) {
1154
+  if (res != 0) {
1139 1155
     reject(@"131029", @"setRemoteVideoStream failed", [self makeNSError:@{
1140 1156
                                                                           @"code": @(131029),
1141 1157
                                                                           @"message":@{
@@ -1157,7 +1173,7 @@ RCT_EXPORT_METHOD(setRemoteDefaultVideoStreamType
1157 1173
                   resolve:(RCTPromiseResolveBlock)resolve
1158 1174
                   reject:(RCTPromiseRejectBlock)reject) {
1159 1175
   NSInteger res = [self.rtcEngine setRemoteDefaultVideoStreamType:(AgoraVideoStreamType)[options[@"streamType"] integerValue]];
1160
-  if (res < 0) {
1176
+  if (res != 0) {
1161 1177
     reject(@"131030", @"setRemoteDefaultVideoStreamType failed", [self makeNSError:@{
1162 1178
                                                                                      @"code": @(131030),
1163 1179
                                                                                      @"message":@{
@@ -1179,17 +1195,17 @@ RCT_EXPORT_METHOD(addInjectStreamUrl
1179 1195
                   resolve:(RCTPromiseResolveBlock)resolve
1180 1196
                   reject:(RCTPromiseRejectBlock)reject) {
1181 1197
   AgoraLiveInjectStreamConfig *config = [AgoraLiveInjectStreamConfig new];
1182
-  config.size = CGSizeMake([options[@"config.size.width"] floatValue], [options[@"config.size.height"] floatValue]);
1183
-  config.videoGop = [options[@"config.videoGop"] integerValue];
1184
-  config.videoFramerate = [options[@"config.videoFramerate"] integerValue];
1185
-  config.videoBitrate = [options[@"config.videoBitrate"] integerValue];
1186
-  config.audioSampleRate = (AgoraAudioSampleRateType)[options[@"config.audioSampleRate"] integerValue];
1187
-  config.audioBitrate = [options[@"config.audioBitrate"] integerValue];
1188
-  config.audioChannels = [options[@"config.audioChannels"] integerValue];
1198
+  config.size = CGSizeMake([options[@"config"][@"size"][@"width"] floatValue], [options[@"config"][@"size"][@"height"] floatValue]);
1199
+  config.videoGop = [options[@"config"][@"videoGop"] integerValue];
1200
+  config.videoFramerate = [options[@"config"][@"videoFramerate"] integerValue];
1201
+  config.videoBitrate = [options[@"config"][@"videoBitrate"] integerValue];
1202
+  config.audioSampleRate = (AgoraAudioSampleRateType)[options[@"config"][@"audioSampleRate"] integerValue];
1203
+  config.audioBitrate = [options[@"config"][@"audioBitrate"] integerValue];
1204
+  config.audioChannels = [options[@"config"][@"audioChannels"] integerValue];
1189 1205
   
1190 1206
   NSInteger res = [self.rtcEngine addInjectStreamUrl:[options[@"url"] stringValue]
1191 1207
                                               config:config];
1192
-  if (res < 0) {
1208
+  if (res != 0) {
1193 1209
     reject(@"131031", @"addInjectStreamUrl failed", [self makeNSError:@{
1194 1210
                                                                         @"code": @(131031),
1195 1211
                                                                         @"message":@{
@@ -1212,7 +1228,7 @@ RCT_EXPORT_METHOD(removeInjectStreamUrl
1212 1228
                   reject:(RCTPromiseRejectBlock)reject) {
1213 1229
   
1214 1230
   NSInteger res = [self.rtcEngine removeInjectStreamUrl:url];
1215
-  if (res < 0) {
1231
+  if (res != 0) {
1216 1232
     reject(@"131032", @"removeInjectStreamUrl failed", [self makeNSError:@{
1217 1233
                                                                            @"code": @(131032),
1218 1234
                                                                            @"message":@{
@@ -1373,7 +1389,8 @@ RCT_EXPORT_METHOD(setCameraExposurePosition
1373 1389
 
1374 1390
 // enable camera torch
1375 1391
 RCT_EXPORT_METHOD(setCameraTorchOn:(BOOL)isOn
1376
-                  resolve:(RCTPromiseResolveBlock)resolve) {
1392
+                  resolve:(RCTPromiseResolveBlock)resolve
1393
+                  reject:(RCTPromiseRejectBlock)reject) {
1377 1394
   BOOL res = [self.rtcEngine setCameraTorchOn:isOn];
1378 1395
   resolve(@{
1379 1396
             @"success": @(YES),
@@ -1383,7 +1400,8 @@ RCT_EXPORT_METHOD(setCameraTorchOn:(BOOL)isOn
1383 1400
 
1384 1401
 // enable auto focus face mode
1385 1402
 RCT_EXPORT_METHOD(setCameraAutoFocusFaceModeEnabled:(BOOL)enable
1386
-                  resolve:(RCTPromiseResolveBlock)resolve) {
1403
+                  resolve:(RCTPromiseResolveBlock)resolve
1404
+                  reject:(RCTPromiseRejectBlock)reject) {
1387 1405
   BOOL res = [self.rtcEngine setCameraAutoFocusFaceModeEnabled:enable];
1388 1406
   resolve(@{
1389 1407
             @"success": @(YES),
@@ -1406,7 +1424,7 @@ RCT_EXPORT_METHOD(setLog
1406 1424
                   resolve:(RCTPromiseResolveBlock)resolve
1407 1425
                   reject:(RCTPromiseRejectBlock)reject) {
1408 1426
   int res = [self.rtcEngine setLogFilter:level];
1409
-  if (res < 0) {
1427
+  if (res != 0) {
1410 1428
     reject(@"131036", @"setLogFilter failed", [self makeNSError:@{
1411 1429
                                                                   @"code": @(131036),
1412 1430
                                                                   @"message":@{
@@ -1421,7 +1439,7 @@ RCT_EXPORT_METHOD(setLog
1421 1439
               });
1422 1440
   }
1423 1441
   res = [self.rtcEngine setLogFile:filePath];
1424
-  if (res < 0) {
1442
+  if (res != 0) {
1425 1443
     reject(@"131037", @"setLogFile failed", [self makeNSError:@{
1426 1444
                                                                 @"code": @(131037),
1427 1445
                                                                 @"message":@{
@@ -1458,7 +1476,9 @@ RCT_EXPORT_METHOD(sendStreamMessage:(NSInteger)streamId data:(NSData*)data
1458 1476
 }
1459 1477
 
1460 1478
 // get sdk version
1461
-RCT_EXPORT_METHOD(getSdkVersion:(RCTPromiseResolveBlock) resolve) {
1479
+RCT_EXPORT_METHOD(getSdkVersion
1480
+                  :(RCTPromiseResolveBlock) resolve
1481
+                  reject:(RCTPromiseRejectBlock) reject) {
1462 1482
   resolve(@[[AgoraRtcEngineKit getSdkVersion]]);
1463 1483
 }
1464 1484
 
@@ -1494,7 +1514,7 @@ RCT_EXPORT_METHOD(addPublishStreamUrl:(NSDictionary *)options) {
1494 1514
 RCT_EXPORT_METHOD(setLiveTranscoding:(NSDictionary *)options) {
1495 1515
   AgoraLiveTranscoding *transcoding = AgoraLiveTranscoding.defaultTranscoding;
1496 1516
   if (options[@"size"] != nil) {
1497
-    transcoding.size = CGSizeMake([options[@"size.width"] doubleValue], [options[@"size.height"] doubleValue]);
1517
+    transcoding.size = CGSizeMake([options[@"size"][@"width"] doubleValue], [options[@"size"][@"height"] doubleValue]);
1498 1518
   }
1499 1519
   if (options[@"videoBitrate"] != nil) {
1500 1520
     transcoding.videoBitrate = [options[@"videoBitrate"] integerValue];
@@ -1516,7 +1536,7 @@ RCT_EXPORT_METHOD(setLiveTranscoding:(NSDictionary *)options) {
1516 1536
     for (NSDictionary *optionUser in options[@"users"]) {
1517 1537
       AgoraLiveTranscodingUser *liveUser = [AgoraLiveTranscodingUser new];
1518 1538
       liveUser.uid = (NSUInteger)[optionUser[@"uid"] integerValue];
1519
-      liveUser.rect = CGRectMake((CGFloat)[options[@"backgroundColor.x"] floatValue], (CGFloat)[options[@"backgroundColor.y"] floatValue], (CGFloat)[options[@"backgroundColor.width"] floatValue], (CGFloat)[options[@"backgroundColor.height"] floatValue]);
1539
+      liveUser.rect = CGRectMake((CGFloat)[options[@"backgroundColor"][@"x"] floatValue], (CGFloat)[options[@"backgroundColor"][@"y"] floatValue], (CGFloat)[options[@"backgroundColor"][@"width"] floatValue], (CGFloat)[options[@"backgroundColor"][@"height"] floatValue]);
1520 1540
       liveUser.zOrder = [optionUser[@"zOrder"] integerValue];
1521 1541
       liveUser.alpha = [optionUser[@"alpha"] doubleValue];
1522 1542
       liveUser.audioChannel = [optionUser[@"audioChannel"] integerValue];
@@ -1529,24 +1549,24 @@ RCT_EXPORT_METHOD(setLiveTranscoding:(NSDictionary *)options) {
1529 1549
   }
1530 1550
   if (options[@"watermark"] != nil) {
1531 1551
     transcoding.watermark = [self makeAgoraImage:@{
1532
-                                                   @"url": options[@"watermark.url"],
1533
-                                                   @"x": options[@"watermark.x"],
1534
-                                                   @"y": options[@"watermark.y"],
1535
-                                                   @"width": options[@"watermark.width"],
1536
-                                                   @"height": options[@"watermark.height"]
1552
+                                                   @"url": options[@"watermark"][@"url"],
1553
+                                                   @"x": options[@"watermark"][@"x"],
1554
+                                                   @"y": options[@"watermark"][@"y"],
1555
+                                                   @"width": options[@"watermark"][@"width"],
1556
+                                                   @"height": options[@"watermark"][@"height"]
1537 1557
                                                    }];
1538 1558
   }
1539 1559
   if (options[@"backgroundImage"] != nil) {
1540 1560
     transcoding.backgroundImage = [self makeAgoraImage:@{
1541
-                                                         @"url": options[@"backgroundImage.url"],
1542
-                                                         @"x": options[@"backgroundImage.x"],
1543
-                                                         @"y": options[@"backgroundImage.y"],
1544
-                                                         @"width": options[@"backgroundImage.width"],
1545
-                                                         @"height": options[@"backgroundImage.height"]
1561
+                                                         @"url": options[@"backgroundImage"][@"url"],
1562
+                                                         @"x": options[@"backgroundImage"][@"x"],
1563
+                                                         @"y": options[@"backgroundImage"][@"y"],
1564
+                                                         @"width": options[@"backgroundImage"][@"width"],
1565
+                                                         @"height": options[@"backgroundImage"][@"height"]
1546 1566
                                                          }];
1547 1567
   }
1548 1568
   if (options[@"backgroundColor"] != nil) {
1549
-    transcoding.backgroundColor = [[UIColor new] initWithRed:(CGFloat)[options[@"backgroundColor.red"] floatValue] green:(CGFloat)[options[@"backgroundColor.green"] floatValue] blue:(CGFloat)[options[@"backgroundColor.blue"] floatValue] alpha:(CGFloat)[options[@"backgroundColor.alpha"] floatValue]];
1569
+    transcoding.backgroundColor = [[UIColor new] initWithRed:(CGFloat)[options[@"backgroundColor"][@"red"] floatValue] green:(CGFloat)[options[@"backgroundColor"][@"green"] floatValue] blue:(CGFloat)[options[@"backgroundColor"][@"blue"] floatValue] alpha:(CGFloat)[options[@"backgroundColor"][@"alpha"] floatValue]];
1550 1570
   }
1551 1571
   if (options[@"audioSampleRate"] != nil) {
1552 1572
     transcoding.audioSampleRate = (AgoraAudioSampleRateType)[options[@"audioSampleRate"] integerValue];
@@ -1658,11 +1678,13 @@ RCT_EXPORT_METHOD(setLiveTranscoding:(NSDictionary *)options) {
1658 1678
 }
1659 1679
 
1660 1680
 - (void)rtcEngine:(AgoraRtcEngineKit *_Nonnull)engine didApiCallExecute:(NSInteger)error api:(NSString *_Nonnull)api result:(NSString *_Nonnull)result {
1661
-  [self sendEvent:DidOccurError  params:@{
1662
-                                          @"api": api,
1663
-                                          @"result": result,
1664
-                                          @"error": @(error)
1665
-                                          }];
1681
+  if (error != 0) {
1682
+    [self sendEvent:DidOccurError  params:@{
1683
+                                            @"api": api,
1684
+                                            @"result": result,
1685
+                                            @"error": @(error)
1686
+                                            }];
1687
+  }
1666 1688
 }
1667 1689
 
1668 1690
 - (void)rtcEngine:(AgoraRtcEngineKit *_Nonnull)engine didJoinChannel:(NSString *_Nonnull)channel withUid:(NSUInteger)uid elapsed:(NSInteger)elapsed {
@@ -1953,7 +1975,7 @@ RCT_EXPORT_METHOD(setLiveTranscoding:(NSDictionary *)options) {
1953 1975
                                                @"sentBitrate": @(stats.sentBitrate),
1954 1976
                                                @"sentFrameRate": @(stats.sentFrameRate)
1955 1977
                                                }
1956
-                                            }];
1978
+                                           }];
1957 1979
 }
1958 1980
 
1959 1981
 - (void)rtcEngine:(AgoraRtcEngineKit *_Nonnull)engine remoteVideoStats:(AgoraRtcRemoteVideoStats *_Nonnull)stats {

+ 20
- 20
ios/RCTAgora/RCTAgoraVideoView.m Dosyayı Görüntüle

@@ -11,32 +11,32 @@
11 11
 @implementation RCTAgoraVideoView
12 12
 
13 13
 - (instancetype)init{
14
-    
15
-    if (self == [super init]) {
16
-        _rtcEngine = [AgoraConst share].rtcEngine;
17
-    }
18
-    
19
-    return self;
14
+  
15
+  if (self == [super init]) {
16
+    _rtcEngine = [AgoraConst share].rtcEngine;
17
+  }
18
+  
19
+  return self;
20 20
 }
21 21
 
22 22
 - (void)setShowLocalVideo:(BOOL)showLocalVideo {
23
-    if (showLocalVideo) {
24
-        AgoraRtcVideoCanvas *canvas = [[AgoraRtcVideoCanvas alloc] init];
25
-        canvas.uid = [AgoraConst share].localUid;
26
-        canvas.view = self;
27
-        canvas.renderMode = AgoraVideoRenderModeHidden;
28
-        [_rtcEngine setupLocalVideo:canvas];
29
-    }
23
+  if (showLocalVideo) {
24
+    AgoraRtcVideoCanvas *canvas = [[AgoraRtcVideoCanvas alloc] init];
25
+    canvas.uid = [AgoraConst share].localUid;
26
+    canvas.view = self;
27
+    canvas.renderMode = AgoraVideoRenderModeHidden;
28
+    [_rtcEngine setupLocalVideo:canvas];
29
+  }
30 30
 }
31 31
 
32 32
 -(void)setRemoteUid:(NSInteger)remoteUid {
33
-    if (remoteUid > 0) {
34
-        AgoraRtcVideoCanvas *canvas = [[AgoraRtcVideoCanvas alloc] init];
35
-        canvas.uid = remoteUid;
36
-        canvas.view = self;
37
-        canvas.renderMode = AgoraVideoRenderModeHidden;
38
-        [_rtcEngine setupRemoteVideo:canvas];
39
-    }
33
+  if (remoteUid > 0) {
34
+    AgoraRtcVideoCanvas *canvas = [[AgoraRtcVideoCanvas alloc] init];
35
+    canvas.uid = remoteUid;
36
+    canvas.view = self;
37
+    canvas.renderMode = AgoraVideoRenderModeHidden;
38
+    [_rtcEngine setupRemoteVideo:canvas];
39
+  }
40 40
 }
41 41
 
42 42
 @end

+ 1
- 1
ios/RCTAgora/RCTAgoraViewManager.m Dosyayı Görüntüle

@@ -17,7 +17,7 @@ RCT_EXPORT_VIEW_PROPERTY(showLocalVideo, BOOL)
17 17
 RCT_EXPORT_VIEW_PROPERTY(remoteUid, NSInteger)
18 18
 
19 19
 - (UIView *)view {
20
-    return [RCTAgoraVideoView new];
20
+  return [RCTAgoraVideoView new];
21 21
 }
22 22
 
23 23
 

+ 27
- 24
samples/simpleDemo/components/agora.js Dosyayı Görüntüle

@@ -147,18 +147,26 @@ export default class AgoraComponent extends Component<Props> {
147 147
     RtcEngine.joinChannel(this.props.channelName);
148 148
     RtcEngine.enableAudioVolumeIndication(500, 3);
149 149
     RtcEngine.eventEmitter({
150
-      FirstRemoteVideoDecodedOfUid: (data) => {
151
-        console.log('[RtcEngine] firstRemoteVideoDecodedOfUid', data);
150
+      onFirstRemoteVideoDecoded: (data) => {
151
+        console.log('[RtcEngine] onFirstRemoteVideoDecoded', data);
152 152
       },
153
-      DidOfflineOfUid: (data) => {
154
-        console.log('[RtcEngine] didOfflineOfUid', data);
153
+      onUserJoined: (data) => {
154
+        console.log('[RtcEngine] onUserJoined', data);
155
+        const {peerIds} = this.state;
156
+        if (peerIds.indexOf(data.uid) !== -1) {
157
+          this.setState({
158
+            peerIds: [...peerIds, data.uid]
159
+          })
160
+        }
161
+      },
162
+      onUserOffline: (data) => {
163
+        console.log('[RtcEngine] onUserOffline', data);
155 164
         this.setState({
156 165
             peerIds: this.state.peerIds.filter(uid => uid !== data.uid)
157 166
         })
158 167
       },
159
-      DidJoinChannel: (data) => {
160
-        console.log('[RtcEngine] didJoinChannel', data);
161
-        // RtcEngine.setShowLocalVideo()
168
+      onJoinChannelSuccess: (data) => {
169
+        console.log('[RtcEngine] onJoinChannelSuccess', data);
162 170
         RtcEngine.startPreview();
163 171
         this.setState({
164 172
           joinSucceed: true
@@ -170,22 +178,13 @@ export default class AgoraComponent extends Component<Props> {
170 178
           })
171 179
         }
172 180
       },
173
-      ReportAudioVolumeIndicationOfSpeakers: (data) => {
174
-        console.log('[RtcEngine] reportAudioVolumeIndicationOfSpeakers', data);
181
+      onAudioVolumeIndication: (data) => {
182
+        console.log('[RtcEngine] onAudioVolumeIndication', data);
175 183
       },
176
-      DidClientRoleChanged: (data) => {
177
-        console.log("[RtcEngine] DidClientRoleChanged", data);
184
+      onClientRoleChanged: (data) => {
185
+        console.log("[RtcEngine] onClientRoleChanged", data);
178 186
       },
179
-      // onUserJoined: (data) => {
180
-      //   console.log('[RtcEngine] onUserJoined', data);
181
-      //   const {peerIds} = this.state;
182
-      //   if (peerIds.indexOf(data.uid) !== -1) {
183
-      //     this.setState({
184
-      //       peerIds: [...peerIds, data.uid]
185
-      //     })
186
-      //   }
187
-      // },
188
-      DidOccurError: (data) => {
187
+      onError: (data) => {
189 188
         console.log('[RtcEngine] onError', data);
190 189
         if (data.error === 17) {
191 190
           RtcEngine.leaveChannel().then(_ => {
@@ -198,8 +197,10 @@ export default class AgoraComponent extends Component<Props> {
198 197
   }
199 198
 
200 199
   componentWillUnmount () {
201
-    RtcEngine.leaveChannel();
202
-    RtcEngine.destroy();
200
+    if (this.state.joinSucceed) {
201
+      RtcEngine.leaveChannel();
202
+      RtcEngine.destroy();
203
+    }
203 204
   }
204 205
 
205 206
   handleCancel = () => {
@@ -232,7 +233,9 @@ export default class AgoraComponent extends Component<Props> {
232 233
     this.setState({
233 234
       isCameraTorch: !this.state.isCameraTorch
234 235
     }, () => {
235
-      RtcEngine.setCameraTorchOn(this.state.isCameraTorch)
236
+      RtcEngine.setCameraTorchOn(this.state.isCameraTorch).then(val => {
237
+        console.log("setCameraTorch", val);
238
+      })
236 239
     })
237 240
   }
238 241
 

+ 70
- 70
samples/simpleDemo/ios/simpleDemo.xcodeproj/project.pbxproj Dosyayı Görüntüle

@@ -13,7 +13,6 @@
13 13
 		00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; };
14 14
 		00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; };
15 15
 		00E356F31AD99517003FC87E /* simpleDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* simpleDemoTests.m */; };
16
-		05194A9809AFD1FDF74709E7 /* libPods-simpleDemo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C9C186FCB90BE59A498E388 /* libPods-simpleDemo.a */; };
17 16
 		0835F32622113E6C00D06B62 /* libRCTAgora.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0835F32522113DBB00D06B62 /* libRCTAgora.a */; };
18 17
 		0842E3912206D315003875AC /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 0842E36A2206D315003875AC /* libc++.tbd */; };
19 18
 		0842E3932206D31B003875AC /* libresolv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 0842E3922206D31B003875AC /* libresolv.tbd */; };
@@ -33,7 +32,6 @@
33 32
 		13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
34 33
 		140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
35 34
 		146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
36
-		1EDE4E5AD6EB936298841520 /* libPods-simpleDemoTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F00ACB437198E85C3CA8C909 /* libPods-simpleDemoTests.a */; };
37 35
 		2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
38 36
 		2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
39 37
 		2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
@@ -47,12 +45,14 @@
47 45
 		2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D16E6891FA4F8E400B85C8A /* libReact.a */; };
48 46
 		2DCD954D1E0B4F2C00145EB5 /* simpleDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* simpleDemoTests.m */; };
49 47
 		2DF0FFEE2056DD460020B375 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; };
48
+		6E7E7AB5D6E109D27E0E6DBA /* libPods-simpleDemo-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 297A43FBC26AC2CA9277EEA7 /* libPods-simpleDemo-tvOS.a */; };
50 49
 		832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
51 50
 		ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; };
52
-		B63DC20AC5E319CED37AF53F /* libPods-simpleDemo-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C29A9B4FA0CBFCB2AEAC456B /* libPods-simpleDemo-tvOS.a */; };
53
-		D899073F3898E08F36D2FAD2 /* libPods-simpleDemo-tvOSTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 45848698D81201AE2B62BBC9 /* libPods-simpleDemo-tvOSTests.a */; };
51
+		CD552096FC1370C4A2358083 /* libPods-simpleDemo-tvOSTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1BD9F379C131EED964191210 /* libPods-simpleDemo-tvOSTests.a */; };
52
+		E194ADD9CE5E15C8B843632D /* libPods-simpleDemoTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8521F94568C9799DE8A2E924 /* libPods-simpleDemoTests.a */; };
54 53
 		ED297163215061F000B7C4FE /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED297162215061F000B7C4FE /* JavaScriptCore.framework */; };
55 54
 		ED2971652150620600B7C4FE /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED2971642150620600B7C4FE /* JavaScriptCore.framework */; };
55
+		F9CCFF5C0754736C2CF0DA62 /* libPods-simpleDemo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F5B2719153F1724CAA7BF38 /* libPods-simpleDemo.a */; };
56 56
 /* End PBXBuildFile section */
57 57
 
58 58
 /* Begin PBXContainerItemProxy section */
@@ -360,7 +360,8 @@
360 360
 		0842E3A02206D34C003875AC /* AgoraRtcEngineKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AgoraRtcEngineKit.framework; path = Pods/AgoraRtcEngine_iOS/AgoraRtcEngineKit.framework; sourceTree = "<group>"; };
361 361
 		0842E3A22206D360003875AC /* AgoraRtcCryptoLoader.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AgoraRtcCryptoLoader.framework; path = "../node_modules/react-native-agora/ios/RCTAgora/libs/AgoraRtcCryptoLoader.framework"; sourceTree = "<group>"; };
362 362
 		0842E3A32206D360003875AC /* libcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcrypto.a; path = "../node_modules/react-native-agora/ios/RCTAgora/libs/libcrypto.a"; sourceTree = "<group>"; };
363
-		0A0E55F5895DC7A7CD825A1B /* Pods-simpleDemoTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-simpleDemoTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-simpleDemoTests/Pods-simpleDemoTests.debug.xcconfig"; sourceTree = "<group>"; };
363
+		0B8219CBAD2A59646DA2ADF3 /* Pods-simpleDemoTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-simpleDemoTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-simpleDemoTests/Pods-simpleDemoTests.release.xcconfig"; sourceTree = "<group>"; };
364
+		12FD9C24C28FA4F7B433F22A /* Pods-simpleDemo-tvOSTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-simpleDemo-tvOSTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-simpleDemo-tvOSTests/Pods-simpleDemo-tvOSTests.release.xcconfig"; sourceTree = "<group>"; };
364 365
 		139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = "<group>"; };
365 366
 		139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = "<group>"; };
366 367
 		13B07F961A680F5B00A75B9A /* simpleDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = simpleDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -371,26 +372,25 @@
371 372
 		13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = simpleDemo/Info.plist; sourceTree = "<group>"; };
372 373
 		13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = simpleDemo/main.m; sourceTree = "<group>"; };
373 374
 		146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; };
375
+		1BD9F379C131EED964191210 /* libPods-simpleDemo-tvOSTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-simpleDemo-tvOSTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
376
+		229EBCCFBCB0EFFBBB2F923B /* Pods-simpleDemo-tvOSTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-simpleDemo-tvOSTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-simpleDemo-tvOSTests/Pods-simpleDemo-tvOSTests.debug.xcconfig"; sourceTree = "<group>"; };
377
+		297A43FBC26AC2CA9277EEA7 /* libPods-simpleDemo-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-simpleDemo-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
374 378
 		2D02E47B1E0B4A5D006451C7 /* simpleDemo-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "simpleDemo-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
375 379
 		2D02E4901E0B4A5D006451C7 /* simpleDemo-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "simpleDemo-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
376 380
 		2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; };
377
-		45848698D81201AE2B62BBC9 /* libPods-simpleDemo-tvOSTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-simpleDemo-tvOSTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
378
-		5C9C186FCB90BE59A498E388 /* libPods-simpleDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-simpleDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; };
381
+		3B0EB669CF971DFEEC184925 /* Pods-simpleDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-simpleDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-simpleDemo/Pods-simpleDemo.release.xcconfig"; sourceTree = "<group>"; };
379 382
 		5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = "<group>"; };
383
+		5F5B2719153F1724CAA7BF38 /* libPods-simpleDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-simpleDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; };
384
+		6FEDE66059A8063404A3B258 /* Pods-simpleDemoTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-simpleDemoTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-simpleDemoTests/Pods-simpleDemoTests.debug.xcconfig"; sourceTree = "<group>"; };
380 385
 		78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
381 386
 		832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
387
+		8521F94568C9799DE8A2E924 /* libPods-simpleDemoTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-simpleDemoTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
388
+		85B8A627BC5F4AE7F5AD4740 /* Pods-simpleDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-simpleDemo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-simpleDemo/Pods-simpleDemo.debug.xcconfig"; sourceTree = "<group>"; };
382 389
 		ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = "<group>"; };
383
-		B1F8F74BA7E4A893B45EBA14 /* Pods-simpleDemo-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-simpleDemo-tvOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-simpleDemo-tvOS/Pods-simpleDemo-tvOS.release.xcconfig"; sourceTree = "<group>"; };
384
-		B4BEA34A2BE6170D8015E6E6 /* Pods-simpleDemoTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-simpleDemoTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-simpleDemoTests/Pods-simpleDemoTests.release.xcconfig"; sourceTree = "<group>"; };
385
-		BA1D76D22058F0FE11245706 /* Pods-simpleDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-simpleDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-simpleDemo/Pods-simpleDemo.release.xcconfig"; sourceTree = "<group>"; };
386
-		C246F6B5A5B225491EE41834 /* Pods-simpleDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-simpleDemo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-simpleDemo/Pods-simpleDemo.debug.xcconfig"; sourceTree = "<group>"; };
387
-		C29A9B4FA0CBFCB2AEAC456B /* libPods-simpleDemo-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-simpleDemo-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
388
-		C6621048A1D76D31934A4971 /* Pods-simpleDemo-tvOSTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-simpleDemo-tvOSTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-simpleDemo-tvOSTests/Pods-simpleDemo-tvOSTests.release.xcconfig"; sourceTree = "<group>"; };
390
+		B342884727F2B383806AF563 /* Pods-simpleDemo-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-simpleDemo-tvOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-simpleDemo-tvOS/Pods-simpleDemo-tvOS.release.xcconfig"; sourceTree = "<group>"; };
391
+		EA88D77F64903D30D59F1935 /* Pods-simpleDemo-tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-simpleDemo-tvOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-simpleDemo-tvOS/Pods-simpleDemo-tvOS.debug.xcconfig"; sourceTree = "<group>"; };
389 392
 		ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
390 393
 		ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
391
-		F00ACB437198E85C3CA8C909 /* libPods-simpleDemoTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-simpleDemoTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
392
-		F5A5F433C9A120BCBAB88C30 /* Pods-simpleDemo-tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-simpleDemo-tvOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-simpleDemo-tvOS/Pods-simpleDemo-tvOS.debug.xcconfig"; sourceTree = "<group>"; };
393
-		FE09FB8163CC564FE6E1A0D1 /* Pods-simpleDemo-tvOSTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-simpleDemo-tvOSTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-simpleDemo-tvOSTests/Pods-simpleDemo-tvOSTests.debug.xcconfig"; sourceTree = "<group>"; };
394 394
 /* End PBXFileReference section */
395 395
 
396 396
 /* Begin PBXFrameworksBuildPhase section */
@@ -399,7 +399,7 @@
399 399
 			buildActionMask = 2147483647;
400 400
 			files = (
401 401
 				140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */,
402
-				1EDE4E5AD6EB936298841520 /* libPods-simpleDemoTests.a in Frameworks */,
402
+				E194ADD9CE5E15C8B843632D /* libPods-simpleDemoTests.a in Frameworks */,
403 403
 			);
404 404
 			runOnlyForDeploymentPostprocessing = 0;
405 405
 		};
@@ -429,7 +429,7 @@
429 429
 				832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
430 430
 				00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
431 431
 				139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
432
-				05194A9809AFD1FDF74709E7 /* libPods-simpleDemo.a in Frameworks */,
432
+				F9CCFF5C0754736C2CF0DA62 /* libPods-simpleDemo.a in Frameworks */,
433 433
 			);
434 434
 			runOnlyForDeploymentPostprocessing = 0;
435 435
 		};
@@ -446,7 +446,7 @@
446 446
 				2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */,
447 447
 				2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */,
448 448
 				2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */,
449
-				B63DC20AC5E319CED37AF53F /* libPods-simpleDemo-tvOS.a in Frameworks */,
449
+				6E7E7AB5D6E109D27E0E6DBA /* libPods-simpleDemo-tvOS.a in Frameworks */,
450 450
 			);
451 451
 			runOnlyForDeploymentPostprocessing = 0;
452 452
 		};
@@ -455,7 +455,7 @@
455 455
 			buildActionMask = 2147483647;
456 456
 			files = (
457 457
 				2DF0FFEE2056DD460020B375 /* libReact.a in Frameworks */,
458
-				D899073F3898E08F36D2FAD2 /* libPods-simpleDemo-tvOSTests.a in Frameworks */,
458
+				CD552096FC1370C4A2358083 /* libPods-simpleDemo-tvOSTests.a in Frameworks */,
459 459
 			);
460 460
 			runOnlyForDeploymentPostprocessing = 0;
461 461
 		};
@@ -593,6 +593,21 @@
593 593
 			name = Products;
594 594
 			sourceTree = "<group>";
595 595
 		};
596
+		1559D4AFA0E7ADCE70ACAE88 /* Pods */ = {
597
+			isa = PBXGroup;
598
+			children = (
599
+				85B8A627BC5F4AE7F5AD4740 /* Pods-simpleDemo.debug.xcconfig */,
600
+				3B0EB669CF971DFEEC184925 /* Pods-simpleDemo.release.xcconfig */,
601
+				EA88D77F64903D30D59F1935 /* Pods-simpleDemo-tvOS.debug.xcconfig */,
602
+				B342884727F2B383806AF563 /* Pods-simpleDemo-tvOS.release.xcconfig */,
603
+				229EBCCFBCB0EFFBBB2F923B /* Pods-simpleDemo-tvOSTests.debug.xcconfig */,
604
+				12FD9C24C28FA4F7B433F22A /* Pods-simpleDemo-tvOSTests.release.xcconfig */,
605
+				6FEDE66059A8063404A3B258 /* Pods-simpleDemoTests.debug.xcconfig */,
606
+				0B8219CBAD2A59646DA2ADF3 /* Pods-simpleDemoTests.release.xcconfig */,
607
+			);
608
+			name = Pods;
609
+			sourceTree = "<group>";
610
+		};
596 611
 		2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
597 612
 			isa = PBXGroup;
598 613
 			children = (
@@ -610,10 +625,10 @@
610 625
 				ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
611 626
 				ED2971642150620600B7C4FE /* JavaScriptCore.framework */,
612 627
 				2D16E6891FA4F8E400B85C8A /* libReact.a */,
613
-				5C9C186FCB90BE59A498E388 /* libPods-simpleDemo.a */,
614
-				C29A9B4FA0CBFCB2AEAC456B /* libPods-simpleDemo-tvOS.a */,
615
-				45848698D81201AE2B62BBC9 /* libPods-simpleDemo-tvOSTests.a */,
616
-				F00ACB437198E85C3CA8C909 /* libPods-simpleDemoTests.a */,
628
+				5F5B2719153F1724CAA7BF38 /* libPods-simpleDemo.a */,
629
+				297A43FBC26AC2CA9277EEA7 /* libPods-simpleDemo-tvOS.a */,
630
+				1BD9F379C131EED964191210 /* libPods-simpleDemo-tvOSTests.a */,
631
+				8521F94568C9799DE8A2E924 /* libPods-simpleDemoTests.a */,
617 632
 			);
618 633
 			name = Frameworks;
619 634
 			sourceTree = "<group>";
@@ -674,7 +689,7 @@
674 689
 				83CBBA001A601CBA00E9B192 /* Products */,
675 690
 				2D16E6871FA4F8E400B85C8A /* Frameworks */,
676 691
 				0842E3102206D244003875AC /* Recovered References */,
677
-				92B2639AF6824F9FB78D2D98 /* Pods */,
692
+				1559D4AFA0E7ADCE70ACAE88 /* Pods */,
678 693
 			);
679 694
 			indentWidth = 2;
680 695
 			sourceTree = "<group>";
@@ -692,21 +707,6 @@
692 707
 			name = Products;
693 708
 			sourceTree = "<group>";
694 709
 		};
695
-		92B2639AF6824F9FB78D2D98 /* Pods */ = {
696
-			isa = PBXGroup;
697
-			children = (
698
-				C246F6B5A5B225491EE41834 /* Pods-simpleDemo.debug.xcconfig */,
699
-				BA1D76D22058F0FE11245706 /* Pods-simpleDemo.release.xcconfig */,
700
-				F5A5F433C9A120BCBAB88C30 /* Pods-simpleDemo-tvOS.debug.xcconfig */,
701
-				B1F8F74BA7E4A893B45EBA14 /* Pods-simpleDemo-tvOS.release.xcconfig */,
702
-				FE09FB8163CC564FE6E1A0D1 /* Pods-simpleDemo-tvOSTests.debug.xcconfig */,
703
-				C6621048A1D76D31934A4971 /* Pods-simpleDemo-tvOSTests.release.xcconfig */,
704
-				0A0E55F5895DC7A7CD825A1B /* Pods-simpleDemoTests.debug.xcconfig */,
705
-				B4BEA34A2BE6170D8015E6E6 /* Pods-simpleDemoTests.release.xcconfig */,
706
-			);
707
-			name = Pods;
708
-			sourceTree = "<group>";
709
-		};
710 710
 		ADBDB9201DFEBF0600ED6528 /* Products */ = {
711 711
 			isa = PBXGroup;
712 712
 			children = (
@@ -723,7 +723,7 @@
723 723
 			isa = PBXNativeTarget;
724 724
 			buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "simpleDemoTests" */;
725 725
 			buildPhases = (
726
-				80B4FF9FD140311F9367E567 /* [CP] Check Pods Manifest.lock */,
726
+				8544CAAED03675F6D7FB98A4 /* [CP] Check Pods Manifest.lock */,
727 727
 				00E356EA1AD99517003FC87E /* Sources */,
728 728
 				00E356EB1AD99517003FC87E /* Frameworks */,
729 729
 				00E356EC1AD99517003FC87E /* Resources */,
@@ -742,7 +742,7 @@
742 742
 			isa = PBXNativeTarget;
743 743
 			buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "simpleDemo" */;
744 744
 			buildPhases = (
745
-				6199F491670B1F294BE7D6F9 /* [CP] Check Pods Manifest.lock */,
745
+				8BBC03C9431D170906BF3323 /* [CP] Check Pods Manifest.lock */,
746 746
 				13B07F871A680F5B00A75B9A /* Sources */,
747 747
 				13B07F8C1A680F5B00A75B9A /* Frameworks */,
748 748
 				13B07F8E1A680F5B00A75B9A /* Resources */,
@@ -761,7 +761,7 @@
761 761
 			isa = PBXNativeTarget;
762 762
 			buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "simpleDemo-tvOS" */;
763 763
 			buildPhases = (
764
-				6D121135C9FF54DFB7ACAC38 /* [CP] Check Pods Manifest.lock */,
764
+				A54848CE5372F3BDEABAD998 /* [CP] Check Pods Manifest.lock */,
765 765
 				2D02E4771E0B4A5D006451C7 /* Sources */,
766 766
 				2D02E4781E0B4A5D006451C7 /* Frameworks */,
767 767
 				2D02E4791E0B4A5D006451C7 /* Resources */,
@@ -780,7 +780,7 @@
780 780
 			isa = PBXNativeTarget;
781 781
 			buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "simpleDemo-tvOSTests" */;
782 782
 			buildPhases = (
783
-				18B73F289B3D5EACD1288561 /* [CP] Check Pods Manifest.lock */,
783
+				B8229C407DC191812DDEDA6E /* [CP] Check Pods Manifest.lock */,
784 784
 				2D02E48C1E0B4A5D006451C7 /* Sources */,
785 785
 				2D02E48D1E0B4A5D006451C7 /* Frameworks */,
786 786
 				2D02E48E1E0B4A5D006451C7 /* Resources */,
@@ -1221,43 +1221,43 @@
1221 1221
 			shellPath = /bin/sh;
1222 1222
 			shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n";
1223 1223
 		};
1224
-		18B73F289B3D5EACD1288561 /* [CP] Check Pods Manifest.lock */ = {
1224
+		2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = {
1225 1225
 			isa = PBXShellScriptBuildPhase;
1226 1226
 			buildActionMask = 2147483647;
1227 1227
 			files = (
1228 1228
 			);
1229
-			inputFileListPaths = (
1230
-			);
1231 1229
 			inputPaths = (
1232
-				"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
1233
-				"${PODS_ROOT}/Manifest.lock",
1234
-			);
1235
-			name = "[CP] Check Pods Manifest.lock";
1236
-			outputFileListPaths = (
1237 1230
 			);
1231
+			name = "Bundle React Native Code And Images";
1238 1232
 			outputPaths = (
1239
-				"$(DERIVED_FILE_DIR)/Pods-simpleDemo-tvOSTests-checkManifestLockResult.txt",
1240 1233
 			);
1241 1234
 			runOnlyForDeploymentPostprocessing = 0;
1242 1235
 			shellPath = /bin/sh;
1243
-			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";
1244
-			showEnvVarsInLog = 0;
1236
+			shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
1245 1237
 		};
1246
-		2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = {
1238
+		8544CAAED03675F6D7FB98A4 /* [CP] Check Pods Manifest.lock */ = {
1247 1239
 			isa = PBXShellScriptBuildPhase;
1248 1240
 			buildActionMask = 2147483647;
1249 1241
 			files = (
1250 1242
 			);
1243
+			inputFileListPaths = (
1244
+			);
1251 1245
 			inputPaths = (
1246
+				"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
1247
+				"${PODS_ROOT}/Manifest.lock",
1248
+			);
1249
+			name = "[CP] Check Pods Manifest.lock";
1250
+			outputFileListPaths = (
1252 1251
 			);
1253
-			name = "Bundle React Native Code And Images";
1254 1252
 			outputPaths = (
1253
+				"$(DERIVED_FILE_DIR)/Pods-simpleDemoTests-checkManifestLockResult.txt",
1255 1254
 			);
1256 1255
 			runOnlyForDeploymentPostprocessing = 0;
1257 1256
 			shellPath = /bin/sh;
1258
-			shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
1257
+			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";
1258
+			showEnvVarsInLog = 0;
1259 1259
 		};
1260
-		6199F491670B1F294BE7D6F9 /* [CP] Check Pods Manifest.lock */ = {
1260
+		8BBC03C9431D170906BF3323 /* [CP] Check Pods Manifest.lock */ = {
1261 1261
 			isa = PBXShellScriptBuildPhase;
1262 1262
 			buildActionMask = 2147483647;
1263 1263
 			files = (
@@ -1279,7 +1279,7 @@
1279 1279
 			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";
1280 1280
 			showEnvVarsInLog = 0;
1281 1281
 		};
1282
-		6D121135C9FF54DFB7ACAC38 /* [CP] Check Pods Manifest.lock */ = {
1282
+		A54848CE5372F3BDEABAD998 /* [CP] Check Pods Manifest.lock */ = {
1283 1283
 			isa = PBXShellScriptBuildPhase;
1284 1284
 			buildActionMask = 2147483647;
1285 1285
 			files = (
@@ -1301,7 +1301,7 @@
1301 1301
 			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";
1302 1302
 			showEnvVarsInLog = 0;
1303 1303
 		};
1304
-		80B4FF9FD140311F9367E567 /* [CP] Check Pods Manifest.lock */ = {
1304
+		B8229C407DC191812DDEDA6E /* [CP] Check Pods Manifest.lock */ = {
1305 1305
 			isa = PBXShellScriptBuildPhase;
1306 1306
 			buildActionMask = 2147483647;
1307 1307
 			files = (
@@ -1316,7 +1316,7 @@
1316 1316
 			outputFileListPaths = (
1317 1317
 			);
1318 1318
 			outputPaths = (
1319
-				"$(DERIVED_FILE_DIR)/Pods-simpleDemoTests-checkManifestLockResult.txt",
1319
+				"$(DERIVED_FILE_DIR)/Pods-simpleDemo-tvOSTests-checkManifestLockResult.txt",
1320 1320
 			);
1321 1321
 			runOnlyForDeploymentPostprocessing = 0;
1322 1322
 			shellPath = /bin/sh;
@@ -1390,7 +1390,7 @@
1390 1390
 /* Begin XCBuildConfiguration section */
1391 1391
 		00E356F61AD99517003FC87E /* Debug */ = {
1392 1392
 			isa = XCBuildConfiguration;
1393
-			baseConfigurationReference = 0A0E55F5895DC7A7CD825A1B /* Pods-simpleDemoTests.debug.xcconfig */;
1393
+			baseConfigurationReference = 6FEDE66059A8063404A3B258 /* Pods-simpleDemoTests.debug.xcconfig */;
1394 1394
 			buildSettings = {
1395 1395
 				BUNDLE_LOADER = "$(TEST_HOST)";
1396 1396
 				DEVELOPMENT_TEAM = 56968F5P8G;
@@ -1415,7 +1415,7 @@
1415 1415
 		};
1416 1416
 		00E356F71AD99517003FC87E /* Release */ = {
1417 1417
 			isa = XCBuildConfiguration;
1418
-			baseConfigurationReference = B4BEA34A2BE6170D8015E6E6 /* Pods-simpleDemoTests.release.xcconfig */;
1418
+			baseConfigurationReference = 0B8219CBAD2A59646DA2ADF3 /* Pods-simpleDemoTests.release.xcconfig */;
1419 1419
 			buildSettings = {
1420 1420
 				BUNDLE_LOADER = "$(TEST_HOST)";
1421 1421
 				COPY_PHASE_STRIP = NO;
@@ -1437,7 +1437,7 @@
1437 1437
 		};
1438 1438
 		13B07F941A680F5B00A75B9A /* Debug */ = {
1439 1439
 			isa = XCBuildConfiguration;
1440
-			baseConfigurationReference = C246F6B5A5B225491EE41834 /* Pods-simpleDemo.debug.xcconfig */;
1440
+			baseConfigurationReference = 85B8A627BC5F4AE7F5AD4740 /* Pods-simpleDemo.debug.xcconfig */;
1441 1441
 			buildSettings = {
1442 1442
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
1443 1443
 				CURRENT_PROJECT_VERSION = 1;
@@ -1470,7 +1470,7 @@
1470 1470
 		};
1471 1471
 		13B07F951A680F5B00A75B9A /* Release */ = {
1472 1472
 			isa = XCBuildConfiguration;
1473
-			baseConfigurationReference = BA1D76D22058F0FE11245706 /* Pods-simpleDemo.release.xcconfig */;
1473
+			baseConfigurationReference = 3B0EB669CF971DFEEC184925 /* Pods-simpleDemo.release.xcconfig */;
1474 1474
 			buildSettings = {
1475 1475
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
1476 1476
 				CURRENT_PROJECT_VERSION = 1;
@@ -1502,7 +1502,7 @@
1502 1502
 		};
1503 1503
 		2D02E4971E0B4A5E006451C7 /* Debug */ = {
1504 1504
 			isa = XCBuildConfiguration;
1505
-			baseConfigurationReference = F5A5F433C9A120BCBAB88C30 /* Pods-simpleDemo-tvOS.debug.xcconfig */;
1505
+			baseConfigurationReference = EA88D77F64903D30D59F1935 /* Pods-simpleDemo-tvOS.debug.xcconfig */;
1506 1506
 			buildSettings = {
1507 1507
 				ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
1508 1508
 				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
@@ -1531,7 +1531,7 @@
1531 1531
 		};
1532 1532
 		2D02E4981E0B4A5E006451C7 /* Release */ = {
1533 1533
 			isa = XCBuildConfiguration;
1534
-			baseConfigurationReference = B1F8F74BA7E4A893B45EBA14 /* Pods-simpleDemo-tvOS.release.xcconfig */;
1534
+			baseConfigurationReference = B342884727F2B383806AF563 /* Pods-simpleDemo-tvOS.release.xcconfig */;
1535 1535
 			buildSettings = {
1536 1536
 				ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
1537 1537
 				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
@@ -1560,7 +1560,7 @@
1560 1560
 		};
1561 1561
 		2D02E4991E0B4A5E006451C7 /* Debug */ = {
1562 1562
 			isa = XCBuildConfiguration;
1563
-			baseConfigurationReference = FE09FB8163CC564FE6E1A0D1 /* Pods-simpleDemo-tvOSTests.debug.xcconfig */;
1563
+			baseConfigurationReference = 229EBCCFBCB0EFFBBB2F923B /* Pods-simpleDemo-tvOSTests.debug.xcconfig */;
1564 1564
 			buildSettings = {
1565 1565
 				BUNDLE_LOADER = "$(TEST_HOST)";
1566 1566
 				CLANG_ANALYZER_NONNULL = YES;
@@ -1588,7 +1588,7 @@
1588 1588
 		};
1589 1589
 		2D02E49A1E0B4A5E006451C7 /* Release */ = {
1590 1590
 			isa = XCBuildConfiguration;
1591
-			baseConfigurationReference = C6621048A1D76D31934A4971 /* Pods-simpleDemo-tvOSTests.release.xcconfig */;
1591
+			baseConfigurationReference = 12FD9C24C28FA4F7B433F22A /* Pods-simpleDemo-tvOSTests.release.xcconfig */;
1592 1592
 			buildSettings = {
1593 1593
 				BUNDLE_LOADER = "$(TEST_HOST)";
1594 1594
 				CLANG_ANALYZER_NONNULL = YES;

+ 3
- 3
samples/simpleDemo/yarn.lock Dosyayı Görüntüle

@@ -4733,9 +4733,9 @@ object-copy@^0.1.0:
4733 4733
     kind-of "^3.0.3"
4734 4734
 
4735 4735
 object-keys@^1.0.12:
4736
-  version "1.0.12"
4737
-  resolved "http://registry.npm.taobao.org/object-keys/download/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2"
4738
-  integrity sha1-CcU4VTd1dTEMymL1W7M0q/97PtI=
4736
+  version "1.1.0"
4737
+  resolved "http://registry.npm.taobao.org/object-keys/download/object-keys-1.1.0.tgz#11bd22348dd2e096a045ab06f6c85bcc340fa032"
4738
+  integrity sha1-Eb0iNI3S4JagRasG9shbzDQPoDI=
4739 4739
 
4740 4740
 object-visit@^1.0.0:
4741 4741
   version "1.0.1"

+ 125
- 76
src/RtcEngine.native.ts Dosyayı Görüntüle

@@ -6,7 +6,8 @@ import {
6 6
 
7 7
 import {
8 8
     Option, VideoOption,
9
-    EventScheduler, PublisherConfig,
9
+    EventScheduler,
10
+    PublisherConfig,
10 11
     LiveTranscoding, Callback,
11 12
     String, Number
12 13
 } from "./types.d";
@@ -25,7 +26,7 @@ export default class RtcEngine {
25 26
     }
26 27
 
27 28
     static joinChannel(channelName: String, uid?: Number, token?: String, info?: Object): void {
28
-        Agora.joinChannel({channelName, uid, token, info});
29
+        return Agora.joinChannel({channelName, uid, token, info});
29 30
     }
30 31
 
31 32
     static joinChannelWithToken(
@@ -35,83 +36,131 @@ export default class RtcEngine {
35 36
 
36 37
     static eventEmitter(eventScheduler: EventScheduler) {
37 38
         this.removeEmitter();
39
+        // const events = EventSchedulerKeys;
38 40
         const events = [
39
-            "DidOccurWarning",
40
-            "DidOccurError",
41
-            "DidApiCallExecute",
42
-            "DidJoinChannel",
43
-            "DidRejoinChannel",
44
-            "DidLeaveChannel",
45
-            "LeaveChannel",
46
-            "DidClientRoleChanged",
47
-            "DidJoinedOfUid",
48
-            "DidOfflineOfUid",
49
-            "ConnectionChangedToState",
50
-            "ConnectionDidLost",
51
-            "TokenPrivilegeWillExpire",
52
-            "RequestToken",
53
-            
54
-            "DidMicrophoneEnabled",
55
-            "ReportAudioVolumeIndicationOfSpeakers",
56
-            "ActiveSpeaker",
57
-            "FirstLocalAudioFrame",
58
-            "FirstRemoteAudioFrameOfUid",
59
-            "VideoDidStop",
60
-            "FirstLocalVideoFrameWithSize",
61
-            "FirstRemoteVideoDecodedOfUid",
62
-            "FirstRemoteVideoFrameOfUid",
63
-            "DidAudioMuted",
64
-            "DidVideoMuted",
65
-            "DidVideoEnabled",
66
-            "DidLocalVideoEnabled",
67
-            "VideoSizeChangedOfUid",
68
-            "RemoteVideoStateChangedOfUid",
69
-            "DidLocalPublishFallbackToAudioOnly",
70
-            "DidRemoteSubscribeFallbackToAudioOnly",
71
-            
72
-            "DeviceTypeStateChanged",
73
-            "DidAudioRouteChanged",
74
-            "CameraDidReady",
75
-            "CameraFocusDidChangedToRect",
76
-            "CameraExposureDidChangedToRect",
77
-            
78
-            "ReportRtcStats",
79
-            "LastmileQuality",
80
-            "NetworkQuality",
81
-            "LocalVideoStats",
82
-            "RemoteVideoStats",
83
-            "RemoteAudioStats",
84
-            "AudioTransportStatsOfUid",
85
-            "VideoTransportStatsOfUid",
86
-            
87
-            "LocalAudioMixingDidFinish",
88
-            "RemoteAudioMixingDidStart",
89
-            "RemoteAudioMixingDidFinish",
90
-            "DidAudioEffectFinish",
91
-            
92
-            "StreamPublished",
93
-            "StreamUnpublish",
94
-            "TranscodingUpdated",
95
-            
96
-            "StreamInjectedStatus",
97
-            
98
-            "ReceiveStreamMessage",
99
-            "DidOccurStreamMessageError",
100
-            
101
-            "MediaEngineDidLoaded",
102
-            "MediaEngineDidStartCall",
103
-            
104
-            "ConnectionDidInterrupted",
105
-            "ConnectionDidBanned",
106
-            "AudioQualityOfUid"
41
+            "onWarning",
42
+            
43
+            "onError",
44
+            
45
+            "onJoinChannelSuccess",
46
+            
47
+            "onRejoinChannelSuccess",
48
+            
49
+            "onLeaveChannel",
50
+            
51
+            "onClientRoleChanged",
52
+            
53
+            "onUserJoined",
54
+            
55
+            "onUserOffline",
56
+            
57
+            "onConnectionStateChanged",
58
+            
59
+            "onConnectionInterrupted",
60
+            
61
+            "onConnectionLost",
62
+            
63
+            "onConnectionBanned",
64
+            
65
+            "onApiCallExecuted",
66
+            
67
+            "onTokenPrivilegeWillExpire",
68
+            
69
+            "onRequestToken",
70
+            
71
+            "onMicrophoneEnabled",
72
+            
73
+            "onAudioVolumeIndication",
74
+            
75
+            "onActiveSpeaker",
76
+            
77
+            "onFirstLocalAudioFrame",
78
+            
79
+            "onFirstRemoteAudioFrame",
80
+            
81
+            "onVideoStopped",
82
+            
83
+            "onFirstLocalVideoFrame",
84
+            
85
+            "onFirstRemoteVideoDecoded",
86
+            
87
+            "onFirstRemoteVideoFrame",
88
+            
89
+            "onUserMuteAudio",
90
+            
91
+            "onUserMuteVideo",
92
+            
93
+            "onUserEnableVideo",
94
+            
95
+            "onUserEnableLocalVideo",
96
+            
97
+            "onVideoSizeChanged",
98
+            
99
+            "onRemoteVideoStateChanged",
100
+            
101
+            "onLocalPublishFallbackToAudioOnly",
102
+            
103
+            "onRemoteSubscribeFallbackToAudioOnly",
104
+            
105
+            "onAudioRouteChanged",
106
+            
107
+            "onCameraReady",
108
+            
109
+            "onCameraFocusAreaChanged",
110
+            
111
+            "onCameraExposureAreaChanged",
112
+            
113
+            "onAudioQuality",
114
+            
115
+            "onRtcStats",
116
+            
117
+            "onLastmileQuality",
118
+            
119
+            "onNetworkQuality",
120
+            
121
+            "onLocalVideoStats",
122
+            
123
+            "onRemoteVideoStats",
124
+            
125
+            "onRemoteAudioStats",
126
+            
127
+            "onLocalVideoStat",
128
+            
129
+            "onRemoteVideoStat",
130
+            
131
+            "onRemoteAudioTransportStats",
132
+            
133
+            "onRemoteVideoTransportStats",
134
+            
135
+            "onAudioMixingFinished",
136
+            
137
+            "onAudioEffectFinished",
138
+            
139
+            "onStreamPublished",
140
+            
141
+            "onStreamUnpublished",
142
+            
143
+            "onTranscodingUpdated",
144
+            
145
+            "onStreamInjectedStatus",
146
+            
147
+            "onStreamMessage",
148
+            
149
+            "onStreamMessageError",
150
+            
151
+            "onMediaEngineLoadSuccess",
152
+            
153
+            "onMediaEngineStartCallSuccess",
107 154
         ];
108 155
         for (let event of events) {
109
-            this.listeners.push(
110
-                AgoraEventEmitter.addListener(event, msg => {
111
-                    const functor = (eventScheduler as any)[event];
112
-                    functor && functor(msg);
113
-                })
114
-            );
156
+            const functor = (eventScheduler as any)[event];
157
+            if (functor) {
158
+                this.listeners.push(
159
+                    AgoraEventEmitter.addListener(event, msg => {
160
+                        functor(msg);
161
+                    })
162
+                );
163
+            }
115 164
         }
116 165
     }
117 166
 

+ 169
- 67
src/types.d.ts Dosyayı Görüntüle

@@ -92,84 +92,186 @@ export interface VideoOption {
92 92
 }
93 93
 
94 94
 export interface EventScheduler {
95
-  // onFirstRemoteVideoDecoded: Function,
96
-  // onJoinChannelSuccess: Function,
97
-  // onUserOffline: Function,
98
-  // onUserJoined: Function,
99
-  // onError: Function,
95
+  onWarning: Function,
96
+ 
97
+  onError: Function,
98
+   
99
+  onJoinChannelSuccess: Function,
100
+   
101
+  onRejoinChannelSuccess: Function,
102
+   
103
+  onLeaveChannel: Function,
104
+   
105
+  onClientRoleChanged: Function,
106
+   
107
+  onUserJoined: Function,
108
+   
109
+  onUserOffline: Function,
110
+   
111
+  onConnectionStateChanged: Function,
112
+   
113
+  onConnectionInterrupted?: Function,
114
+   
115
+  onConnectionLost: Function,
116
+   
117
+  onConnectionBanned: Function,
118
+   
119
+  onApiCallExecuted: Function,
120
+   
121
+  onTokenPrivilegeWillExpire: Function,
122
+   
123
+  onRequestToken: Function,
124
+   
125
+  onMicrophoneEnabled: Function,
126
+   
127
+  onAudioVolumeIndication: Function,
128
+   
129
+  onActiveSpeaker: Function,
130
+   
131
+  onFirstLocalAudioFrame: Function,
132
+   
133
+  onFirstRemoteAudioFrame: Function,
134
+   
135
+  onVideoStopped: Function,
136
+   
137
+  onFirstLocalVideoFrame: Function,
138
+   
139
+  onFirstRemoteVideoDecoded: Function,
140
+   
141
+  onFirstRemoteVideoFrame: Function,
142
+   
143
+  onUserMuteAudio: Function,
144
+   
145
+  onUserMuteVideo: Function,
146
+   
147
+  onUserEnableVideo: Function,
148
+   
149
+  onUserEnableLocalVideo: Function,
150
+   
151
+  onVideoSizeChanged: Function,
152
+   
153
+  onRemoteVideoStateChanged: Function,
154
+   
155
+  onLocalPublishFallbackToAudioOnly: Function,
156
+   
157
+  onRemoteSubscribeFallbackToAudioOnly: Function,
158
+   
159
+  onAudioRouteChanged: Function,
160
+   
161
+  onCameraReady: Function,
162
+   
163
+  onCameraFocusAreaChanged: Function,
164
+   
165
+  onCameraExposureAreaChanged: Function,
166
+   
167
+  onAudioQuality: Function,
168
+   
169
+  onRtcStats: Function,
170
+   
171
+  onLastmileQuality: Function,
172
+   
173
+  onNetworkQuality: Function,
174
+   
175
+  onLocalVideoStats: Function,
176
+   
177
+  onRemoteVideoStats: Function,
178
+   
179
+  onRemoteAudioStats: Function,
180
+   
181
+  onLocalVideoStat: Function,
182
+   
183
+  onRemoteVideoStat: Function,
184
+   
185
+  onRemoteAudioTransportStats: Function,
186
+   
187
+  onRemoteVideoTransportStats: Function,
188
+   
189
+  onAudioMixingFinished: Function,
190
+   
191
+  onAudioEffectFinished: Function,
192
+   
193
+  onStreamPublished: Function,
194
+   
195
+  onStreamUnpublished: Function,
196
+   
197
+  onTranscodingUpdated: Function,
198
+   
199
+  onStreamInjectedStatus: Function,
200
+   
201
+  onStreamMessage: Function,
202
+   
203
+  onStreamMessageError: Function,
204
+   
205
+  onMediaEngineLoadSuccess: Function,
206
+   
207
+  onMediaEngineStartCallSuccess: Function,
100 208
   // onWarning: Function,
209
+  // onError: Function,
210
+  // onJoinChannelSuccess: Function,
211
+  // onRejoinChannelSuccess: Function,
101 212
   // onLeaveChannel: Function,
102
-  // onAudioVolumeIndication: Function,
103
-  // onStreamMessage: Function,
104
-  // onStreamMessageError: Function
105
-  DidOccurWarning: Function,
106
-  DidOccurError: Function,
107
-  DidApiCallExecute: Function,
108
-  DidJoinChannel: Function,
109
-  DidRejoinChannel: Function,
110
-  DidLeaveChannel: Function,
111
-  LeaveChannel: Function,
112
-  DidClientRoleChanged: Function,
113
-  DidJoinedOfUid: Function,
114
-  DidOfflineOfUid: Function,
115
-  ConnectionChangedToState: Function,
116
-  ConnectionDidLost: Function,
117
-  TokenPrivilegeWillExpire: Function,
118
-  RequestToken: Function,
213
+  // onApiCallExecute: Function,
214
+  // onClientRoleChanged: Function,
215
+  // onUserJoined: Function,
216
+  // onUserOffline: Function,
217
+  // onConnectionStateChanged: Function,
218
+  // onConnectionInterrupted: Function,
219
+  // onTokenPrivilegeWillExpire: Function,
220
+  // onRequestToken: Function,
119 221
   
120
-  DidMicrophoneEnabled: Function,
121
-  ReportAudioVolumeIndicationOfSpeakers: Function,
122
-  ActiveSpeaker: Function,
123
-  FirstLocalAudioFrame: Function,
124
-  FirstRemoteAudioFrameOfUid: Function,
125
-  VideoDidStop: Function,
126
-  FirstLocalVideoFrameWithSize: Function,
127
-  FirstRemoteVideoDecodedOfUid: Function,
128
-  FirstRemoteVideoFrameOfUid: Function,
129
-  DidAudioMuted: Function,
130
-  DidVideoMuted: Function,
131
-  DidVideoEnabled: Function,
132
-  DidLocalVideoEnabled: Function,
133
-  VideoSizeChangedOfUid: Function,
134
-  RemoteVideoStateChangedOfUid: Function,
135
-  DidLocalPublishFallbackToAudioOnly: Function,
136
-  DidRemoteSubscribeFallbackToAudioOnly: Function,
222
+  // DidMicrophoneEnabled: Function,
223
+  // ReportAudioVolumeIndicationOfSpeakers: Function,
224
+  // ActiveSpeaker: Function,
225
+  // FirstLocalAudioFrame: Function,
226
+  // FirstRemoteAudioFrameOfUid: Function,
227
+  // VideoDidStop: Function,
228
+  // FirstLocalVideoFrameWithSize: Function,
229
+  // FirstRemoteVideoDecodedOfUid: Function,
230
+  // FirstRemoteVideoFrameOfUid: Function,
231
+  // DidAudioMuted: Function,
232
+  // DidVideoMuted: Function,
233
+  // DidVideoEnabled: Function,
234
+  // DidLocalVideoEnabled: Function,
235
+  // VideoSizeChangedOfUid: Function,
236
+  // RemoteVideoStateChangedOfUid: Function,
237
+  // DidLocalPublishFallbackToAudioOnly: Function,
238
+  // DidRemoteSubscribeFallbackToAudioOnly: Function,
137 239
   
138
-  DeviceTypeStateChanged: Function,
139
-  DidAudioRouteChanged: Function,
140
-  CameraDidReady: Function,
141
-  CameraFocusDidChangedToRect: Function,
142
-  CameraExposureDidChangedToRect: Function,
240
+  // DeviceTypeStateChanged: Function,
241
+  // DidAudioRouteChanged: Function,
242
+  // CameraDidReady: Function,
243
+  // CameraFocusDidChangedToRect: Function,
244
+  // CameraExposureDidChangedToRect: Function,
143 245
   
144
-  ReportRtcStats: Function,
145
-  LastmileQuality: Function,
146
-  NetworkQuality: Function,
147
-  LocalVideoStats: Function,
148
-  RemoteVideoStats: Function,
149
-  RemoteAudioStats: Function,
150
-  AudioTransportStatsOfUid: Function,
151
-  VideoTransportStatsOfUid: Function,
246
+  // ReportRtcStats: Function,
247
+  // LastmileQuality: Function,
248
+  // NetworkQuality: Function,
249
+  // LocalVideoStats: Function,
250
+  // RemoteVideoStats: Function,
251
+  // RemoteAudioStats: Function,
252
+  // AudioTransportStatsOfUid: Function,
253
+  // VideoTransportStatsOfUid: Function,
152 254
   
153
-  LocalAudioMixingDidFinish: Function,
154
-  RemoteAudioMixingDidStart: Function,
155
-  RemoteAudioMixingDidFinish: Function,
156
-  DidAudioEffectFinish: Function,
255
+  // LocalAudioMixingDidFinish: Function,
256
+  // RemoteAudioMixingDidStart: Function,
257
+  // RemoteAudioMixingDidFinish: Function,
258
+  // DidAudioEffectFinish: Function,
157 259
   
158
-  StreamPublished: Function,
159
-  StreamUnpublish: Function,
160
-  TranscodingUpdated: Function,
260
+  // StreamPublished: Function,
261
+  // StreamUnpublish: Function,
262
+  // TranscodingUpdated: Function,
161 263
   
162
-  StreamInjectedStatus: Function,
264
+  // StreamInjectedStatus: Function,
163 265
   
164
-  ReceiveStreamMessage: Function,
165
-  DidOccurStreamMessageError: Function,
266
+  // ReceiveStreamMessage: Function,
267
+  // DidOccurStreamMessageError: Function,
166 268
   
167
-  MediaEngineDidLoaded: Function,
168
-  MediaEngineDidStartCall: Function,
269
+  // MediaEngineDidLoaded: Function,
270
+  // MediaEngineDidStartCall: Function,
169 271
   
170
-  ConnectionDidInterrupted: Function,
171
-  ConnectionDidBanned: Function,
172
-  AudioQualityOfUi: Function
272
+  // ConnectionDidInterrupted: Function,
273
+  // ConnectionDidBanned: Function,
274
+  // AudioQualityOfUi: Function
173 275
 }
174 276
 
175 277
 export type Callback<T> = (err: any, data: any) => T;

+ 2
- 2
yarn.lock Dosyayı Görüntüle

@@ -5044,7 +5044,7 @@ react-native-typescript-transformer@^1.2.11:
5044 5044
     semver "^5.4.1"
5045 5045
     source-map "^0.5.6"
5046 5046
 
5047
-react-native@^0.58.3:
5047
+react-native@0.58.3:
5048 5048
   version "0.58.3"
5049 5049
   resolved "http://registry.npm.taobao.org/react-native/download/react-native-0.58.3.tgz#90e2dbfef19f3793ba008ab5274daac926424916"
5050 5050
   integrity sha1-kOLb/vGfN5O6AIq1J02qySZCSRY=
@@ -5121,7 +5121,7 @@ react-transform-hmr@^1.0.4:
5121 5121
     global "^4.3.0"
5122 5122
     react-proxy "^1.1.7"
5123 5123
 
5124
-react@^16.7.0:
5124
+react@16.7.0:
5125 5125
   version "16.7.0"
5126 5126
   resolved "http://registry.npm.taobao.org/react/download/react-16.7.0.tgz#b674ec396b0a5715873b350446f7ea0802ab6381"
5127 5127
   integrity sha1-tnTsOWsKVxWHOzUERvfqCAKrY4E=