Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,6 @@ public struct APNSStartLiveActivityNotification<Attributes: Encodable & Sendable
}
}

public var dismissalDate: APNSLiveActivityDismissalDate? {
get {
return .init(dismissal: self.aps.dismissalDate)
}
set {
self.aps.dismissalDate = newValue?.dismissal
}
}

/// A canonical UUID that identifies the notification. If there is an error sending the notification,
/// APNs uses this value to identify the notification to your server. The canonical form is 32 lowercase hexadecimal digits,
/// displayed in five groups separated by hyphens in the form 8-4-4-4-12. An example UUID is as follows:
Expand Down Expand Up @@ -100,8 +91,6 @@ public struct APNSStartLiveActivityNotification<Attributes: Encodable & Sendable
/// - appID: Your app’s bundle ID/app ID. This will be suffixed with `.push-type.liveactivity`.
/// - contentState: Updated content-state of live activity
/// - timestamp: Timestamp when sending notification
/// - dismissalDate: Timestamp when to dismiss live notification when sent with `end`, if in the past
/// dismiss immediately
/// - staleDate: Timestamp when the notification is marked as stale
/// - apnsID: A canonical UUID that identifies the notification.
/// - attributes: The ActivityAttributes of the live activity to start
Expand All @@ -113,7 +102,6 @@ public struct APNSStartLiveActivityNotification<Attributes: Encodable & Sendable
appID: String,
contentState: ContentState,
timestamp: Int,
dismissalDate: APNSLiveActivityDismissalDate = .none,
staleDate: Int? = nil,
apnsID: UUID? = nil,
attributes: Attributes,
Expand All @@ -123,7 +111,6 @@ public struct APNSStartLiveActivityNotification<Attributes: Encodable & Sendable
self.aps = APNSStartLiveActivityNotificationAPSStorage(
timestamp: timestamp,
contentState: contentState,
dismissalDate: dismissalDate.dismissal,
staleDate: staleDate,
alert: alert,
attributes: attributes,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ struct APNSStartLiveActivityNotificationAPSStorage<Attributes: Encodable & Senda
case timestamp = "timestamp"
case event = "event"
case contentState = "content-state"
case dismissalDate = "dismissal-date"
case staleDate = "stale-date"
case alert = "alert"
case attributes = "attributes"
Expand All @@ -29,7 +28,6 @@ struct APNSStartLiveActivityNotificationAPSStorage<Attributes: Encodable & Senda
var timestamp: Int
var event: String = "start"
var contentState: ContentState
var dismissalDate: Int?
var staleDate: Int?
var alert: APNSAlertNotificationContent
var attributes: Attributes
Expand All @@ -38,15 +36,13 @@ struct APNSStartLiveActivityNotificationAPSStorage<Attributes: Encodable & Senda
init(
timestamp: Int,
contentState: ContentState,
dismissalDate: Int?,
staleDate: Int?,
alert: APNSAlertNotificationContent,
attributes: Attributes,
attributesType: String
) {
self.timestamp = timestamp
self.contentState = contentState
self.dismissalDate = dismissalDate
self.staleDate = staleDate
self.alert = alert
self.attributes = attributes
Expand Down