Skip to content

Commit e13707b

Browse files
committed
feat(camera): add iOS simulator camera simulation
1 parent 9bc81ea commit e13707b

27 files changed

Lines changed: 4211 additions & 0 deletions

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ view inside the editor.
4141
- Real-time screen `describe` command using accessibility view tree - available in token-efficient format for agents
4242
- Simulator app performance gauges for CPU, memory, disk writes, network throughput, hang signals, and stack sampling
4343
- CoreSimulator chrome asset rendering for device bezels
44+
- iOS Simulator camera simulation from a generated pattern, local media file or stream URL, or a Mac camera source
4445
- NativeScript, React Native, Flutter, UIKit and SwiftUI runtime inspector plugins to debug app's view hierarchy live
4546
- `simdeck/test` for fast JS-based app tests that can query accessibility state and drive simulator controls
4647

@@ -126,6 +127,11 @@ simdeck install android:<avd-name> /path/to/app.apk
126127
simdeck uninstall <udid> com.example.App
127128
simdeck open-url <udid> https://example.com
128129
simdeck launch <udid> com.apple.Preferences
130+
simdeck camera sources
131+
simdeck camera start <udid> com.example.App --file /absolute/path/to/camera.mov
132+
simdeck camera start <udid> com.example.App --webcam
133+
simdeck camera switch <udid> --placeholder
134+
simdeck camera stop <udid>
129135
simdeck toggle-appearance <udid>
130136
simdeck pasteboard set <udid> "hello"
131137
simdeck pasteboard get <udid>
@@ -188,6 +194,13 @@ transport stream.
188194
`stream` writes an Annex B H.264 elementary stream to stdout for diagnostics or
189195
external tools such as `ffplay`.
190196

197+
`camera start` runs a local camera helper, injects the SimDeck camera shim into
198+
the target iOS simulator app, and relaunches that bundle. The source can be a
199+
generated pattern, an absolute image or video path, an `http://`, `https://`, or
200+
`file://` video URL, or a Mac camera selected with `--webcam [id-or-name]`.
201+
Use the browser menu item **Camera Simulation...** for the same flow from the UI.
202+
Camera simulation is iOS-simulator-only and requires a booted simulator.
203+
191204
`describe` uses the project daemon to prefer React Native, NativeScript,
192205
Flutter, or UIKit in-app inspectors, then falls back to the built-in private
193206
CoreSimulator accessibility bridge. Use `--format agent` or
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleIdentifier</key>
6+
<string>dev.nativescript.simdeck.camera-helper</string>
7+
<key>CFBundleExecutable</key>
8+
<string>simdeck-camera-helper</string>
9+
<key>CFBundlePackageType</key>
10+
<string>APPL</string>
11+
<key>CFBundleName</key>
12+
<string>SimDeck Camera Helper</string>
13+
<key>NSPrincipalClass</key>
14+
<string>NSApplication</string>
15+
<key>CFBundleShortVersionString</key>
16+
<string>1.0</string>
17+
<key>CFBundleVersion</key>
18+
<string>1</string>
19+
<key>NSCameraUsageDescription</key>
20+
<string>SimDeck can forward the Mac camera into iOS Simulator apps for local camera testing.</string>
21+
</dict>
22+
</plist>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.device.camera</key>
6+
<true/>
7+
</dict>
8+
</plist>

0 commit comments

Comments
 (0)