Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

## [Unreleased]

## [1.1.0] — 2026-10-21

First tagged, notarized release (1.0.0 was never tagged).

### Added
- Optional socket-owned host capture: running injected sessions acquire hardware
on demand and release it on stop or process exit. Supervised host feeds also
Expand Down
4 changes: 2 additions & 2 deletions Casks/simulatorcamera.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cask "simulatorcamera" do
version "1.0.0"
sha256 "REPLACE_WITH_ACTUAL_DMG_SHA256_ON_RELEASE"
version "1.1.0"
sha256 "1c147504d744d4a27bdeb2f2bcbc04768436a852ff54c3c5f43d44e8b5b51e11"

url "https://github.com/dautovri/SimulatorCamera/releases/download/v#{version}/SimulatorCamera-#{version}.dmg",
verified: "github.com/dautovri/SimulatorCamera/"
Expand Down
53 changes: 53 additions & 0 deletions docs/RELEASE_NOTES_v1.1.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# SimulatorCamera v1.1.0

Your Mac's camera, in the iOS Simulator. Free and open.

SimulatorCamera is a macOS companion app that feeds a virtual camera into the
iOS Simulator. Your app imports nothing and needs no `#if targetEnvironment(simulator)`
branches.

## Highlights

- **Virtual camera for the Simulator.** A Camera Extension registers
"SimulatorCamera Virtual" on the Mac; a small injected library
(`libSimCamInject.dylib`) brings it into Xcode 26 / 27 simulators, where
`AVCaptureDevice` otherwise lists no cameras at all. Video data output,
preview layers, QR metadata and photo capture are supported.
- **Five sources:** test pattern, Mac camera, video file, static image and a QR
code generator, all normalized to 1280x720 BGRA at 30 fps.
- **Movie recording with sound.** `AVCaptureMovieFileOutput` records H.264 + AAC
QuickTime files, with rotation and mirroring honored.
- **`simcamctl` for CI and agents.** `simcamctl feed --qr "TEXT" | --image PATH |
--pattern | --camera`, plus `status` and `ping`.
- **Reliable frame transport.** Frames now travel over CoreMediaIO sink streams
instead of a private XPC listener, which never worked end to end.

## Install

Download `SimulatorCamera-1.1.0.dmg`, drag the app to `/Applications` and open it.
The release is signed with a Developer ID and notarized; macOS only activates the
system extension for such builds (or for apps in `/Applications` with system
extension developer mode on). Click **Activate** and approve in System Settings →
General → Login Items & Extensions.

```bash
brew install --cask dautovri/tap/simulatorcamera # once the tap is updated
```

Then load the injection library into your Simulator app. In Xcode: *Edit Scheme ›
Run › Arguments › Environment Variables*, add `DYLD_INSERT_LIBRARIES` =
`/Applications/SimulatorCamera.app/Contents/Resources/libSimCamInject.dylib`.
See the [README](../README.md#ios-simulator-apps-xcode-2627).

## Requirements

macOS 14+, Apple silicon, Xcode 16+.

## Known limitations

- Barcode types other than QR, depth data and multi-cam are not supported.
- Frames are exchanged through `/private/tmp/SimulatorCamera/frame.bin`.
- Building from source needs your own Developer ID / notarization to activate the
extension on a Mac with SIP enabled (see [issue #6](https://github.com/dautovri/SimulatorCamera/issues/6)).

Full detail: [CHANGELOG.md](../CHANGELOG.md).
50 changes: 40 additions & 10 deletions scripts/build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ mkdir -p "$BUILD_DIR" "$DIST_DIR"
# nested .systemextension automatically when CODE_SIGN_STYLE=Automatic and
# DEVELOPMENT_TEAM is set.

# Optional: let xcodebuild create missing provisioning profiles via an App Store
# Connect API key (ASC_KEY_PATH / ASC_KEY_ID / ASC_ISSUER_ID).
AUTH_ARGS=()
if [[ -n "${ASC_KEY_PATH:-}" ]]; then
AUTH_ARGS=(-allowProvisioningUpdates
-authenticationKeyPath "$ASC_KEY_PATH"
-authenticationKeyID "${ASC_KEY_ID:?ASC_KEY_ID required}"
-authenticationKeyIssuerID "${ASC_ISSUER_ID:?ASC_ISSUER_ID required}")
fi

echo "▶︎ Archiving $APP_NAME $VERSION"
xcodebuild \
-project "$PROJECT" \
Expand All @@ -67,20 +77,35 @@ xcodebuild \
MARKETING_VERSION="$VERSION" \
CURRENT_PROJECT_VERSION="$VERSION" \
DEVELOPMENT_TEAM="${APPLE_TEAM_ID:-}" \
${AUTH_ARGS[@]+"${AUTH_ARGS[@]}"} \
archive 2>&1 | (xcpretty --simple || cat)

# ── Export with Developer ID ────────────────────────────────────────────────

echo "▶︎ Exporting .app with Developer ID signing"
# Optional manual signing: set PROFILE_HOST / PROFILE_EXT to the names of installed
# Developer ID provisioning profiles for the app and the Camera Extension.
SIGN_STYLE="automatic"
PROFILE_MAP=""
if [[ -n "${PROFILE_HOST:-}" && -n "${PROFILE_EXT:-}" ]]; then
SIGN_STYLE="manual"
PROFILE_MAP="<key>signingCertificate</key><string>Developer ID Application</string>
<key>provisioningProfiles</key>
<dict>
<key>com.dautov.SimulatorCamera</key><string>${PROFILE_HOST}</string>
<key>com.dautov.SimulatorCamera.Extension</key><string>${PROFILE_EXT}</string>
</dict>"
fi
cat > "$BUILD_DIR/exportOptions.plist" <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key> <string>developer-id</string>
<key>teamID</key> <string>${APPLE_TEAM_ID:-}</string>
<key>signingStyle</key> <string>automatic</string>
<key>signingStyle</key> <string>${SIGN_STYLE}</string>
<key>stripSwiftSymbols</key> <true/>
${PROFILE_MAP}
</dict>
</plist>
EOF
Expand All @@ -89,7 +114,8 @@ xcodebuild \
-exportArchive \
-archivePath "$ARCHIVE_PATH" \
-exportPath "$EXPORT_PATH" \
-exportOptionsPlist "$BUILD_DIR/exportOptions.plist" 2>&1 | (xcpretty --simple || cat)
-exportOptionsPlist "$BUILD_DIR/exportOptions.plist" \
${AUTH_ARGS[@]+"${AUTH_ARGS[@]}"} 2>&1 | (xcpretty --simple || cat)

APP_BUNDLE="$EXPORT_PATH/$APP_NAME.app"

Expand All @@ -110,11 +136,11 @@ if [[ ! -d "$EXTENSION_BUNDLE" ]]; then
fi

# Outer .app must have Developer ID signature.
codesign -dv --verbose=4 "$APP_BUNDLE" 2>&1 | grep -q "Authority=Developer ID Application" \
grep -q "Authority=Developer ID Application" <(codesign -dv --verbose=4 "$APP_BUNDLE" 2>&1) \
|| { echo "ERROR: outer .app not signed with Developer ID" >&2; exit 1; }

# Nested extension must too.
codesign -dv --verbose=4 "$EXTENSION_BUNDLE" 2>&1 | grep -q "Authority=Developer ID Application" \
grep -q "Authority=Developer ID Application" <(codesign -dv --verbose=4 "$EXTENSION_BUNDLE" 2>&1) \
|| { echo "ERROR: nested extension not signed with Developer ID" >&2; exit 1; }

echo "✓ both binaries signed with Developer ID"
Expand Down Expand Up @@ -163,12 +189,16 @@ hdiutil create \
# on the DMG — not just on the .app inside).
if [[ -z "${SKIP_NOTARIZE:-}" ]]; then
codesign --sign "$APPLE_DEVELOPER_ID" --timestamp "$DMG_OUT"
xcrun notarytool submit "$DMG_OUT" \
--apple-id "${APPLE_ID:-}" \
--password "${APPLE_APP_PASSWORD:-}" \
--team-id "${APPLE_TEAM_ID:-}" \
--wait || true
xcrun stapler staple "$DMG_OUT" || true
if [[ -n "${KEYCHAIN_PROFILE:-}" ]]; then
xcrun notarytool submit "$DMG_OUT" --keychain-profile "$KEYCHAIN_PROFILE" --wait
else
xcrun notarytool submit "$DMG_OUT" \
--apple-id "${APPLE_ID:-}" \
--password "${APPLE_APP_PASSWORD:-}" \
--team-id "${APPLE_TEAM_ID:-}" \
--wait
fi
xcrun stapler staple "$DMG_OUT"
fi

echo "▶︎ Computing checksums"
Expand Down
Loading