File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -127,15 +127,15 @@ Make sure you enabled the folowing in `Xcode` -> `Signing & Capabilities`:
127127
128128 // --- NOTE: apple forced us to invoke callkit ASAP when we receive voip push
129129 // --- see: react-native-callkeep
130- if (@available (iOS 13, * )) {
131- // --- Retrieve information from your voip push payload
132- NSString * uuid = payload.dictionaryPayload[ @"uuid"] ;
133- NSString * callerName = [ NSString stringWithFormat:@"%@ (Connecting...)", payload.dictionaryPayload[ @"callerName"]] ;
134- NSString * handle = payload.dictionaryPayload[ @"handle"] ;
135130
136- [ RNCallKeep reportNewIncomingCall: uuid handle: handle handleType:@"generic" hasVideo: false localizedCallerName: callerName fromPushKit: YES] ;
137- }
138-
131+ // --- Retrieve information from your voip push payload
132+ NSString * uuid = payload.dictionaryPayload[ @"uuid"] ;
133+ NSString * callerName = [ NSString stringWithFormat:@"%@ (Connecting...)", payload.dictionaryPayload[ @"callerName"]] ;
134+ NSString * handle = payload.dictionaryPayload[ @"handle"] ;
135+
136+ // --- You should make sure to report to callkit BEFORE execute ` completion() `
137+ [ RNCallKeep reportNewIncomingCall: uuid handle: handle handleType:@"generic" hasVideo: false localizedCallerName: callerName fromPushKit: YES] ;
138+
139139 completion();
140140}
141141...
You can’t perform that action at this time.
0 commit comments