✨ Replyable message notification (w.i.p)
This commit is contained in:
20
ios/Runner/NotifyDelegate.swift
Normal file
20
ios/Runner/NotifyDelegate.swift
Normal file
@ -0,0 +1,20 @@
|
||||
//
|
||||
// NotifyDelegate.swift
|
||||
// Runner
|
||||
//
|
||||
// Created by LittleSheep on 2024/12/21.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
class NotifyDelegate: UIResponder, UNUserNotificationCenterDelegate {
|
||||
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
|
||||
if let textResponse = response as? UNTextInputNotificationResponse {
|
||||
let userText = textResponse.userText
|
||||
print("User replied: \(userText)")
|
||||
// Handle the reply text
|
||||
}
|
||||
|
||||
completionHandler()
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user