Skip to content

Commit 5f1e9ca

Browse files
authored
Merge branch 'main' into ff-fix-warnings
2 parents d7186b4 + 2bd65f9 commit 5f1e9ca

23 files changed

+106
-4
lines changed

Package.swift

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ let package = Package(
4040
.target(name: "APNSCore"),
4141
.target(name: "APNS"),
4242
.target(name: "APNSTestServer"),
43+
.product(name: "Crypto", package: "swift-crypto"),
44+
.product(name: "NIOPosix", package: "swift-nio"),
4345
]
4446
),
4547
.target(
@@ -51,9 +53,14 @@ let package = Package(
5153
.target(
5254
name: "APNS",
5355
dependencies: [
54-
.product(name: "Crypto", package: "swift-crypto"),
55-
.product(name: "AsyncHTTPClient", package: "async-http-client"),
5656
.target(name: "APNSCore"),
57+
.product(name: "AsyncHTTPClient", package: "async-http-client"),
58+
.product(name: "Crypto", package: "swift-crypto"),
59+
.product(name: "NIOFoundationCompat", package: "swift-nio"),
60+
.product(name: "NIOHTTP1", package: "swift-nio"),
61+
.product(name: "NIOPosix", package: "swift-nio"),
62+
.product(name: "NIOTLS", package: "swift-nio"),
63+
.product(name: "NIOSSL", package: "swift-nio-ssl"),
5764
]
5865
),
5966
.target(

Package@swift-5.10.swift

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ let package = Package(
4040
.target(name: "APNSCore"),
4141
.target(name: "APNS"),
4242
.target(name: "APNSTestServer"),
43+
.product(name: "Crypto", package: "swift-crypto"),
44+
.product(name: "NIOPosix", package: "swift-nio"),
4345
]
4446
),
4547
.target(
@@ -51,9 +53,14 @@ let package = Package(
5153
.target(
5254
name: "APNS",
5355
dependencies: [
54-
.product(name: "Crypto", package: "swift-crypto"),
55-
.product(name: "AsyncHTTPClient", package: "async-http-client"),
5656
.target(name: "APNSCore"),
57+
.product(name: "AsyncHTTPClient", package: "async-http-client"),
58+
.product(name: "Crypto", package: "swift-crypto"),
59+
.product(name: "NIOFoundationCompat", package: "swift-nio"),
60+
.product(name: "NIOHTTP1", package: "swift-nio"),
61+
.product(name: "NIOPosix", package: "swift-nio"),
62+
.product(name: "NIOTLS", package: "swift-nio"),
63+
.product(name: "NIOSSL", package: "swift-nio-ssl"),
5764
]
5865
),
5966
.target(

Sources/APNS/APNSBroadcastClient.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,13 @@
1414

1515
import APNSCore
1616
import AsyncHTTPClient
17+
#if canImport(FoundationEssentials)
18+
import struct FoundationEssentials.Date
19+
import struct FoundationEssentials.UUID
20+
#else
1721
import struct Foundation.Date
1822
import struct Foundation.UUID
23+
#endif
1924
import NIOConcurrencyHelpers
2025
import NIOCore
2126
import NIOHTTP1

Sources/APNS/APNSClient.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,13 @@
1414

1515
import APNSCore
1616
import AsyncHTTPClient
17+
#if canImport(FoundationEssentials)
18+
import struct FoundationEssentials.Date
19+
import struct FoundationEssentials.UUID
20+
#else
1721
import struct Foundation.Date
1822
import struct Foundation.UUID
23+
#endif
1924
import NIOConcurrencyHelpers
2025
import NIOCore
2126
import NIOHTTP1

Sources/APNS/Coding/APNSJSONDecoder.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15+
#if canImport(FoundationEssentials)
16+
import FoundationEssentials
17+
#else
1518
import Foundation
19+
#endif
1620
import NIOCore
1721
import NIOFoundationCompat
1822

Sources/APNS/Coding/APNSJSONEncoder.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15+
#if canImport(FoundationEssentials)
16+
import FoundationEssentials
17+
#else
1518
import Foundation
19+
#endif
1620
import NIOCore
1721
import NIOFoundationCompat
1822

Sources/APNSCore/APNSError.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,13 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15+
#if canImport(FoundationEssentials)
16+
import struct FoundationEssentials.Date
17+
import struct FoundationEssentials.UUID
18+
#else
1519
import struct Foundation.Date
1620
import struct Foundation.UUID
21+
#endif
1722

1823
/// An error returned by APNs.
1924
public struct APNSError: Error {

Sources/APNSCore/APNSRequest.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15+
#if canImport(FoundationEssentials)
16+
import struct FoundationEssentials.UUID
17+
#else
1518
import struct Foundation.UUID
19+
#endif
1620

1721
public struct APNSRequest<Message: APNSMessage> {
1822
fileprivate final class _Storage {

Sources/APNSCore/APNSResponse.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15+
#if canImport(FoundationEssentials)
16+
import struct FoundationEssentials.UUID
17+
#else
1518
import struct Foundation.UUID
19+
#endif
1620

1721
/// The response of a successful APNs request.
1822
public struct APNSResponse: Hashable, Sendable {

Sources/APNSCore/Alert/APNSAlertNotification.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15+
#if canImport(FoundationEssentials)
16+
import struct FoundationEssentials.UUID
17+
#else
1518
import struct Foundation.UUID
19+
#endif
1620

1721
/// An alert notification.
1822
///

0 commit comments

Comments
 (0)