8
8
import UserNotifications
9
9
import os. log
10
10
11
- /// Attaches an image to a remote notification before it’s delivered to the user.
11
+ /// Attaches a media ( image, sound, or video) item to a remote notification before it’s delivered to the user.
12
12
///
13
- /// The image will be downloaded from a URL specified in the incoming notification. The
13
+ /// The media will be downloaded from a URL specified in the incoming notification. The
14
14
/// format of the notification payload and name of the field containing the image URL is
15
15
/// specified in payloadSchema, which conforms to AUNotificationPayload.
16
16
open class AUNotificationService : UNNotificationServiceExtension {
@@ -20,7 +20,7 @@ open class AUNotificationService: UNNotificationServiceExtension {
20
20
/// You can override the default value in the initializer of a child class.
21
21
///
22
22
/// Default: PinpointNotificationPayload
23
- open var payloadSchema : AUNotificationPayload . Type = PinpointNotificationPayload . self
23
+ public var payloadSchema : AUNotificationPayload . Type = PinpointNotificationPayload . self
24
24
25
25
/// Function for retrieve data from remote URL.
26
26
///
@@ -29,8 +29,11 @@ open class AUNotificationService: UNNotificationServiceExtension {
29
29
/// Default: Data.init(contentsOf:options:)
30
30
var loadDataFromURL : ( URL ) throws -> Data = { try Data ( contentsOf: $0) }
31
31
32
- var contentHandler : ( ( UNNotificationContent ) -> Void ) ?
33
- var bestAttemptContent : UNMutableNotificationContent ?
32
+ /// The content handler for the notification.
33
+ public var contentHandler : ( ( UNNotificationContent ) -> Void ) ?
34
+
35
+ /// The content for the notification.
36
+ public var bestAttemptContent : UNMutableNotificationContent ?
34
37
35
38
/// Called when in incomming notification is received. Allows modification of the notification request before delivery.
36
39
/// - Parameters:
0 commit comments