mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 11:07:10 +00:00
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.
This commit is contained in:
1 parent
0320edb91e
commit
bf7ac5c3e5
1 file changed
-15
@@ -5,7 +5,6 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
@@ -55,20 +54,6 @@ func EnsureSimulator(ctx context.Context, deviceName string, stdout io.Writer) e
|
|||||||
return nil
|
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.
|
// BootedUDID returns the UDID of the currently booted iOS simulator, or "" if none is booted.
|
||||||
func BootedUDID(ctx context.Context) string {
|
func BootedUDID(ctx context.Context) string {
|
||||||
d, _ := bootedSimulator(ctx)
|
d, _ := bootedSimulator(ctx)
|
||||||
|
|||||||
Reference in new issue
Block a user