【发布时间】:2018-02-14 23:16:52
【问题描述】:
我正在尝试使可操作的通知正常工作,并且我已经获得了在通知展开时要显示的操作,但是当我选择一个操作时我无法调用委托函数。 I am declaring self.notificationCenter.delegate = self in application(_:didFinishLaunchingWithOptions:), and, if I'm understanding correctly, when an action is selected it should call userNotificationCenter(_:didReceive:withCompletionHandler:), passing in the UNNotificationResponse object.但是该方法永远不会在我的代码中被触发。任何想法为什么会发生这种情况?
【问题讨论】:
-
你创建了一个动作吗?如果是这样,您将需要首先检查操作标识符。检查this一个
-
@Mannopson 这最终不是问题,但我会调查一下,看看它是否仍然需要处理。谢谢。
标签: ios swift push-notification apple-push-notifications