Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
1131cb17c6 | |||
c05643c6f1 | |||
fde2062507 | |||
e4883f9b2b |
@ -1,4 +1,4 @@
|
|||||||
// swift-tools-version: 5.6
|
// swift-tools-version: 5.5
|
||||||
|
|
||||||
import PackageDescription
|
import PackageDescription
|
||||||
|
|
||||||
@ -14,14 +14,15 @@ let package = Package(
|
|||||||
targets: ["Push"]),
|
targets: ["Push"]),
|
||||||
],
|
],
|
||||||
dependencies: [
|
dependencies: [
|
||||||
.package(url: "https://christophhagen.de/git/ch/Push-API.git", from: "0.5.0"),
|
.package(url: "https://christophhagen.de/git/ch/Push-Definitions.git", from: "1.0.0"),
|
||||||
|
.package(url: "https://github.com/swift-server-community/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: [
|
||||||
.target(
|
.target(
|
||||||
name: "Push",
|
name: "Push",
|
||||||
dependencies: [
|
dependencies: [
|
||||||
.product(name: "PushAPI", package: "Push-API"),
|
.product(name: "PushMessageDefinitions", package: "Push-Definitions"),
|
||||||
.product(name: "Crypto", package: "swift-crypto")
|
.product(name: "Crypto", package: "swift-crypto")
|
||||||
]),
|
]),
|
||||||
]
|
]
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import PushAPI
|
import PushMessageDefinitions
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
#if canImport(CryptoKit)
|
#if canImport(CryptoKit)
|
||||||
@ -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 {
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
import XCTest
|
|
||||||
@testable import Push_iOS
|
|
||||||
|
|
||||||
final class Push_iOSTests: XCTestCase {
|
|
||||||
func testExample() throws {
|
|
||||||
// This is an example of a functional test case.
|
|
||||||
// Use XCTAssert and related functions to verify your tests produce the correct
|
|
||||||
// results.
|
|
||||||
XCTAssertEqual(Push_iOS().text, "Hello, World!")
|
|
||||||
}
|
|
||||||
}
|
|
Reference in New Issue
Block a user