Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

local-ios-simulator-browser-a2eb8e2c

/local-ios-simulator-browser-a2eb8e2c

Wyświetla symulator iOS w przeglądarce i renderuje podglądy SwiftUI z pakietów Swift z przeładowaniem na żywo.

Repozytorium
ai-dev-toolkit ↗
Licencja
MIT
Ostatnia zmiana repozytorium
01.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
10
Skrypty
5
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 01.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • 5 skryptów w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: scripts/lib/xcode-project.mjs, scripts/swiftui-preview-browser.mjs, scripts/templates/FocusedPreviewApp.swift, scripts/templates/FocusedPreviewHotReloadRuntime.swift, scripts/templates/PreviewBrowserEntries.swift

Co robi i kiedy

Wyświetla symulator iOS w przeglądarce i renderuje podglądy SwiftUI z pakietów Swift z przeładowaniem na żywo.

Oryginalny opis (EN)

Mirror an iOS Simulator into the Codex in-app browser and render SwiftUI previews from importable Swift packages in that simulator with hot reload. Use when a user wants to watch or interact with an iOS app in the browser, see a SwiftUI preview outside Xcode Canvas, iterate live on a preview, or capture browser-visible simulator proof.

Jak działa

  1. Browser Workflow
  2. SwiftUI Preview Workflow
  3. Support Boundary
  4. Proof
Sekcje z nagłówków SKILL.md, w oryginale · 49 linii, 424 słów
Podgląd SKILL.md
---
name: local-ios-simulator-browser-a2eb8e2c
description: Mirror an iOS Simulator into the Codex in-app browser and render SwiftUI previews from importable Swift packages in that simulator with hot reload. Use when a user wants to watch or interact with an iOS app in the browser, see a SwiftUI preview outside Xcode Canvas, iterate live on a preview, or capture browser-visible simulator proof.
---

# iOS Simulator Browser

## Browser Workflow

1. Obtain an explicit Simulator UDID from the existing iOS build/run workflow or from `xcrun simctl list devices available`.
2. Start `serve-sim` in a long-running terminal pinned to that simulator. Clean up any tracked stale helper for this simulator before starting, and install a trap so the helper is cleaned up when this terminal exits:

   ```bash
   SIM="<simulator-udid>"
   cleanup_serve_sim() {
     npx --yes serve-sim@latest --kill "$SIM" >/dev/null 2>&1 || true
   }
   trap cleanup_serve_sim EXIT INT TERM HUP
   cleanup_serve_sim
   npx --yes serve-sim@latest "$SIM"
   ```

3. Open the exact local preview URL printed by `serve-sim` in the Codex in-app browser.
4. Verify that a real frame is rendering before reporting success. A loaded page alone is not proof that the simulator stream is healthy.

- Keep the terminal alive while the browser mirror is in use. When finished, stop the terminal and wait for it to exit so the trap runs.
- If the terminal disappeared or did not exit cleanly, run `npx --yes serve-sim@latest --kill "$SIM"` before starting another mirror for that simulator.
- Never run an unscoped `serve-sim --kill`; another thread may own a different simulator mirror.

## SwiftUI Preview Workflow

Use the bundled launcher when the requested previews live in an importable Swift package. Point it at the package manifest and select the target whose previews should be displayed. It generates a disposable host project outside the user's source tree, installs and launches that host in Simulator, and watches the package for edits.

```bash
node <skill-root>/scripts/swiftui-preview-browser.mjs \
  /absolute/path/to/Package.swift \
  --package-target "<target>" \
  --device "<simulator-udid>"
```

- Watch mode is enabled by default. On a Swift package source edit, the launcher rebuilds a generated dylib and hot-swaps it into the running host without relaunching the app.
- The generated host shows every preview variant discovered in the selected Swift Package target with in-simulator page controls. To show a subset instead, pass `--preview-filter <regex[, ...]>`; it matches display names and code identifiers such as `StatusRowView_Previews`.
- Once the launcher prints the selected Simulator UDID, start `serve-sim` for that same UDID and open its printed URL in the in-app browser.

## Support Boundary

- Support Swift Package-backed `PreviewProvider` and `#Preview` declarations through the generated host.
- Do not edit the user's `.xcodeproj`, `.xcworkspace`, `Package.swift`, schemes, or build settings to force preview support.

## Proof

For browser or preview QA, capture a browser screenshot showing the simulator frame. For hot reload QA, also report the launcher's `hot reloaded package preview ... in pid ...` output and show the changed frame after editing.
Pliki w paczce (10)
  • SKILL.md 3 KB
  • TOOLKIT-LICENSE-EVIDENCE.json 1 KB
  • TOOLKIT-PROVENANCE.json 1 KB
  • TOOLKIT-UPSTREAM-LICENSE.txt 1 KB
  • agents/openai.yaml 1 KB
  • scripts/swiftui-preview-browser.mjs 29 KB
  • scripts/lib/xcode-project.mjs 21 KB
  • scripts/templates/FocusedPreviewApp.swift 13 KB
  • scripts/templates/FocusedPreviewHotReloadRuntime.swift 2 KB
  • scripts/templates/PreviewBrowserEntries.swift 2 KB

Wersje

W bazie nie ma innych skilli o nazwie local-ios-simulator-browser-a2eb8e2c.

Migawka bazy z 13.11.2026 · wersja paczki 368262279541 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100xcode-preview-capture
    Buduje i zapisuje podglądy SwiftUI oraz zrzuty ekranu symulatora, by ocenić wygląd widoków Swift.
  • 95preview-build
    Buduje podglądy SwiftUI i robi zrzuty symulatora, żeby ocenić wygląd interfejsu iOS w projektach Xcode, pakietach SPM lub plikach Swift.
  • 90xcode-simulator-testing
    Buduje aplikację iOS dla wskazanego schematu Xcode albo bieżącego i uruchamia ją w symulatorze, bez regeneracji projektu.
  • 100rork-local
    Podgląda aplikację iOS w symulatorze w przeglądarce i publikuje paczkę .ipa do TestFlight lub App Store przez narzędzie asc.
  • 100ios-simulator-build
    Buduje aplikacje iOS w wersji Release na symulator (czysty prebuild, przypięty Xcode, symulator nazwany UDID) i potwierdza poprawność pliku .app.
  • 86swift
    Pomaga w języku Swift: aplikacjach iOS i macOS, SwiftUI, backendzie Vapor i ekosystemie Apple.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.