UStackUStack
SimCam icon

SimCam

SimCam streams a Mac’s camera to the iOS Simulator, injects images or video, and generates QR codes via a virtual AVFoundation camera.

SimCam

What is SimCam?

SimCam is a camera testing tool for the iOS Simulator that lets you work with camera-related functionality without needing a physical iPhone or other camera device. It can stream your Mac’s camera feed into the simulator, inject images or video as a consistent camera source, and generate QR codes that are injected directly into the camera stream.

Its core purpose is to make it easier to test camera features—such as scanning, image recognition inputs, and QR-based flows—while your app runs in the iOS Simulator and accesses camera input through standard AVFoundation APIs.

Key Features

  • Live camera streaming from your Mac into the iOS Simulator: SimCam registers as a system-level virtual camera so your app can read a real-time feed using standard AVFoundation camera APIs.
  • QR code generation and injection into the camera stream: Generate QR codes programmatically and have them appear in the simulator camera input without manually holding a device up to a screen.
  • Image and video media injection as camera sources: Use an image or video as the camera source so apps that depend on consistent visual input (e.g., scanning or recognition) can be tested predictably.
  • Front & back camera support: Configure sources to match front/back camera behavior when your testing workflow needs it.
  • SimCam CLI for programmatic control (including agent-driven workflows): Use simcamctl to set camera sources (for example, QR codes or media files) and check camera diagnostics, enabling automation and AI agent control.

How to Use SimCam

  1. Download and install SimCam for Mac.
  2. Run your iOS Simulator and your app that uses camera input via AVFoundation.
  3. Choose the camera source you need—stream your Mac’s camera, inject an image or video, or generate and inject a QR code.
  4. Use the built-in CLI when you want automation (for example, setting a QR source or an image source). Example commands shown on the site include:
    • simcamctl set-source --qr "AUTH_TOKEN_XYZ"
    • simcamctl set-source --image mock.png
  5. Test and iterate until your app’s camera-related feature behaves as expected inside the simulator.

Use Cases

  • Debugging camera input handling in an iOS Simulator build: Test that your app correctly consumes camera frames via AVFoundation using a virtual camera feed.
  • Automated QR scanning flows: Verify that your QR code scanning or deep-link handling works by injecting QR codes directly into the simulator camera stream, without manual screen-to-phone alignment.
  • Consistent visual test data for scanners and recognition: Feed the same image or video repeatedly to test features like credit card scanning, barcode reading, or other image recognition inputs that benefit from fixed sample data.
  • Agent or scripted testing scenarios: Use the CLI so an automation workflow (including an agent) can switch sources, generate QR codes, and check camera diagnostics during a test run.
  • Testing behavior that depends on front vs. back camera: Validate app behavior under both camera orientations when supported by your testing setup.

FAQ

  • Do I need to modify my app’s code? The page references this question, but it does not provide an answer. The only supported detail shown is that SimCam registers as a system-level virtual camera and works with apps through standard AVFoundation APIs.

  • Which macOS and iOS simulator versions are supported? The page lists this as a question in the “Before you buy” section, but it does not include compatibility details in the provided content.

  • Does SimCam support third-party camera libraries? The page includes this as a question but does not state a specific compatibility answer. The provided details focus on AVFoundation-based access.

  • How does licensing work across devices? The page mentions licensing and a lifetime option, but it does not include cross-device rules in the provided content.

  • How do I use the CLI or let an agent drive SimCam? The page states that SimCam includes a CLI (simcamctl) for AI agents to switch camera sources, generate QR codes, and check camera diagnostics, and it provides example commands for setting QR and image sources.

Alternatives

  • Use a physical iOS device for camera testing: This is the straightforward alternative when you need real-device camera behavior, but it involves device handling and typically less automation compared with a virtual camera feed.
  • Simulator test harnesses that mock camera/AVFoundation inputs: Instead of injecting a camera stream, you can mock or stub camera frames in app code; this can be more limited if your goal is to test the full AVFoundation camera pipeline.
  • General-purpose device automation frameworks: These can automate interactions in simulators or devices, but they may not provide the same camera-stream/QR injection workflow described for SimCam.
  • Screen-to-camera QR testing approaches: A manual approach is to display QR codes and test scanning visually; SimCam differs by injecting QR codes directly into the simulator’s camera stream.