mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-12 00:03:27 +01:00
App builds in xcodeproj (todo widget)
This commit is contained in:
@@ -27,7 +27,7 @@ struct AnisetteDataManager {
|
||||
}
|
||||
|
||||
func requestAnisetteData() throws -> ALTAnisetteData {
|
||||
var request = URLRequest(url: URL(string: "https://developerservices2.apple.com/services/QH65B2/listTeams.action?clientId=XABBG36SBA")!)
|
||||
var request = URLRequest(url: URL(string: "https://developerservices2.apple.com/services/QH65B2/listTeams.action?clientId=XABBG36SBA")!)
|
||||
request.httpMethod = "POST"
|
||||
|
||||
let akAppleIDSession = unsafeBitCast(NSClassFromString("AKAppleIDSession")!, to: AKAppleIDSession.Type.self)
|
||||
|
||||
@@ -71,7 +71,7 @@ struct AppManager {
|
||||
if installingBundleIDs.contains(profile.bundleIdentifier) || (activeProfiles?.contains(profile.bundleIdentifier) == false && profile.isFreeProvisioningProfile) {
|
||||
try FileManager.default.removeItem(at: fileURL)
|
||||
} else {
|
||||
print("Ignoring:", profile.bundleIdentifier, profile.uuid)
|
||||
os_log("Ignoring: %@ %@", type: .info , profile.bundleIdentifier, profile.uuid)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
import Foundation
|
||||
import Shared
|
||||
import SideKit
|
||||
import os.log
|
||||
|
||||
typealias DaemonConnectionManager = ConnectionManager<DaemonRequestHandler>
|
||||
|
||||
@@ -39,7 +40,7 @@ struct DaemonRequestHandler: RequestHandler {
|
||||
print("Awaiting begin installation request...")
|
||||
|
||||
connection.receiveRequest { result in
|
||||
print("Received begin installation request with result:", result)
|
||||
os_log("Received begin installation request with result: %@", type: .info , String(describing: result))
|
||||
|
||||
do {
|
||||
guard case let .beginInstallation(request) = try result.get() else { throw ALTServerError(.unknownRequest) }
|
||||
@@ -47,7 +48,7 @@ struct DaemonRequestHandler: RequestHandler {
|
||||
|
||||
AppManager.shared.installApp(at: fileURL, bundleIdentifier: bundleIdentifier, activeProfiles: request.activeProfiles) { result in
|
||||
let result = result.map { InstallationProgressResponse(progress: 1.0) }
|
||||
print("Installed app with result:", result)
|
||||
os_log("Installed app with result: %@", type: .info, String(describing: result))
|
||||
|
||||
completionHandler(result)
|
||||
}
|
||||
@@ -62,11 +63,11 @@ struct DaemonRequestHandler: RequestHandler {
|
||||
AppManager.shared.install(request.provisioningProfiles, activeProfiles: request.activeProfiles) { result in
|
||||
switch result {
|
||||
case let .failure(error):
|
||||
print("Failed to install profiles \(request.provisioningProfiles.map { $0.bundleIdentifier }):", error)
|
||||
os_log("Failed to install profiles %@ : %@", type: .error , request.provisioningProfiles.map { $0.bundleIdentifier }.joined(separator: "\n"), error.localizedDescription)
|
||||
completionHandler(.failure(error))
|
||||
|
||||
case .success:
|
||||
print("Installed profiles:", request.provisioningProfiles.map { $0.bundleIdentifier })
|
||||
os_log("Installed profiles: %@", type: .info , request.provisioningProfiles.map { $0.bundleIdentifier }.joined(separator: "\n"))
|
||||
|
||||
let response = InstallProvisioningProfilesResponse()
|
||||
completionHandler(.success(response))
|
||||
@@ -79,11 +80,11 @@ struct DaemonRequestHandler: RequestHandler {
|
||||
AppManager.shared.removeProvisioningProfiles(forBundleIdentifiers: request.bundleIdentifiers) { result in
|
||||
switch result {
|
||||
case let .failure(error):
|
||||
print("Failed to remove profiles \(request.bundleIdentifiers):", error)
|
||||
os_log("Failed to remove profiles %@ : %@", type: .error, request.bundleIdentifiers, error.localizedDescription)
|
||||
completionHandler(.failure(error))
|
||||
|
||||
case .success:
|
||||
print("Removed profiles:", request.bundleIdentifiers)
|
||||
os_log("Removed profiles: %@", type: .info , request.bundleIdentifiers)
|
||||
|
||||
let response = RemoveProvisioningProfilesResponse()
|
||||
completionHandler(.success(response))
|
||||
@@ -95,11 +96,11 @@ struct DaemonRequestHandler: RequestHandler {
|
||||
AppManager.shared.removeApp(forBundleIdentifier: request.bundleIdentifier) { result in
|
||||
switch result {
|
||||
case let .failure(error):
|
||||
print("Failed to remove app \(request.bundleIdentifier):", error)
|
||||
os_log("Failed to remove app %@ : %@", type: .error , request.bundleIdentifier, error.localizedDescription)
|
||||
completionHandler(.failure(error))
|
||||
|
||||
case .success:
|
||||
print("Removed app:", request.bundleIdentifier)
|
||||
os_log("Removed app: %@", type: .info , request.bundleIdentifier)
|
||||
|
||||
let response = RemoveAppResponse()
|
||||
completionHandler(.success(response))
|
||||
|
||||
Reference in New Issue
Block a user