From 05214832026dbd344218edfd3e6cd3a67db0bb5d Mon Sep 17 00:00:00 2001 From: Florian Friedrich Date: Thu, 14 Mar 2024 09:34:45 +0100 Subject: [PATCH] Fix warning on Linux --- Sources/VaporAPNS/APNSContainers.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sources/VaporAPNS/APNSContainers.swift b/Sources/VaporAPNS/APNSContainers.swift index 2db0813..7ea4686 100644 --- a/Sources/VaporAPNS/APNSContainers.swift +++ b/Sources/VaporAPNS/APNSContainers.swift @@ -1,6 +1,12 @@ import Vapor import APNS +#if canImport(Darwin) import Foundation +#else +// JSONEncoder / JSONDecoder is not Sendable in scf, but is in Darwin... +// Import as `@preconcurrency` to fix warnings. +@preconcurrency import Foundation +#endif import NIO import NIOConcurrencyHelpers