Download this file
| 1 | // Test-only target. The production application never reads fixture credentials. |
| 2 | import SwiftUI |
| 3 | import RastrilloApple |
| 4 | import SheetsKit |
| 5 | |
| 6 | @main struct ReviewPhone: App { |
| 7 | private let client: NativeHTTP |
| 8 | |
| 9 | init() { |
| 10 | let path = URL.documentsDirectory.appendingPathComponent("review.json") |
| 11 | let input = try! JSONDecoder().decode(ReviewInput.self, from: Data(contentsOf: path)) |
| 12 | precondition(input.origin.scheme == "http" && input.origin.host == "127.0.0.1") |
| 13 | client = NativeHTTP(origin: input.origin, credential: input.credential) |
| 14 | } |
| 15 | |
| 16 | var body: some Scene { |
| 17 | WindowGroup { |
| 18 | SheetsWorkspace(client: client, signOut: {}) |
| 19 | .preferredColorScheme(.light) |
| 20 | } |
| 21 | } |
| 22 | } |
| 23 | |