-1

Create a new mac os app in Xcode 14.

Fetch camera list by these code:

NSArray *devicesIOS = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo];

then change the architecture to x86_64

snd add com.apple.security.device.camera to entitlements

then this code will cost 4s and UI will be stuck during next half minutes on M1 machine running MacOS 13

This causes a lot of apps stuck at starting like Zoom and Classin

How to solve this?

How to solve this problem

1 Answers1

0

You're calling a method that was deprecated years ago. Use a device discovery session instead.

matt
  • 515,959
  • 87
  • 875
  • 1,141