make url scheme with bid and pid endings

Signed-off-by: Spidy123222 <64176728+Spidy123222@users.noreply.github.com>
This commit is contained in:
Spidy123222
2023-02-28 15:19:22 -08:00
committed by GitHub
parent 17640fe6cf
commit efcf557e44

View File

@@ -9,6 +9,8 @@
import UIKit
import AltStoreCore
import EmotionalDamage
import minimuxer
@available(iOS 13, *)
final class SceneDelegate: UIResponder, UIWindowSceneDelegate
@@ -139,6 +141,45 @@ private extension SceneDelegate
DispatchQueue.main.async {
NotificationCenter.default.post(name: AppDelegate.addSourceDeepLinkNotification, object: nil, userInfo: [AppDelegate.addSourceDeepLinkURLKey: sourceURL])
}
case "sidejit-enable":
let queryItems = components.queryItems?.reduce(into: [String: String]()) { $0[$1.name.lowercased()] = $1.value } ?? [:]
if let jitdebugURLString = queryItems["bid"] {
DispatchQueue.main.async {
let v = minimuxer_to_operation(code: 1)
do {
var x = try debug_app(app_id: jitdebugURLString)
switch x {
case .Good: print(jitdebugURLString)
case .Bad(let code): minimuxer_to_operation(code: code)
}
} catch Uhoh.Bad(let code) {
minimuxer_to_operation(code: code)
} catch {
print(OperationError.unknown)
}
} }
else if let jitdebugURLString = queryItems["pid"] {
DispatchQueue.main.async {
let v = minimuxer_to_operation(code: 1)
do {
var x = try debug_app(app_id: jitdebugURLString)
switch x {
case .Good: print(jitdebugURLString)
case .Bad(let code): minimuxer_to_operation(code: code)
}
} catch Uhoh.Bad(let code) {
minimuxer_to_operation(code: code)
} catch {
print(OperationError.unknown)
}
} }
else { return }
default: break
}