File tree Expand file tree Collapse file tree 1 file changed +18
-6
lines changed Expand file tree Collapse file tree 1 file changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -226,18 +226,30 @@ - (void)pushRegistry:(PKPushRegistry *)registry didReceiveIncomingPushWithPayloa
226
226
/* payload example.
227
227
{
228
228
"callkeep": {
229
- "title": "Incoming Call",
230
- "number": "+86186123456789"
229
+ "caller_id": "+8618612345678",
230
+ "caller_name": "hello",
231
+ "caller_id_type": "number",
232
+ "has_video": false,
233
+ },
234
+ "extra": {
235
+ "foo": "bar",
236
+ "key": "value",
231
237
}
232
238
}
233
239
*/
234
240
NSDictionary *dic = payload.dictionaryPayload [@" callkeep" ];
235
- NSString *number = dic[@" number" ];
241
+ NSString *number = dic[@" caller_id" ];
242
+ NSString *localizedCallerName = dic[@" caller_name" ];
243
+ BOOL hasVideo = [dic[@" has_video" ] boolValue ];
244
+ NSString *handleType = dic[@" caller_id_type" ];
245
+
246
+ // NSDictionary *extra = payload.dictionaryPayload[@"extra"];
247
+
236
248
[CallKeep reportNewIncomingCall: [self createUUID ]
237
249
handle: number
238
- handleType: @" number "
239
- hasVideo: NO
240
- localizedCallerName: @" hello "
250
+ handleType: handleType
251
+ hasVideo: hasVideo
252
+ localizedCallerName: localizedCallerName
241
253
fromPushKit: YES
242
254
payload: payload.dictionaryPayload
243
255
withCompletionHandler: ^(){}];
You can’t perform that action at this time.
0 commit comments