UNNotificationResponse

Panther·2021년 8월 17일
0

https://developer.apple.com/documentation/usernotifications/unnotificationresponse

"The user’s response to an actionable notification."

액션 가능한 노티피케이션에 대한 사용자의 응답입니다.

Declaration

class UNNotificationResponse : NSObject

Overview

사용자가 전달된 노티피케이션과 상호작용하면 시스템은 응답을 처리할 수 있도록 앱에 UNNotificationResponse를 앱에게 전달합니다. 사용자는 여러 방법으로 전달된 노티피케이션과 상호작용할 수 있습니다. 상호작용의 카테고리가 액션 버튼과 연관이 있었던 것이라면 사용자는 버튼의 한 가지를 선택할 것입니다. 사용자는 액션의 한 가지를 선택하지 않고 노티피케이션을 버릴 수 있으며, 앱을 열 수도 있습니다. 응답 객체는 어떤 옵션이 사용자로부터 선택되었는지를 알려줍니다.

UNNotificationResponse 객체를 직접 생성하지 않아야 합니다. 대신 공유된 사용자 노티피케이션 센터 객체가 이들을 생성하고, 노티피케이션 센터 객체의 딜리게이트 객체 메소드userNotificationCenter(_:didReceive:withCompletionHandler:)에 전달합니다. 응답 객체로부터 필요한 정보를 추출하기 위해 이 메소드를 사용할 수 있으며, 적합한 액션을 취할 수도 있습니다.

액션에 응답하는 것에 대한 정보는 Handling Notifications and Notification-Related Actions를 보시기 바랍니다.

Handling Notifications and Notification-Related Actions
https://developer.apple.com/documentation/usernotifications/handling_notifications_and_notification-related_actions
https://velog.io/@panther222128/Handling-Notifications-and-Notification-Related-Actions

See Also


Notification Responses

시스템의 노티피케이션 인터페이스로 사용자 상호작용에 응답합니다. 앱의 커스텀 액션도 포함합니다.

https://developer.apple.com/documentation/usernotifications/handling_notifications_and_notification-related_actions
https://velog.io/@panther222128/Handling-Notifications-and-Notification-Related-Actions

UNTextInputNotificationResponse

사용자가 타입하거나 받아쓰기 한 모든 커스텀 텍스트를 포함해, 액션 가능한 노티피케이션에 대한 사용자의 응답입니다.

https://developer.apple.com/documentation/usernotifications/untextinputnotificationresponse
https://velog.io/@panther222128/UNTextInputNotificationResponse


0개의 댓글