当我们单击通知按钮时,我正在尝试在后台应用程序时调用API。
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
switch response.actionIdentifier {
case "Reschedule":
"api code"
}