From bf7ac5c3e52f46d521fe755fc3fbe2f9a4d83ede Mon Sep 17 00:00:00 2001 From: PJ Date: Thu, 23 Apr 2026 16:35:03 +0700 Subject: [PATCH] chore(ios): remove dead LaunchApp function LaunchApp had no callers since bff3a49 switched iOS launch to go through the sidecar driver. Remove the dead code and unused os import. --- internal/ios/ios.go | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/internal/ios/ios.go b/internal/ios/ios.go index 6353975..c195b20 100644 --- a/internal/ios/ios.go +++ b/internal/ios/ios.go @@ -5,7 +5,6 @@ import ( "encoding/json" "fmt" "io" - "os" "os/exec" "strings" "time" @@ -55,20 +54,6 @@ func EnsureSimulator(ctx context.Context, deviceName string, stdout io.Writer) e return nil } -func LaunchApp(ctx context.Context, bundleID string, env map[string]string) error { - args := []string{"simctl", "launch", "--terminate-running-process", "booted", bundleID} - cmd := exec.CommandContext(ctx, "xcrun", args...) - cmd.Env = os.Environ() - for k, v := range env { - cmd.Env = append(cmd.Env, "SIMCTL_CHILD_"+k+"="+v) - } - out, err := cmd.CombinedOutput() - if err != nil { - return fmt.Errorf("launch %s: %w\n%s", bundleID, err, strings.TrimSpace(string(out))) - } - return nil -} - // BootedUDID returns the UDID of the currently booted iOS simulator, or "" if none is booted. func BootedUDID(ctx context.Context) string { d, _ := bootedSimulator(ctx)