stuntcam 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -1,30 +1,15 @@
|
|
|
1
1
|
<!-- SPDX-License-Identifier: Apache-2.0 -->
|
|
2
2
|
# stuntcam
|
|
3
3
|
|
|
4
|
-
A camera for the iOS Simulator. Your app's
|
|
5
|
-
simulator shows a synthetic scene (or your image or video) through Apple's own AVFoundation, so previews, photos, video,
|
|
6
|
-
QR and barcode scanning and orientation behave the way they do on a phone.
|
|
7
|
-
|
|
8
|
-
Needs an Apple-silicon Mac with Xcode 27 and an iOS Simulator runtime (verified: 26.3 and 27.0; 17.5 smoke-tested).
|
|
9
|
-
Simulator only: nothing is linked into your app, and device builds never load it.
|
|
4
|
+
A camera for the iOS Simulator. Your app's camera code runs unmodified, through Apple's own AVFoundation.
|
|
10
5
|
|
|
11
6
|
```sh
|
|
12
|
-
npx stuntcam up
|
|
13
|
-
npx stuntcam up # self-test, then arm a simulator (boots it with the camera if it's shut down)
|
|
14
|
-
# run your app as usual: xcodebuild, expo run:ios, react-native run-ios, flutter run, Xcode ⌘R
|
|
15
|
-
npx stuntcam status # what each simulator is doing
|
|
16
|
-
npx stuntcam doctor # why there's no camera, if there isn't
|
|
17
|
-
npx stuntcam down # stop: new launches get no camera, no reboot
|
|
7
|
+
npx stuntcam up
|
|
18
8
|
```
|
|
19
9
|
|
|
20
|
-
|
|
10
|
+
Then run your app as usual. `npx stuntcam down` turns it off; `npx stuntcam doctor` says why if there's no camera.
|
|
21
11
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
rules, under `share/stuntcam/`. At each use stuntcam checks every file against `share/stuntcam/manifest.txt`, whose
|
|
25
|
-
sha256 is built into the `stuntcam` binary (so the files are exactly the ones packaged with it), and unpacks what
|
|
26
|
-
simulators read into `~/Library/Application Support/stuntcam`. It uses its own files even when run inside a stuntcam
|
|
27
|
-
source checkout, unless `STUNTCAM_USE_CHECKOUT=1` or `--build` says otherwise. `stuntcam version` names the release and the commit it was built from.
|
|
12
|
+
Needs an Apple silicon Mac and Xcode 27. Simulator only: nothing is linked into your app. Run it with `npx` rather than
|
|
13
|
+
adding it as a dependency: the package is macOS-only, so `npm ci` on Linux would fail.
|
|
28
14
|
|
|
29
|
-
|
|
30
|
-
https://github.com/avinav-b/stuntcam
|
|
15
|
+
Docs: https://github.com/avinav-b/stuntcam · Apache-2.0
|
package/bin/stuntcam
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
stuntcam 1.0.
|
|
1
|
+
stuntcam 1.0.1 commit 6130140165be
|
|
2
2
|
engine+loader 169441b21047 stub 09908f5dbe40 hook 220744d0eeed canary 6bc80a68 profile d63604f72d3d verdicts 0 xcode 27A266a
|
|
3
3
|
e708d90cb7fbdba6e9ce87a8665137b9b5e1ab7c65e1f142fdc71230e523dfab LICENSE
|
|
4
|
-
|
|
4
|
+
ec0c88c7c6ba48b6ecc3bf9b5027feb450cb11f2fabe467e099059d4a0adae2f README.md
|
|
5
5
|
1024d498d028fb1a0b26f51d7b320c76a388b15521161e1234328f5e23c1584a THIRD_PARTY_NOTICES.md
|
|
6
|
-
|
|
6
|
+
923baba3224c3387031d185315d083ce300eba89e8c21c5fce16fbbb6d4fc11b package.json
|
|
7
7
|
8ae42ce03f16bfe452936d486eb808d552bf83688ba698b43dd0acc7d5eba9b6 share/stuntcam/media/qr.png
|
|
8
8
|
bfdcc67bd059f698f7838572b01383f77a44be001e147a21f7919c5d7bc5756b share/stuntcam/payload.tar
|
|
9
9
|
75b4174d043f7d2fe459605c303f197174f11331a0eb8477dafae100ae2a9777 share/stuntcam/profiles/cfg-m10.plist
|
|
10
|
-
|
|
10
|
+
f0df68646713e8d746a6062b7b1d3d1bc5d57159b91f2379da15a24c83908d7b share/stuntcam/restore-rules/27A266a.json
|
|
11
|
+
3f2174166d7e2712c5cce0278546faf42d1f297f81c954e8ac25d9ea949c4550 share/stuntcam/restore-rules/27A9275.json
|
|
12
|
+
e208cebc0acb7ca8d05070a7dacc09ebab3c4165d977a8ad622ad721a1077ccb share/stuntcam/restore-rules/27B52.json
|
|
11
13
|
d8d739e19dd1997a28b49956e8f60fe6c3522df1f9f8f3ff7b537aee2f6880de payload/builds/169441b21047/libsimcam.dylib
|
|
12
14
|
199f4613219a05661109c6e2f623b3298899e743a06ae4dcb5493922eb002116 payload/builds/169441b21047/libsimcamloader.dylib
|
|
13
15
|
c0c0d78d742df6edc1f483d3330fc2752b1a221f0d2c645876c7bd9dd7505ff4 payload/canary/m10canary.app/Info.plist
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
}
|
|
67
67
|
],
|
|
68
68
|
"switches": {"SIMCAM_XCODE_LIBS=0": "no restores", "SIMCAM_MTC=0": "skip libMainThreadChecker"},
|
|
69
|
-
"unverified": ["Xcode 26.6
|
|
69
|
+
"unverified": ["Xcode 26.6 (U4 part 2); 27.1 and 27.2 have their own files (W4 e64)", "Detox / idb inserts (displaced; design §4.1 rule 4: announced, not restored)"]
|
|
70
70
|
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"proto": 1,
|
|
3
|
+
"xcode": "27.1",
|
|
4
|
+
"xcode_build": "27A9275",
|
|
5
|
+
"source": "derived from 27A266a; test-runner and test-target rules measured on GitHub's xcode-27 runner (W4 e64, measured internally: Xcode 27.1 27A9275, iOS 27.1 runtime); xcode-run libs present and identical (same install names and sizes as 27.0's; each runtime build has its own sha256); ⌘R not driven",
|
|
6
|
+
"root": "the simulator runtime root ($SIMULATOR_ROOT, else $DYLD_ROOT_PATH); paths below starting with / are relative to it",
|
|
7
|
+
"loader_reads": "rules[].name and rules[].libs (ordered; each {path, if?, unless?}; a condition is VAR=value, PREFIX* (any variable with that prefix) or VAR (set)). Everything else is documentation. A missing rule or file falls back to the loader's built-in copy of this file",
|
|
8
|
+
"never_dlopened": "libclang_rt.* (sanitizer runtimes) and libgmalloc.dylib, in every rule and the chain: they only work inserted at launch (ASan aborts with 'Interceptors are not working' when dlopened; a second TSan runtime gets mapped). Hard-coded in the loader, not read from here",
|
|
9
|
+
"rules": [
|
|
10
|
+
{
|
|
11
|
+
"name": "hosted-tests",
|
|
12
|
+
"when": "XCTestBundleInjectPath set and an XCTest marker present (XCInjectBundleInto, XCTestConfigurationFilePath, XCTestBundlePath or XCTestSessionIdentifier)",
|
|
13
|
+
"load": "exactly the XCTestBundleInjectPath list, de-duplicated; /usr/lib/... entries prefixed with the root; our own libraries and the never_dlopened ones skipped",
|
|
14
|
+
"measured": {
|
|
15
|
+
"xcodebuild": ["/usr/lib/libRPAC.dylib", "<DerivedData>/<App>.app/Frameworks/libXCTestBundleInject.dylib", "/usr/lib/libMainThreadChecker.dylib"],
|
|
16
|
+
"xcodebuild_asan": ["__TESTBUNDLE__/Frameworks/libclang_rt.asan_iossim_dynamic.dylib", "+ the three above (the app links its own runtime)"],
|
|
17
|
+
"xcodebuild_tsan": ["__TESTBUNDLE__/Frameworks/libclang_rt.tsan_iossim_dynamic.dylib", "+ the three above (the app links its own runtime)"],
|
|
18
|
+
"xcode_gui_cmd_u": ["/usr/lib/libRPAC.dylib", "/usr/lib/libLogRedirect.dylib", "<DerivedData>/<App>.app/Frameworks/libXCTestBundleInject.dylib", "/usr/lib/libMainThreadChecker.dylib"]
|
|
19
|
+
},
|
|
20
|
+
"without_rule": "xcodebuild test hangs (test bundle never injected)"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "ui-test-target",
|
|
24
|
+
"when": "XCODE_SCHEME_NAME set (app launched by XCUIApplication), no hosted-test rule",
|
|
25
|
+
"libs": [
|
|
26
|
+
{"path": "/usr/lib/libLogRedirect.dylib", "if": "IDE_CHOSEN_LOGGING_METHOD=2"},
|
|
27
|
+
{"path": "/usr/lib/libMainThreadChecker.dylib", "unless": "SIMCAM_MTC=0"},
|
|
28
|
+
{"path": "/usr/lib/libRPAC.dylib", "if": "PERFC_*"}
|
|
29
|
+
],
|
|
30
|
+
"engine": true
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "ui-test-runner",
|
|
34
|
+
"when": "executable path contains -Runner.app/",
|
|
35
|
+
"load": "its own XCTestBundleInjectPath list (hosted-tests rule)",
|
|
36
|
+
"engine": false
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "test-runner",
|
|
40
|
+
"when": "read by the runner hook (libsimcamrunnerhook.dylib, engine/runnerhook/runnerhook.m), not the loader: `stuntcam exec -- xcodebuild test` on a launchd-armed or unarmed destination sets TEST_RUNNER_DYLD_INSERT_LIBRARIES=<hook>, which replaces the runner's own insert list (XCTestBundleInjectPath then reads /usr/lib/libRPAC.dylib:<hook>:<hook>); the hook dlopens these in its constructor",
|
|
41
|
+
"libs": [
|
|
42
|
+
{"path": "@testhost/Frameworks/libXCTestBundleInject.dylib", "if": "XCInjectBundleInto"},
|
|
43
|
+
{"path": "/usr/lib/libMainThreadChecker.dylib", "unless": "SIMCAM_MTC=0"},
|
|
44
|
+
{"path": "/usr/lib/libRPAC.dylib", "if": "PERFC_*"}
|
|
45
|
+
],
|
|
46
|
+
"paths": "@testhost/<rel>: where dyld resolves XCTest's '<built products>/<App>.app/<rel>' entry: the leaf in DYLD_LIBRARY_PATH first (Xcode's iPhoneSimulator.platform/Developer/usr/lib copy), then the built and the installed host. /usr/... gets the runtime root. Launch-only libraries and already-mapped basenames are skipped",
|
|
47
|
+
"measured": {
|
|
48
|
+
"hosted_unarmed": ["/usr/lib/libRPAC.dylib", "<built products>/M11App.app/Frameworks/libXCTestBundleInject.dylib (mapped from Xcode's platform usr/lib)", "<root>/usr/lib/libMainThreadChecker.dylib"],
|
|
49
|
+
"ui_runner_boot_mode": ["/usr/lib/libRPAC.dylib", "<root>/usr/lib/libMainThreadChecker.dylib"],
|
|
50
|
+
"with_TEST_RUNNER_DYLD_INSERT_LIBRARIES": "/usr/lib/libRPAC.dylib:<hook>:<hook> (RPAC still loads; MTC and libXCTestBundleInject don't, and hosted tests hang without the latter: w4 e26)"
|
|
51
|
+
},
|
|
52
|
+
"engine": false
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "xcode-run",
|
|
56
|
+
"when": "an Xcode marker (MTC_*, PERFC_* or IDE_* variable, or DYLD_LIBRARY_PATH inside DerivedData), no rule above",
|
|
57
|
+
"libs": [
|
|
58
|
+
{"path": "/usr/lib/libLogRedirect.dylib", "if": "IDE_CHOSEN_LOGGING_METHOD=2"},
|
|
59
|
+
{"path": "/usr/lib/libMainThreadChecker.dylib", "unless": "SIMCAM_MTC=0"},
|
|
60
|
+
{"path": "/usr/lib/libRPAC.dylib", "if": "PERFC_*"},
|
|
61
|
+
{"path": "/usr/lib/libViewDebuggerSupport.dylib"}
|
|
62
|
+
],
|
|
63
|
+
"measured_set": ["libLogRedirect", "libMainThreadChecker", "libRPAC", "libViewDebuggerSupport"],
|
|
64
|
+
"not_inserted_by_xcode_27_0": ["libBacktraceRecording (any queue-debugging setting)", "libgmalloc (the scheme's DYLD_INSERT_LIBRARIES option)", "sanitizer runtimes (the app links them)"],
|
|
65
|
+
"notes": "each of these removes itself from DYLD_INSERT_LIBRARIES on load, so only libViewDebuggerSupport is visible in a plain run's env; MTC has no on/off signal (SIMCAM_MTC=0 skips it). Under ⌘R nothing in the app names the launching Xcode (e26), so which file applies comes from the build recorded at arm time"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"switches": {"SIMCAM_XCODE_LIBS=0": "no restores", "SIMCAM_MTC=0": "skip libMainThreadChecker"},
|
|
69
|
+
"unverified": ["the xcode-run rule under Xcode 27.1 ⌘R (not driven headless; its libs and Xcode's helper names checked statically only)", "Detox / idb inserts (displaced; design §4.1 rule 4: announced, not restored)"]
|
|
70
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"proto": 1,
|
|
3
|
+
"xcode": "27.2",
|
|
4
|
+
"xcode_build": "27B52",
|
|
5
|
+
"source": "derived from 27A266a; test-runner and test-target rules measured on GitHub's xcode-27 runner (W4 e64, measured internally: Xcode 27.2 27B52, iOS 27.2 runtime); xcode-run libs present and identical (same install names and sizes as 27.0's; each runtime build has its own sha256); ⌘R not driven",
|
|
6
|
+
"root": "the simulator runtime root ($SIMULATOR_ROOT, else $DYLD_ROOT_PATH); paths below starting with / are relative to it",
|
|
7
|
+
"loader_reads": "rules[].name and rules[].libs (ordered; each {path, if?, unless?}; a condition is VAR=value, PREFIX* (any variable with that prefix) or VAR (set)). Everything else is documentation. A missing rule or file falls back to the loader's built-in copy of this file",
|
|
8
|
+
"never_dlopened": "libclang_rt.* (sanitizer runtimes) and libgmalloc.dylib, in every rule and the chain: they only work inserted at launch (ASan aborts with 'Interceptors are not working' when dlopened; a second TSan runtime gets mapped). Hard-coded in the loader, not read from here",
|
|
9
|
+
"rules": [
|
|
10
|
+
{
|
|
11
|
+
"name": "hosted-tests",
|
|
12
|
+
"when": "XCTestBundleInjectPath set and an XCTest marker present (XCInjectBundleInto, XCTestConfigurationFilePath, XCTestBundlePath or XCTestSessionIdentifier)",
|
|
13
|
+
"load": "exactly the XCTestBundleInjectPath list, de-duplicated; /usr/lib/... entries prefixed with the root; our own libraries and the never_dlopened ones skipped",
|
|
14
|
+
"measured": {
|
|
15
|
+
"xcodebuild": ["/usr/lib/libRPAC.dylib", "<DerivedData>/<App>.app/Frameworks/libXCTestBundleInject.dylib", "/usr/lib/libMainThreadChecker.dylib"],
|
|
16
|
+
"xcodebuild_asan": ["__TESTBUNDLE__/Frameworks/libclang_rt.asan_iossim_dynamic.dylib", "+ the three above (the app links its own runtime)"],
|
|
17
|
+
"xcodebuild_tsan": ["__TESTBUNDLE__/Frameworks/libclang_rt.tsan_iossim_dynamic.dylib", "+ the three above (the app links its own runtime)"],
|
|
18
|
+
"xcode_gui_cmd_u": ["/usr/lib/libRPAC.dylib", "/usr/lib/libLogRedirect.dylib", "<DerivedData>/<App>.app/Frameworks/libXCTestBundleInject.dylib", "/usr/lib/libMainThreadChecker.dylib"]
|
|
19
|
+
},
|
|
20
|
+
"without_rule": "xcodebuild test hangs (test bundle never injected)"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "ui-test-target",
|
|
24
|
+
"when": "XCODE_SCHEME_NAME set (app launched by XCUIApplication), no hosted-test rule",
|
|
25
|
+
"libs": [
|
|
26
|
+
{"path": "/usr/lib/libLogRedirect.dylib", "if": "IDE_CHOSEN_LOGGING_METHOD=2"},
|
|
27
|
+
{"path": "/usr/lib/libMainThreadChecker.dylib", "unless": "SIMCAM_MTC=0"},
|
|
28
|
+
{"path": "/usr/lib/libRPAC.dylib", "if": "PERFC_*"}
|
|
29
|
+
],
|
|
30
|
+
"engine": true
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "ui-test-runner",
|
|
34
|
+
"when": "executable path contains -Runner.app/",
|
|
35
|
+
"load": "its own XCTestBundleInjectPath list (hosted-tests rule)",
|
|
36
|
+
"engine": false
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "test-runner",
|
|
40
|
+
"when": "read by the runner hook (libsimcamrunnerhook.dylib, engine/runnerhook/runnerhook.m), not the loader: `stuntcam exec -- xcodebuild test` on a launchd-armed or unarmed destination sets TEST_RUNNER_DYLD_INSERT_LIBRARIES=<hook>, which replaces the runner's own insert list (XCTestBundleInjectPath then reads /usr/lib/libRPAC.dylib:<hook>:<hook>); the hook dlopens these in its constructor",
|
|
41
|
+
"libs": [
|
|
42
|
+
{"path": "@testhost/Frameworks/libXCTestBundleInject.dylib", "if": "XCInjectBundleInto"},
|
|
43
|
+
{"path": "/usr/lib/libMainThreadChecker.dylib", "unless": "SIMCAM_MTC=0"},
|
|
44
|
+
{"path": "/usr/lib/libRPAC.dylib", "if": "PERFC_*"}
|
|
45
|
+
],
|
|
46
|
+
"paths": "@testhost/<rel>: where dyld resolves XCTest's '<built products>/<App>.app/<rel>' entry: the leaf in DYLD_LIBRARY_PATH first (Xcode's iPhoneSimulator.platform/Developer/usr/lib copy), then the built and the installed host. /usr/... gets the runtime root. Launch-only libraries and already-mapped basenames are skipped",
|
|
47
|
+
"measured": {
|
|
48
|
+
"hosted_unarmed": ["/usr/lib/libRPAC.dylib", "<built products>/M11App.app/Frameworks/libXCTestBundleInject.dylib (mapped from Xcode's platform usr/lib)", "<root>/usr/lib/libMainThreadChecker.dylib"],
|
|
49
|
+
"ui_runner_boot_mode": ["/usr/lib/libRPAC.dylib", "<root>/usr/lib/libMainThreadChecker.dylib"],
|
|
50
|
+
"with_TEST_RUNNER_DYLD_INSERT_LIBRARIES": "/usr/lib/libRPAC.dylib:<hook>:<hook> (RPAC still loads; MTC and libXCTestBundleInject don't, and hosted tests hang without the latter: w4 e26)"
|
|
51
|
+
},
|
|
52
|
+
"engine": false
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "xcode-run",
|
|
56
|
+
"when": "an Xcode marker (MTC_*, PERFC_* or IDE_* variable, or DYLD_LIBRARY_PATH inside DerivedData), no rule above",
|
|
57
|
+
"libs": [
|
|
58
|
+
{"path": "/usr/lib/libLogRedirect.dylib", "if": "IDE_CHOSEN_LOGGING_METHOD=2"},
|
|
59
|
+
{"path": "/usr/lib/libMainThreadChecker.dylib", "unless": "SIMCAM_MTC=0"},
|
|
60
|
+
{"path": "/usr/lib/libRPAC.dylib", "if": "PERFC_*"},
|
|
61
|
+
{"path": "/usr/lib/libViewDebuggerSupport.dylib"}
|
|
62
|
+
],
|
|
63
|
+
"measured_set": ["libLogRedirect", "libMainThreadChecker", "libRPAC", "libViewDebuggerSupport"],
|
|
64
|
+
"not_inserted_by_xcode_27_0": ["libBacktraceRecording (any queue-debugging setting)", "libgmalloc (the scheme's DYLD_INSERT_LIBRARIES option)", "sanitizer runtimes (the app links them)"],
|
|
65
|
+
"notes": "each of these removes itself from DYLD_INSERT_LIBRARIES on load, so only libViewDebuggerSupport is visible in a plain run's env; MTC has no on/off signal (SIMCAM_MTC=0 skips it). Under ⌘R nothing in the app names the launching Xcode (e26), so which file applies comes from the build recorded at arm time"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"switches": {"SIMCAM_XCODE_LIBS=0": "no restores", "SIMCAM_MTC=0": "skip libMainThreadChecker"},
|
|
69
|
+
"unverified": ["the xcode-run rule under Xcode 27.2 ⌘R (not driven headless; its libs and Xcode's helper names checked statically only)", "Detox / idb inserts (displaced; design §4.1 rule 4: announced, not restored)"]
|
|
70
|
+
}
|