Skip to content

Commit acc2aa9

Browse files
author
Ignacio Bonafonte
committed
Datadog Exporter: Fix some system version support for macOS and tvOS
1 parent 9991f56 commit acc2aa9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Sources/Exporters/DatadogExporter/Files/File.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ internal struct File: WritableFile, ReadableFile {
7171
```
7272
This is fixed in iOS 14/Xcode 12
7373
*/
74-
if #available(OSX 10.15, iOS 13.4, watchOS 6.0, tvOS 13.0, *) {
74+
if #available(OSX 10.15.4, iOS 13.4, watchOS 6.0, tvOS 13.4, *) {
7575
defer {
7676
try? fileHandle.close()
7777
if synchronized {
@@ -116,7 +116,7 @@ internal struct File: WritableFile, ReadableFile {
116116
```
117117
This is fixed in iOS 14/Xcode 12
118118
*/
119-
if #available(OSX 10.15, iOS 13.4, watchOS 6.0, tvOS 13.0, *) {
119+
if #available(OSX 10.15.4, iOS 13.4, watchOS 6.0, tvOS 13.4, *) {
120120
defer { try? fileHandle.close() }
121121
return try fileHandle.readToEnd() ?? Data()
122122
} else {

Sources/Exporters/DatadogExporter/Utils/JSONEncoder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ extension JSONEncoder {
2323
let formatted = iso8601DateFormatter.string(from: date)
2424
try container.encode(formatted)
2525
}
26-
if #available(iOS 13.0, OSX 10.15, *) {
26+
if #available(iOS 13.0, OSX 10.15, watchOS 6.0, tvOS 13.0, *) {
2727
encoder.outputFormatting = [.withoutEscapingSlashes]
2828
}
2929
return encoder

0 commit comments

Comments
 (0)