Skip to content

Commit

Permalink
Format date properly
Browse files Browse the repository at this point in the history
  • Loading branch information
rlepinski committed Sep 30, 2024
1 parent 0ffc429 commit 398551a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion AirshipFrameworkProxy.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

Pod::Spec.new do |s|
s.version = "8.2.0"
s.version = "8.3.0"
s.name = "AirshipFrameworkProxy"
s.summary = "Airship iOS mobile framework proxy"
s.documentation_url = "https://docs.airship.com/platform/mobile"
Expand Down
2 changes: 1 addition & 1 deletion android/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]

# Airship
airshipProxy = '8.2.0'
airshipProxy = '8.3.0'
airship = '18.3.0'

# Gradle plugins
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ public struct LiveActivityRequest: Sendable, Equatable {
let type = try container.decode(DismissalType.self, forKey: .type)
switch (type) {
case .after:
self = .after(date: try container.decode(Date.self, forKey: .date))
let dateString = try container.decode(String.self, forKey: .date)
guard let date = AirshipDateFormatter.date(fromISOString: dateString) else {
throw AirshipErrors.error("Invalid date format \(dateString)")
}
self = .after(date: date)
case .immediate:
self = .immediate
case .default:
Expand All @@ -123,7 +127,7 @@ public struct LiveActivityRequest: Sendable, Equatable {
switch (self) {
case .after(let date):
try container.encode(DismissalType.after, forKey: .type)
try container.encode(date, forKey: .date)
try container.encode(AirshipDateFormatter.string(fromDate: date, format: .iso), forKey: .date)
case .immediate:
try container.encode(DismissalType.immediate, forKey: .type)
case .default:
Expand Down

0 comments on commit 398551a

Please sign in to comment.