4 Commits

Author SHA1 Message Date
Christoph Hagen
fde2062507 Reduce swift tools version 2022-06-09 11:38:53 +02:00
Christoph Hagen
e4883f9b2b Update route 2022-06-07 17:21:47 +02:00
Christoph Hagen
910f7e5f91 Specify dependency version 2022-06-07 14:14:40 +02:00
Christoph Hagen
1092d776cd Ignore swift pm files 2022-06-07 14:11:18 +02:00
4 changed files with 6 additions and 11 deletions

1
.gitignore vendored
View File

@@ -8,3 +8,4 @@ DerivedData/
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.netrc .netrc
Package.resolved Package.resolved
.swiftpm/

View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@@ -1,4 +1,4 @@
// swift-tools-version: 5.6 // swift-tools-version: 5.5
import PackageDescription import PackageDescription
@@ -14,7 +14,8 @@ let package = Package(
targets: ["Push"]), targets: ["Push"]),
], ],
dependencies: [ dependencies: [
.package(url: "https://christophhagen.de/git/ch/Push-API.git", branch: "main"), .package(url: "https://christophhagen.de/git/ch/Push-API.git", from: "0.7.2"),
.package(url: "https://github.com/kylebrowning/APNSwift.git", from: "4.0.0"),
.package(url: "https://github.com/apple/swift-crypto.git", "1.0.0" ..< "3.0.0") .package(url: "https://github.com/apple/swift-crypto.git", "1.0.0" ..< "3.0.0")
], ],
targets: [ targets: [

View File

@@ -76,7 +76,8 @@ public final class PushClient {
*/ */
public func getUnapprovedDevices(masterKey: String) async -> [DeviceRegistration]? { public func getUnapprovedDevices(masterKey: String) async -> [DeviceRegistration]? {
let hash = hash(masterKey) let hash = hash(masterKey)
guard let data = await post(.listUnapprovedDevices, bodyData: hash) else { let request = AdminRequest(keyHash: hash, application: application)
guard let data = await post(.listUnapprovedDevices, body: request) else {
return nil return nil
} }
do { do {