Troubleshouting AVCam build for iOS and run on MacBook with macos14 (Sonoma)

Hello, I tried to build AVCam sample application for iOS17 and run it on MacBook (designed as iPad) with macos14.3 (Sonoma). https://developer.apple.com/documentation/avfoundation/capture_setup/avcam_building_a_camera_app?language=objc

  1. When building and testing with Xcode 15.2, AVCam application crashes systematically when choosing target "My Mac (Designed for iPad)"

In fact, SIGABORT signal is received in a thread dealing with "portrait effect" Thread 19 Queue : com.apple.portrait.effect_init (serial)

Is it a known bug? Is there a workaround about this case?

Best regards

  1. External webcam is detected by AVCam but preview and capture are systematically upside down. (may be the same FaceTime HD camera's)

Is it a known bug? Is there a workaround about this case?

Did you ever find a solution to the crashing bug? I'm seeing this to in the AVCam sample app when run on the Mac.

This is also an issue I am getting, I think bypassing the portrait effects may help this. I am going to give this a go now!

I'm running into the same issue. There doesn't appear to be a way to disable Portrait features via the SDK, so that rules out that as a workaround.

Set the build destination to Mac Catalyst, and the build will run properly. I filed a feedback (FB13904284) and shared this with Apple engineers during a WWDC24 lab session.

I could not find the feedback in the assistant.

(FB13904284)

I am seeing this on Sonoma with My Mac (Designed for iPhone) app.

Thread 37 Queue : com.apple.portrait.effect_init (serial)

I am not using mac catalyst. Error occurs 100% of launches regardless of the configuration. App works fine on iPhone and in iOS emulator. Error occurs when accessing the camera.

libsystem_kernel.dylib`:
    0x195662a58 <+0>:  mov    x16, #0x148
    0x195662a5c <+4>:  svc    #0x80
->  0x195662a60 <+8>:  b.lo   0x195662a80               ; <+40>
    0x195662a64 <+12>: pacibsp 
    0x195662a68 <+16>: stp    x29, x30, [sp, #-0x10]!
    0x195662a6c <+20>: mov    x29, sp
    0x195662a70 <+24>: bl     0x19565abb0               ; cerror_nocancel
    0x195662a74 <+28>: mov    sp, x29
    0x195662a78 <+32>: ldp    x29, x30, [sp], #0x10
    0x195662a7c <+36>: retab  
    0x195662a80 <+40>: ret
Troubleshouting AVCam build for iOS and run on MacBook with macos14 (Sonoma)
 
 
Q