Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ let package = Package(
.package(url: "https://github.com/xtool-org/xtool-core", .upToNextMinor(from: "1.5.0")),
.package(url: "https://github.com/xtool-org/SwiftyMobileDevice", .upToNextMinor(from: "1.7.0")),
.package(url: "https://github.com/xtool-org/zsign", .upToNextMinor(from: "1.9.0")),
.package(url: "https://github.com/xtool-org/xadi", .upToNextMinor(from: "0.4.2")),

.package(url: "https://github.com/apple/swift-system", from: "1.4.0"),
.package(url: "https://github.com/apple/swift-http-types", from: "1.3.1"),
Expand Down Expand Up @@ -126,7 +125,6 @@ let package = Package(
"DeveloperAPI",
"CXKit",
"XUtils",
.product(name: "XADI", package: "xadi", condition: .when(platforms: [.linux, .macOS])),
.product(name: "ConcurrencyExtras", package: "swift-concurrency-extras"),
.product(name: "Dependencies", package: "swift-dependencies"),
.product(name: "SwiftyMobileDevice", package: "SwiftyMobileDevice"),
Expand Down
10 changes: 2 additions & 8 deletions Sources/XKit/GrandSlam/Anisette/ADIDataProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,7 @@ private struct UnimplementedRawADIProvider: RawADIProvider {

private enum RawADIProviderDependencyKey: DependencyKey {
static let testValue: RawADIProvider = UnimplementedRawADIProvider()
static let liveValue: RawADIProvider = {
#if canImport(XADI)
return XADIProvider()
#else
return OmnisetteADIProvider()
#endif
}()
static let liveValue: RawADIProvider = OmnisetteADIProvider()
}

extension DependencyValues {
Expand Down Expand Up @@ -242,7 +236,7 @@ public struct ADIDataProvider: AnisetteDataProvider {
}

private static var providerID: String? {
"2"
"mac-omnisette"
}

public var providerID: String? { Self.providerID }
Expand Down
3 changes: 1 addition & 2 deletions Sources/XKit/GrandSlam/Anisette/OmnisetteADIProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ struct OmnisetteADIProvider: RawADIProvider {

// should implement v3 of https://github.com/SideStore/omnisette-server
// list: https://servers.sidestore.io/servers.json
// e.g. https://ani.sidestore.io
private let url: URL
init(
url: URL = URL(string: "https://ani.sidestore.io")! // URL(string: "http://localhost:6969")!
url: URL = URL(string: "https://mac-ani.jkcoxson.com")!
) {
self.url = url
}
Expand Down
198 changes: 0 additions & 198 deletions Sources/XKit/GrandSlam/Anisette/XADIProvider.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ extension GrandSlamTwoFactorRequest {
func configure(request: inout HTTPRequest, anisetteData: AnisetteData) {
request.headerFields[.accept] = "application/x-buddyml"
request.headerFields[.contentType] = "application/x-plist"
request.headerFields[.userAgent] = ""
request.headerFields[.userAgent] = DeviceInfo.akdUserAgent
request.headerFields[.init("X-Apple-App-Info")!] = "com.apple.gs.xcode.auth"
request.headerFields[.init(DeviceInfo.xcodeVersionKey)!] = DeviceInfo.xcodeVersion
request.headerFields[.init("X-Apple-Identity-Token")!] = loginData.identityToken
Expand Down
6 changes: 4 additions & 2 deletions Sources/XToolSupport/AuthCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ 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.
This works by emulating a virtual Mac to interact with Apple services.
We use a third-party service to create a randomized device ID token
(Anisette Data) but your credentials are only ever sent to Apple.
Still, consider using a secondary Apple ID since this is a private API.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
""")

let username = try await Console.promptRequired("Apple ID: ", existing: username)
Expand Down
Loading