Skip to content

Commit 50652c4

Browse files
committed
When using the alert format, print the log and terminate the calkeep process.
1 parent 1052eda commit 50652c4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ios/Classes/CallKeep.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,14 @@ - (void)pushRegistry:(PKPushRegistry *)registry didReceiveIncomingPushWithPayloa
232232
"has_video": false,
233233
}
234234
*/
235+
235236
NSDictionary *dic = payload.dictionaryPayload;
236237

238+
if (dic[@"aps"] != nil) {
239+
NSLog(@"Do not use the 'alert' format for push type %@.", payload.type);
240+
return;
241+
}
242+
237243
NSString *uuid = dic[@"uuid"];
238244
NSString *callerId = dic[@"caller_id"];
239245
NSString *callerName = dic[@"caller_name"];

0 commit comments

Comments
 (0)