[英]Get the identifier of a specific notification when it is tapped in the notification center or tapped when it first appears
我正在嘗試使用userNotificationCenter(_:didReceive:withCompletionHandler :)方法(在Swift 4中)來處理用戶點擊通知時的情況。 但是,我想知道被竊聽的特定通知的標識符,而我還沒有找到實現此目的的方法。 有什么建議么?
原來我要做的就是:
let identifier = response.notification.request.identifier
謝謝您的回應!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.