Skip to content

Not working for IOS 27 simulators #7

Closed

Description

@hflexgrig

From SimulatorCamera part everything is fine, but looks like unable to stream camera to my app running via Device Hub simulator.

Any workarounds could be suggested?

Activity

  1. added a commit that references this issue on Oct 15, 2026
    fc6071f
  2. dautovri commented on Oct 15, 2026

    @dautovri
    Owner

    Thanks for the report — fixed in #8 (now on main).

    Root cause: the iOS Simulator's capture stack has no path to Mac cameras. iOS 26.5 and iOS 27 simulators list zero devices — not even the Mac's built-in camera — so a CMIO virtual camera can never reach a simulator app, regardless of Device Hub.

    Fix: a small library is loaded into your app in the Simulator only; your code doesn't change.

    1. Build/run the SimulatorCamera Mac app from main and pick a source (it feeds a test pattern as soon as it's open).
    2. In Xcode: Edit Scheme › Run › Arguments › Environment Variables, add
      DYLD_INSERT_LIBRARIES = /Applications/SimulatorCamera.app/Contents/Resources/libSimCamInject.dylib
      (or SIMCTL_CHILD_DYLD_INSERT_LIBRARIES=<that path> xcrun simctl launch booted <bundle id>).
    3. Run on the Simulator: AVCaptureDevice.default(for: .video) returns "SimulatorCamera"; frames reach AVCaptureVideoDataOutput and AVCaptureVideoPreviewLayer, QR codes reach AVCaptureMetadataOutput, and AVCapturePhotoOutput returns JPEGs.

    Tested on iOS 27.0 and 26.5 simulators. For CI there's also simcamctl feed --qr "TEXT" | --image PATH | --pattern. If your app uses another part of AVFoundation (e.g. movie file output or non-QR barcodes), let me know which and I'll add it.

  3. hflexgrig commented on Oct 17, 2026

    @hflexgrig
    ContributorAuthor

    @dautovri thank you for your fix. After I pulled your changes, still needed some work with Claude to make it work in my environment #10
    I'm using Dotnet MAUI technology with C# on my project, and those changes only worked for me

    https://drive.google.com/file/d/1FutGknlIFLCakO5FsAmv1zUT7TVRqy2I/view?usp=sharing

  4. added a commit that references this issue on Nov 7, 2026
    4f30b4b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions