@@ -98,13 +98,13 @@ public struct APNSStartLiveActivityNotification<Attributes: Encodable, ContentSt
98
98
/// - expiration: The date when the notification is no longer valid and can be discarded.
99
99
/// - priority: The priority of the notification.
100
100
/// - appID: Your app’s bundle ID/app ID. This will be suffixed with `.push-type.liveactivity`.
101
- /// - apnsID: A canonical UUID that identifies the notification.
102
101
/// - contentState: Updated content-state of live activity
103
102
/// - timestamp: Timestamp when sending notification
104
103
/// - dismissalDate: Timestamp when to dismiss live notification when sent with `end`, if in the past
105
104
/// dismiss immediately
105
+ /// - apnsID: A canonical UUID that identifies the notification.
106
106
/// - attributes: The ActivityAttributes of the live activity to start
107
- /// - attributesString : The type name of the ActivityAttributes you want to send
107
+ /// - attributesType : The type name of the ActivityAttributes you want to send
108
108
/// - alert: An alert that will be sent along with the notification
109
109
public init (
110
110
expiration: APNSNotificationExpiration ,
@@ -118,59 +118,17 @@ public struct APNSStartLiveActivityNotification<Attributes: Encodable, ContentSt
118
118
attributesType: String ,
119
119
alert: APNSAlertNotificationContent
120
120
) {
121
- self . init (
122
- expiration: expiration,
123
- priority: priority,
124
- topic: appID + " .push-type.liveactivity " ,
125
- contentState: contentState,
126
- timestamp: timestamp,
127
- dismissalDate: dismissalDate,
128
- attributes: attributes,
129
- attributesType: attributesType,
130
- alert: alert
131
- )
132
- }
133
-
134
- /// Initializes a new ``APNSStartLiveActivityNotification``.
135
- ///
136
- /// - Important: Your dynamic payload will get encoded to the root of the JSON payload that is send to APNs.
137
- /// It is **important** that you do not encode anything with the key `aps`
138
- ///
139
- /// - Parameters:
140
- /// - expiration: The date when the notification is no longer valid and can be discarded.
141
- /// - priority: The priority of the notification.
142
- /// - topic: The topic for the notification. In general, the topic is your app’s bundle ID/app ID suffixed with `.push-type.liveactivity`.
143
- /// - apnsID: A canonical UUID that identifies the notification.
144
- /// - contentState: Updated content-state of live activity
145
- /// - timestamp: Timestamp when sending notification
146
- /// - dismissalDate: Timestamp when to dismiss live notification when sent with `end`, if in the past
147
- /// dismiss immediately
148
- /// - attributes: The ActivityAttributes of the live activity to start
149
- /// - attributesString: The type name of the ActivityAttributes you want to send
150
- /// - alert: An alert that will be sent along with the notification
151
- public init (
152
- expiration: APNSNotificationExpiration ,
153
- priority: APNSPriority ,
154
- topic: String ,
155
- apnsID: UUID ? = nil ,
156
- contentState: ContentState ,
157
- timestamp: Int ,
158
- dismissalDate: APNSLiveActivityDismissalDate = . none,
159
- attributes: Attributes ,
160
- attributesType: String ,
161
- alert: APNSAlertNotificationContent
162
- ) {
163
- self . aps = APNSStartLiveActivityNotificationAPSStorage (
164
- timestamp: timestamp,
165
- contentState: contentState,
166
- dismissalDate: dismissalDate. dismissal,
167
- alert: alert,
168
- attributes: attributes,
169
- attributesType: attributesType
170
- )
171
- self . apnsID = apnsID
172
- self . expiration = expiration
173
- self . priority = priority
174
- self . topic = topic
121
+ self . aps = APNSStartLiveActivityNotificationAPSStorage (
122
+ timestamp: timestamp,
123
+ contentState: contentState,
124
+ dismissalDate: dismissalDate. dismissal,
125
+ alert: alert,
126
+ attributes: attributes,
127
+ attributesType: attributesType
128
+ )
129
+ self . apnsID = apnsID
130
+ self . expiration = expiration
131
+ self . priority = priority
132
+ self . topic = appID + " .push-type.liveactivity "
175
133
}
176
134
}
0 commit comments