(&mut self)
| 434 | } |
| 435 | |
| 436 | fn start_ios_simulator(&mut self) -> Result<(), Box<dyn std::error::Error>> { |
| 437 | self.update_progress(0, 5, "Building for iOS..."); |
| 438 | |
| 439 | // Run iOS build script |
| 440 | let status = Command::new("sh") |
| 441 | .args(["scripts/build-ios.sh", "todo_app"]) |
| 442 | .status()?; |
| 443 | |
| 444 | if !status.success() { |
| 445 | return Err("iOS build failed".into()); |
| 446 | } |
| 447 | |
| 448 | self.update_progress(2, 5, "Starting iOS simulator..."); |
| 449 | |
| 450 | // Start simulator |
| 451 | let simulator = Command::new("open") |
| 452 | .arg("-a") |
| 453 | .arg("Simulator") |
| 454 | .spawn()?; |
| 455 | |
| 456 | let mut window = SimulatorWindow::new(Platform::IOS); |
| 457 | window.set_process(simulator); |
| 458 | self.simulator_windows.push(window); |
| 459 | |
| 460 | self.update_progress(5, 5, "iOS simulator ready!"); |
| 461 | Ok(()) |
| 462 | } |
| 463 | |
| 464 | fn start_android_emulator(&mut self) -> Result<(), Box<dyn std::error::Error>> { |
| 465 | self.update_progress(0, 5, "Building for Android..."); |
no test coverage detected