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
226226 /* payload example.
227227 {
228228 "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",
231237 }
232238 }
233239 */
234240 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+
236248 [CallKeep reportNewIncomingCall: [self createUUID ]
237249 handle: number
238- handleType: @" number "
239- hasVideo: NO
240- localizedCallerName: @" hello "
250+ handleType: handleType
251+ hasVideo: hasVideo
252+ localizedCallerName: localizedCallerName
241253 fromPushKit: YES
242254 payload: payload.dictionaryPayload
243255 withCompletionHandler: ^(){}];
You can’t perform that action at this time.
0 commit comments