Thursday, May 21, 2026
HomeiOS Developmentios - Not in a position to fetch actionIdentifier from UNUserNotificationCenter delegate...

ios – Not in a position to fetch actionIdentifier from UNUserNotificationCenter delegate strategies

[ad_1]

So I’ve added didReceiveRemoteNotification delegate to deal with push notification, complete implementation is as follows:

func userNotificationCenter(_ middle: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
    let userInfo: [AnyHashable : Any] = response.notification.request.content material.userInfo
    handleNotifiation(userInfo, response.actionIdentifier)
    completionHandler()
}

func utility(_ utility: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
    refreshDataOnNotifications()
    handleNotifiation(userInfo)
    completionHandler(.newData)
}

As you may see, I am simply in a position to fetch motion identifier from didReceive methodology, However looks as if I am not getting any property which utilizing I can carry out the identical in didReceiveRemoteNotification methodology.
Thanks prematurely.

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments