Skip to content

armgit / xtool

Public Imported from GitHub
0

Cross-platform Xcode replacement. Build and deploy iOS apps with SwiftPM on Linux, Windows, macOS.

gsa: fix login using mismatched client-info (#337)

Kabir Oberaifae19812754f
diff --git a/Sources/XKit/GrandSlam/Anisette/ADIDataProvider.swift b/Sources/XKit/GrandSlam/Anisette/ADIDataProvider.swift
index 5d6bd67..2290f1f 100644
--- a/Sources/XKit/GrandSlam/Anisette/ADIDataProvider.swift
+++ b/Sources/XKit/GrandSlam/Anisette/ADIDataProvider.swift
@@ -249,11 +249,7 @@ public struct ADIDataProvider: AnisetteDataProvider {
}
private static var providerID: String? {
- #if os(macOS)
- return "1"
- #else
- return nil
- #endif
+ "2"
}
public var providerID: String? { Self.providerID }
diff --git a/Sources/XKit/GrandSlam/Anisette/DeviceInfo.swift b/Sources/XKit/GrandSlam/Anisette/DeviceInfo.swift
index 3b812d7..42c1d7f 100644
--- a/Sources/XKit/GrandSlam/Anisette/DeviceInfo.swift
+++ b/Sources/XKit/GrandSlam/Anisette/DeviceInfo.swift
@@ -21,7 +21,7 @@ public struct DeviceInfo: Codable, Sendable {
var clientString: String {
"""
- <\(modelID)> <macOS;27.0;26A5378j> <com.apple.AuthKit/1 (com.apple.akd/1.0)>
+ <Pixel 7> <Android;14;UQ1A.240205.002> <com.apple.AuthKit/1 (com.apple.akd/1.0)>
"""
}
diff --git a/Sources/XToolSupport/AuthCommand.swift b/Sources/XToolSupport/AuthCommand.swift
index c0d028c..e10aac3 100644
--- a/Sources/XToolSupport/AuthCommand.swift
+++ b/Sources/XToolSupport/AuthCommand.swift
@@ -76,6 +76,12 @@ struct AuthOperation {
}
private func logInWithPassword() async throws -> AuthToken {
+ print("""
+ Heads up:
+ This works by emulating a Pixel phone/Windows PC to interact with Apple services;
+ consider using a secondary Apple ID. Credentials are only ever sent to Apple.
+ """)
+
let username = try await Console.promptRequired("Apple ID: ", existing: username)
let password: String