Narrow the live service initializer visibility, correct key material decoding, and restrict the location evidence helper to iOS so the app builds cleanly on macOS.
This commit is contained in:
@@ -34,7 +34,7 @@ actor LiveIDPService: IDPServicing {
|
||||
private let appStateStore: AppStateStoring
|
||||
private let keyStore: PassportKeyStoring
|
||||
|
||||
init(
|
||||
private init(
|
||||
appStateStore: AppStateStoring = UserDefaultsAppStateStore(),
|
||||
keyStore: PassportKeyStoring = DefaultPassportKeyStore()
|
||||
) {
|
||||
@@ -54,7 +54,10 @@ actor LiveIDPService: IDPServicing {
|
||||
let client = LiveTypedRequestClient(baseURL: baseURL)
|
||||
let keyMaterial = try loadOrCreateKeyMaterial(for: context.originHost)
|
||||
let signingPayload = try buildEnrollmentSigningPayload(from: context)
|
||||
let signatureBase64 = try signPayload(signingPayload, with: keyMaterial.privateKeyData)
|
||||
guard let privateKeyData = Data(base64Encoded: keyMaterial.privateKeyBase64) else {
|
||||
throw AppError.invalidPairingPayload
|
||||
}
|
||||
let signatureBase64 = try signPayload(signingPayload, with: privateKeyData)
|
||||
|
||||
let enrollmentResponse = try await client.fire(
|
||||
method: "completePassportEnrollment",
|
||||
@@ -1134,7 +1137,7 @@ private struct ServerAlert: Decodable {
|
||||
let data: DataPayload
|
||||
}
|
||||
|
||||
#if canImport(CoreLocation)
|
||||
#if canImport(CoreLocation) && os(iOS)
|
||||
@MainActor
|
||||
private final class CurrentLocationEvidenceProvider: NSObject, @preconcurrency CLLocationManagerDelegate {
|
||||
private var manager: CLLocationManager?
|
||||
|
||||
Reference in New Issue
Block a user