Skip to content

Commit 7853dbc

Browse files
aarkalykianlin
authored andcommitted
localizedCallerName added to displayIncomingCall (#33)
* localizedCallerName added to displayIncomingCall. * removed unnecessary brackets.
1 parent b631864 commit 7853dbc

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ export default class RNCallKit {
6666
_RNCallKit.setup(options);
6767
}
6868

69-
static displayIncomingCall(uuid, handle, handleType = 'number', hasVideo = false) {
69+
static displayIncomingCall(uuid, handle, handleType = 'number', hasVideo = false, localizedCallerName?: String) {
7070
if (Platform.OS !== 'ios') return;
71-
_RNCallKit.displayIncomingCall(uuid, handle, handleType, hasVideo);
71+
_RNCallKit.displayIncomingCall(uuid, handle, handleType, hasVideo, localizedCallerName);
7272
}
7373

7474
static startCall(uuid, handle, handleType = 'number', hasVideo = false) {

ios/RNCallKit/RNCallKit.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,9 @@ - (void)dealloc
8484
// Display the incoming call to the user
8585
RCT_EXPORT_METHOD(displayIncomingCall:(NSString *)uuidString
8686
handle:(NSString *)handle
87-
handleType:(NSString *)handleType
88-
hasVideo:(BOOL)hasVideo)
87+
handleType:(NSString *)handleType
88+
hasVideo:(BOOL)hasVideo
89+
localizedCallerName:(NSString * _Nullable)localizedCallerName)
8990
{
9091
#ifdef DEBUG
9192
NSLog(@"[RNCallKit][displayIncomingCall] uuidString = %@", uuidString);
@@ -100,6 +101,7 @@ - (void)dealloc
100101
callUpdate.supportsGrouping = NO;
101102
callUpdate.supportsUngrouping = NO;
102103
callUpdate.hasVideo = hasVideo;
104+
callUpdate.localizedCallerName = localizedCallerName;
103105

104106
[self.callKitProvider reportNewIncomingCallWithUUID:uuid update:callUpdate completion:^(NSError * _Nullable error) {
105107
if (error == nil) {

0 commit comments

Comments
 (0)