This repository was archived by the owner on May 26, 2019. It is now read-only.
File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -208,6 +208,12 @@ - (BOOL)lessThanIos10_2
208
208
}
209
209
}
210
210
211
+ - (BOOL )containsLowerCaseLetter : (NSString *)callUUID
212
+ {
213
+ NSRegularExpression * regex = [[NSRegularExpression alloc ] initWithPattern: @" [a-z]" options: 0 error: nil ];
214
+ return [regex numberOfMatchesInString: callUUID options: 0 range: NSMakeRange (0 , [callUUID length ])] > 0 ;
215
+ }
216
+
211
217
- (int )getHandleType : (NSString *)handleType
212
218
{
213
219
int _handleType;
@@ -366,7 +372,8 @@ - (void)provider:(CXProvider *)provider performAnswerCallAction:(CXAnswerCallAct
366
372
if (![self lessThanIos10_2 ]) {
367
373
[self configureAudioSession ];
368
374
}
369
- [self sendEventWithName: RNCallKitPerformAnswerCallAction body: @{ @" callUUID" : action.callUUID .UUIDString }];
375
+ NSString *callUUID = [self containsLowerCaseLetter: action.callUUID.UUIDString] ? action.callUUID .UUIDString : [action.callUUID.UUIDString lowercaseString ];
376
+ [self sendEventWithName: RNCallKitPerformAnswerCallAction body: @{ @" callUUID" : callUUID }];
370
377
[action fulfill ];
371
378
}
372
379
@@ -376,7 +383,8 @@ - (void)provider:(CXProvider *)provider performEndCallAction:(CXEndCallAction *)
376
383
#ifdef DEBUG
377
384
NSLog (@" [RNCallKit][CXProviderDelegate][provider:performEndCallAction]" );
378
385
#endif
379
- [self sendEventWithName: RNCallKitPerformEndCallAction body: @{ @" callUUID" : action.callUUID .UUIDString }];
386
+ NSString *callUUID = [self containsLowerCaseLetter: action.callUUID.UUIDString] ? action.callUUID .UUIDString : [action.callUUID.UUIDString lowercaseString ];
387
+ [self sendEventWithName: RNCallKitPerformEndCallAction body: @{ @" callUUID" : callUUID }];
380
388
[action fulfill ];
381
389
}
382
390
You can’t perform that action at this time.
0 commit comments