Skip to content
This repository was archived by the owner on Apr 11, 2023. It is now read-only.
This repository was archived by the owner on Apr 11, 2023. It is now read-only.

iOS 10以上 点击消息不能响应 didReceiveNotificationResponse #22

@stevenxyj

Description

@stevenxyj

AppDelegate.m 已经增加

- (void)xgPushUserNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)(void))completionHandler {
	NSLog(@"[XGPush] click notification");

	[[XGPush defaultManager] reportXGNotificationResponse:response];
	
	completionHandler();
}

收到消息后,点击消息,可以打开应用,但不能响应 notification 事件,这样就不能取得消息中的数据,调试提示出现如下错误
Warning: UNUserNotificationCenter delegate received call to -userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler: but the completion handler was never called.

请问会是什么原因?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions