Post

Replies

Boosts

Views

Activity

Comment on How to get IOS device camera status(if it is on or off)
Hi Claude31, I have done some researches and saw these discussion: https://stackoverflow.com/questions/41512552/avcapturedevice-isinusebyanotherapplication-always-returns-false I guess this explanation in the discussion:" key word is exclusive. The camera can only be exclusively locked via lockForConfiguration, and that's only temporary. So, multiple apps can use the camera at the same time." shows that this method`s output is not exactly what I need. Am I right? I am not trying to detect if any app locks the camera, I am trying to find if any application is using the camera currently. Ex: A command like "lsof | grep VDC" in macOS, which provides similar output. Do you have another idea? Thanks a lot in advance. Best Regards Emre
Dec ’21
Comment on Method cannot be called from ViewController file into a swift file(DELEGATE)
Thanks a lot for the fast response. 1-Yes I mean Xcode folders. Somehow I cannot attach screenshots to this conversation, but if you need you can see my Xcode folder structure from my dropbox: https://www.dropbox.com/s/32pvvb0o90hli5x/Screenshot%202022-01-14%20at%2012.03.58.jpg?dl=0 2-Check that delegate is not nil: 2.1. you are right, it is nil. I set a breakpoint to "delegate?.didOutput(pixelBuffer: imagePixelBuffer)" line and debugger showed me following output: delegate BroadcastExtension.SampleHandlerDelegate? nil none 2.2 How should I initialise it in a right way? I declared in SampleHandler: weak var delegate: SampleHandlerDelegate? and initialised in ViewController: override func viewDidLoad() { sampleHandler.delegate = self } 3-print(#function) did not print anything, with the reason that I cannot call didOutput method from ViewController Thanks a lot in advance.
Jan ’22