Skip to content

Commit a5e18fb

Browse files
authored
Merge pull request #175 from react-native-webrtc/zxcpoiu-patch-2
ios: fix NSPlaceholderDictionary can not be nil
2 parents a4e3ead + 6e4d9c9 commit a5e18fb

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

ios/RNCallKeep/RNCallKeep.m

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,15 @@ + (void)reportNewIncomingCall:(NSString *)uuidString
358358
[RNCallKeep initCallKitProvider];
359359
[sharedProvider reportNewIncomingCallWithUUID:uuid update:callUpdate completion:^(NSError * _Nullable error) {
360360
RNCallKeep *callKeep = [RNCallKeep allocWithZone: nil];
361-
[callKeep sendEventWithName:RNCallKeepDidDisplayIncomingCall body:@{ @"error": error ? error.localizedDescription : @"", @"callUUID": uuidString, @"handle": handle, @"localizedCallerName": localizedCallerName, @"hasVideo": hasVideo ? @"1" : @"0", @"fromPushKit": fromPushKit ? @"1" : @"0", @"payload": payload }];
361+
[callKeep sendEventWithName:RNCallKeepDidDisplayIncomingCall body:@{
362+
@"error": error && error.localizedDescription ? error.localizedDescription : @"",
363+
@"callUUID": uuidString,
364+
@"handle": handle,
365+
@"localizedCallerName": localizedCallerName ? localizedCallerName : @"",
366+
@"hasVideo": hasVideo ? @"1" : @"0",
367+
@"fromPushKit": fromPushKit ? @"1" : @"0",
368+
@"payload": payload ? payload : @"",
369+
}];
362370
if (error == nil) {
363371
// Workaround per https://forums.developer.apple.com/message/169511
364372
if ([callKeep lessThanIos10_2]) {

0 commit comments

Comments
 (0)