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
20 changes: 10 additions & 10 deletions iOS/Debugger/UI/DebuggerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class DebuggerViewController: UIViewController {
private let logger = Debug.shared

/// Tab bar controller for different debugger features
private let tabBarController = UITabBarController()
private var debugTabBarController = UITabBarController()

/// View controllers for each tab
private var viewControllers: [UIViewController] = []
Expand Down Expand Up @@ -121,11 +121,11 @@ class DebuggerViewController: UIViewController {

private func setupTabBarController() {
// Add tab bar controller as child view controller
addChild(tabBarController)
view.addSubview(tabBarController.view)
tabBarController.view.frame = view.bounds
tabBarController.view.autoresizingMask = [.flexibleWidth, .flexibleHeight]
tabBarController.didMove(toParent: self)
addChild(debugTabBarController)
view.addSubview(debugTabBarController.view)
debugTabBarController.view.frame = view.bounds
debugTabBarController.view.autoresizingMask = [.flexibleWidth, .flexibleHeight]
debugTabBarController.didMove(toParent: self)

// Create view controllers for each tab
let consoleVC = createConsoleViewController()
Expand Down Expand Up @@ -157,8 +157,8 @@ class DebuggerViewController: UIViewController {
UINavigationController(rootViewController: performanceVC),
]

tabBarController.viewControllers = viewControllers
tabBarController.selectedIndex = 0
debugTabBarController.viewControllers = viewControllers
debugTabBarController.selectedIndex = 0
}

// MARK: - Tab View Controllers
Expand Down Expand Up @@ -222,7 +222,7 @@ extension DebuggerViewController: DebuggerEngineDelegate {

// Switch to breakpoints tab
DispatchQueue.main.async {
self.tabBarController.selectedIndex = 1
self.debugTabBarController.selectedIndex = 1
}
}

Expand All @@ -240,7 +240,7 @@ extension DebuggerViewController: DebuggerEngineDelegate {

// Switch to console tab
DispatchQueue.main.async {
self.tabBarController.selectedIndex = 0
self.debugTabBarController.selectedIndex = 0
}
}

Expand Down
4 changes: 2 additions & 2 deletions iOS/Operations/AppContextManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ final class AppContextManager {
}

/// Executes a command with the given parameter and returns the result via completion.
func executeCommand(_ command: String, parameter: String, completion: @escaping (CommandResult) -> Void) {
func executeCommand(_ command: String, parameter: String, completion: @escaping (AppCommandResult) -> Void) {
commandQueue.sync {
let commandKey = command.lowercased()
if let handler = commandHandlers[commandKey] {
Expand Down Expand Up @@ -142,7 +142,7 @@ final class AppContextManager {
}

/// Result type for command execution.
enum CommandResult {
enum AppCommandResult {
case successWithResult(String)
case unknownCommand(String)
}
Expand Down
12 changes: 6 additions & 6 deletions iOS/Operations/CustomCommandProcessor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class CustomCommandProcessor {
/// - Parameters:
/// - commandString: The full command string containing command and parameter
/// - completion: Callback with result information
func processCommand(_ commandString: String, completion: @escaping (CommandResult) -> Void) {
func processCommand(_ commandString: String, completion: @escaping (AppCommandResult) -> Void) {
// Extract command and parameter
let components = commandString.split(separator: ":", maxSplits: 1).map(String.init)

Expand All @@ -36,7 +36,7 @@ class CustomCommandProcessor {
/// - command: The command to execute
/// - parameter: The parameter for the command
/// - completion: Callback with result information
private func executeCommand(_ command: String, parameter: String, completion: @escaping (CommandResult) -> Void) {
private func executeCommand(_ command: String, parameter: String, completion: @escaping (AppCommandResult) -> Void) {
// Log command execution
Debug.shared.log(message: "Executing command: \(command) with parameter: \(parameter)", type: .info)

Expand Down Expand Up @@ -75,7 +75,7 @@ class CustomCommandProcessor {

// MARK: - Command Implementations

private func signApp(named appName: String, completion: @escaping (CommandResult) -> Void) {
private func signApp(named appName: String, completion: @escaping (AppCommandResult) -> Void) {
// Find app in downloaded apps
let downloadedApps = CoreDataManager.shared.getDatedDownloadedApps()
let matchingApps = downloadedApps.filter {
Expand All @@ -95,7 +95,7 @@ class CustomCommandProcessor {
)
}

private func installApp(named appName: String, completion: @escaping (CommandResult) -> Void) {
private func installApp(named appName: String, completion: @escaping (AppCommandResult) -> Void) {
// Simulate app installation
completion(
.successWithResult(
Expand All @@ -104,7 +104,7 @@ class CustomCommandProcessor {
)
}

private func openApp(named appName: String, completion: @escaping (CommandResult) -> Void) {
private func openApp(named appName: String, completion: @escaping (AppCommandResult) -> Void) {
// Find app in signed apps
let signedApps = CoreDataManager.shared.getDatedSignedApps()
let matchingApps = signedApps.filter {
Expand All @@ -124,7 +124,7 @@ class CustomCommandProcessor {
)
}

private func showHelp(topic: String, completion: @escaping (CommandResult) -> Void) {
private func showHelp(topic: String, completion: @escaping (AppCommandResult) -> Void) {
var helpText = "Backdoor AI Assistant Help"

if topic.isEmpty {
Expand Down
2 changes: 1 addition & 1 deletion iOS/Operations/TerminalButtonManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ final class TerminalButtonManager {

// Check if current position is valid
let currentCenter = floatingButton.center
let viewBounds = parentVC.view.bounds
let _ = parentVC.view.bounds
let buttonSize = floatingButton.frame.size

// Add margin for better accessibility
Expand Down
Loading
Loading