Skip to content

Commit 0f10b6c

Browse files
MyrronthTobias Kreß
andauthored
Remove dismissalDate from APNSStartLiveActivityNotification (#228)
Co-authored-by: Tobias Kreß <tobias.kress@intive.com>
1 parent a22a0fc commit 0f10b6c

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

Sources/APNSCore/LiveActivity/APNSStartLiveActivityNotification.swift

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,6 @@ public struct APNSStartLiveActivityNotification<Attributes: Encodable & Sendable
5959
}
6060
}
6161

62-
public var dismissalDate: APNSLiveActivityDismissalDate? {
63-
get {
64-
return .init(dismissal: self.aps.dismissalDate)
65-
}
66-
set {
67-
self.aps.dismissalDate = newValue?.dismissal
68-
}
69-
}
70-
7162
/// A canonical UUID that identifies the notification. If there is an error sending the notification,
7263
/// APNs uses this value to identify the notification to your server. The canonical form is 32 lowercase hexadecimal digits,
7364
/// displayed in five groups separated by hyphens in the form 8-4-4-4-12. An example UUID is as follows:
@@ -100,8 +91,6 @@ public struct APNSStartLiveActivityNotification<Attributes: Encodable & Sendable
10091
/// - appID: Your app’s bundle ID/app ID. This will be suffixed with `.push-type.liveactivity`.
10192
/// - contentState: Updated content-state of live activity
10293
/// - timestamp: Timestamp when sending notification
103-
/// - dismissalDate: Timestamp when to dismiss live notification when sent with `end`, if in the past
104-
/// dismiss immediately
10594
/// - staleDate: Timestamp when the notification is marked as stale
10695
/// - apnsID: A canonical UUID that identifies the notification.
10796
/// - attributes: The ActivityAttributes of the live activity to start
@@ -113,7 +102,6 @@ public struct APNSStartLiveActivityNotification<Attributes: Encodable & Sendable
113102
appID: String,
114103
contentState: ContentState,
115104
timestamp: Int,
116-
dismissalDate: APNSLiveActivityDismissalDate = .none,
117105
staleDate: Int? = nil,
118106
apnsID: UUID? = nil,
119107
attributes: Attributes,
@@ -123,7 +111,6 @@ public struct APNSStartLiveActivityNotification<Attributes: Encodable & Sendable
123111
self.aps = APNSStartLiveActivityNotificationAPSStorage(
124112
timestamp: timestamp,
125113
contentState: contentState,
126-
dismissalDate: dismissalDate.dismissal,
127114
staleDate: staleDate,
128115
alert: alert,
129116
attributes: attributes,

Sources/APNSCore/LiveActivity/APNSStartLiveActivityNotificationAPSStorage.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ struct APNSStartLiveActivityNotificationAPSStorage<Attributes: Encodable & Senda
1919
case timestamp = "timestamp"
2020
case event = "event"
2121
case contentState = "content-state"
22-
case dismissalDate = "dismissal-date"
2322
case staleDate = "stale-date"
2423
case alert = "alert"
2524
case attributes = "attributes"
@@ -29,7 +28,6 @@ struct APNSStartLiveActivityNotificationAPSStorage<Attributes: Encodable & Senda
2928
var timestamp: Int
3029
var event: String = "start"
3130
var contentState: ContentState
32-
var dismissalDate: Int?
3331
var staleDate: Int?
3432
var alert: APNSAlertNotificationContent
3533
var attributes: Attributes
@@ -38,15 +36,13 @@ struct APNSStartLiveActivityNotificationAPSStorage<Attributes: Encodable & Senda
3836
init(
3937
timestamp: Int,
4038
contentState: ContentState,
41-
dismissalDate: Int?,
4239
staleDate: Int?,
4340
alert: APNSAlertNotificationContent,
4441
attributes: Attributes,
4542
attributesType: String
4643
) {
4744
self.timestamp = timestamp
4845
self.contentState = contentState
49-
self.dismissalDate = dismissalDate
5046
self.staleDate = staleDate
5147
self.alert = alert
5248
self.attributes = attributes

0 commit comments

Comments
 (0)