kvn8888/OpenFoodJournal / plugins/build-ios-apps/skills/ios-simulator-browser
ios-simulator-browser
VerifiedMirror 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.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.2 KB |
| agents/openai.yaml | config | 193 B |
| scripts/lib/xcode-project.mjs | script | 20.9 KB |
| scripts/swiftui-preview-browser.mjsexecutable | script | 28.0 KB |
| scripts/templates/FocusedPreviewApp.swift | script | 12.5 KB |
| scripts/templates/FocusedPreviewHotReloadRuntime.swift | script | 1.9 KB |
| scripts/templates/PreviewBrowserEntries.swift | script | 2.0 KB |
scripts/templates/FocusedPreviewHotReloadRuntime.swift
View on GitHubimport Darwin
import Foundation
import SwiftUI
// This file is compiled into the reload dylib; the running host resolves these exports with dlsym.
@MainActor private let cachedHotReloadPreviewVariants = previewBrowserPreviewVariants()
private func hotReloadPreviewCString(_ value: String) -> UnsafeMutablePointer<CChar>? {
strdup(value)
}
@_cdecl("focused_preview_hot_reload_preview_count")
public func focusedPreviewHotReloadPreviewCount() -> Int {
MainActor.assumeIsolated {
cachedHotReloadPreviewVariants.count
}
}
@_cdecl("focused_preview_hot_reload_preview_id")
@MainActor
public func focusedPreviewHotReloadPreviewID(_ previewIndex: Int) -> UnsafeMutablePointer<CChar>? {
hotReloadPreviewCString(cachedHotReloadPreviewVariants[previewIndex].id)
}
@_cdecl("focused_preview_hot_reload_group_display_name")
@MainActor
public func focusedPreviewHotReloadGroupDisplayName(
_ previewIndex: Int
) -> UnsafeMutablePointer<CChar>? {
hotReloadPreviewCString(cachedHotReloadPreviewVariants[previewIndex].groupDisplayName)
}
@_cdecl("focused_preview_hot_reload_preview_display_name")
@MainActor
public func focusedPreviewHotReloadPreviewDisplayName(
_ previewIndex: Int
) -> UnsafeMutablePointer<CChar>? {
hotReloadPreviewCString(cachedHotReloadPreviewVariants[previewIndex].displayName)
}
@_cdecl("focused_preview_hot_reload_free_string")
public func focusedPreviewHotReloadFreeString(_ pointer: UnsafeMutablePointer<CChar>?) {
free(pointer)
}
@MainActor
@_cdecl("focused_preview_hot_reload_make_view")
public func focusedPreviewHotReloadMakeView(
_ previewIndex: Int
) -> UnsafeMutableRawPointer? {
let previewVariant = cachedHotReloadPreviewVariants[previewIndex]
// The host moves the AnyView out of this box and deallocates the storage.
let view = UnsafeMutablePointer<AnyView>.allocate(capacity: 1)
view.initialize(to: previewVariant.makeView())
return UnsafeMutableRawPointer(view)
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |