diff --git a/.github/workflows/shared-swift.yml b/.github/workflows/shared-swift.yml index 18c1671915b..21120da609d 100644 --- a/.github/workflows/shared-swift.yml +++ b/.github/workflows/shared-swift.yml @@ -31,9 +31,9 @@ jobs: - os: macos-15 xcode: Xcode_16.2 swift_version: 5.9 - # - os: macos-15 - # xcode: Xcode_16.2 - # swift_version: 6.0 + - os: macos-15 + xcode: Xcode_16.2 + swift_version: 6.0 runs-on: ${{ matrix.build-env.os }} steps: - uses: actions/checkout@v4 diff --git a/FirebaseSharedSwift/Sources/third_party/FirebaseDataEncoder/FirebaseDataEncoder.swift b/FirebaseSharedSwift/Sources/third_party/FirebaseDataEncoder/FirebaseDataEncoder.swift index e411e796507..c783718c50d 100644 --- a/FirebaseSharedSwift/Sources/third_party/FirebaseDataEncoder/FirebaseDataEncoder.swift +++ b/FirebaseSharedSwift/Sources/third_party/FirebaseDataEncoder/FirebaseDataEncoder.swift @@ -2611,11 +2611,19 @@ fileprivate struct _JSONKey : CodingKey { //===----------------------------------------------------------------------===// // NOTE: This value is implicitly lazy and _must_ be lazy. We're compiled against the latest SDK (w/ ISO8601DateFormatter), but linked against whichever Foundation the user has. ISO8601DateFormatter might not exist, so we better not hit this code path on an older OS. +#if compiler(>=6) +nonisolated(unsafe) fileprivate var _iso8601Formatter: ISO8601DateFormatter = { + let formatter = ISO8601DateFormatter() + formatter.formatOptions = .withInternetDateTime + return formatter +}() +#else fileprivate var _iso8601Formatter: ISO8601DateFormatter = { let formatter = ISO8601DateFormatter() formatter.formatOptions = .withInternetDateTime return formatter }() +#endif //===----------------------------------------------------------------------===// // Error Utilities