How to turn off the camera of an IOS device via SwiftUI

Hi,

Is there any method to turn off the camera of an IOS device via SwiftUI, if it is already on? But in that case, I do not mean just turning off the camera which was already open via my own application, I mean that it was opened via another app (For example Facetime) but I want to turn it off anyway.

Thanks a lot in advance

Best Regards Emre

Replies

No, there is no way to do this on iOS.

  • Hi RobNotYou,

    Thank you for your fast response. Do you mean there is no way literally to implement it, or if I used this kind of code part, then it would not be approved for Apple Store?

    Thanks a lot in advance.

Add a Comment

It is a principle in iOS: you cannot control resources that may be needed by other apps or system (camera, mike, volume button function,…). Only system could eventually be able to.

So there is no API to do what you want. And even if you found a way with non published API, your app would be rejected.

Hi,

What a pity. Thanks a lot for answers.