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