From 698fa936799f2a9ffc03e9f48da28b783e951bc3 Mon Sep 17 00:00:00 2001 From: Dimitri Bouniol Date: Tue, 7 May 2024 05:13:17 -0700 Subject: [PATCH] Deprecated .sandbox in favor of .development --- README.md | 2 +- Sources/APNS/APNS.docc/APNSwift.md | 2 +- Sources/APNSCore/APNSEnvironment.swift | 6 +++++- Sources/APNSExample/Program.swift | 2 +- Tests/APNSTests/APNSClientTests.swift | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 43f1afa1..ea070f9b 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ let client = APNSClient( keyIdentifier: keyIdentifier, teamIdentifier: teamIdentifier ), - environment: .sandbox + environment: .development ), eventLoopGroupProvider: .createNew, responseDecoder: JSONDecoder(), diff --git a/Sources/APNS/APNS.docc/APNSwift.md b/Sources/APNS/APNS.docc/APNSwift.md index 90441de0..5b0c9baa 100644 --- a/Sources/APNS/APNS.docc/APNSwift.md +++ b/Sources/APNS/APNS.docc/APNSwift.md @@ -37,7 +37,7 @@ let client = APNSClient( keyIdentifier: keyIdentifier, teamIdentifier: teamIdentifier ), - environment: .sandbox + environment: .development ), eventLoopGroupProvider: .createNew, responseDecoder: JSONDecoder(), diff --git a/Sources/APNSCore/APNSEnvironment.swift b/Sources/APNSCore/APNSEnvironment.swift index 304fb8ef..fad172f8 100644 --- a/Sources/APNSCore/APNSEnvironment.swift +++ b/Sources/APNSCore/APNSEnvironment.swift @@ -18,7 +18,11 @@ public struct APNSEnvironment: Sendable { public static let production = Self(url: "https://api.push.apple.com", port: 443) /// The sandbox APNs environment. - public static let sandbox = Self(url: "https://api.development.push.apple.com", port: 443) + @available(*, deprecated, renamed: "development") + public static let sandbox = development + + /// The development APNs environment. + public static let development = Self(url: "https://api.development.push.apple.com", port: 443) /// Creates an APNs environment with a custom URL. /// diff --git a/Sources/APNSExample/Program.swift b/Sources/APNSExample/Program.swift index 3ec6afdd..6c1c335c 100644 --- a/Sources/APNSExample/Program.swift +++ b/Sources/APNSExample/Program.swift @@ -37,7 +37,7 @@ struct Main { keyIdentifier: keyIdentifier, teamIdentifier: teamIdentifier ), - environment: .sandbox + environment: .development ), eventLoopGroupProvider: .createNew, responseDecoder: JSONDecoder(), diff --git a/Tests/APNSTests/APNSClientTests.swift b/Tests/APNSTests/APNSClientTests.swift index 17cb979a..e639179d 100644 --- a/Tests/APNSTests/APNSClientTests.swift +++ b/Tests/APNSTests/APNSClientTests.swift @@ -33,7 +33,7 @@ final class APNSClientTests: XCTestCase { keyIdentifier: "MY_KEY_ID", teamIdentifier: "MY_TEAM_ID" ), - environment: .sandbox + environment: .development ), eventLoopGroupProvider: .createNew, responseDecoder: JSONDecoder(),