Search code examples
iosswiftfacetime

How to disable FaceTime gesture reactions in AVCaptureSession


I have found only one question related to Facetime reactions here - Can you access the FaceTime video gesture reactions in code?. In general - you can find a lot of articles on how to disable manually FaceTime reactions in your phone ( must be > iPhone 12 and IOS >= 17). But surprisingly it seems not to work! I was trying to disable these reactions using the given method ( you can read about it here - https://www.macrumors.com/how-to/disable-gesture-based-facetime-reactions/, or here - https://www.paubox.com/blog/how-to-turn-off-the-ios-17-and-macos-sonoma-facetime-reactions). After disabling, reactions do not work in Facetime, but if you check inside the app using the code below :

if #available(iOS 17.0, *) {
    if AVCaptureDevice.reactionEffectsEnabled {
        if AVCaptureDevice.reactionEffectGesturesEnabled {
            return true
        }
    }
} else {
    return false
}

you will notice that even if reactions are disabled this code returns true, and if you start the recording session using AVCaptureSession() you will see the FaceTime reactions. That's weird, I can not understand what I can do, especially since my client wants to have this disabled, as the application context is far away from such expressions.

Any advice would be appreciated.

I suppose there must be a method to disable FaceTime reactions in my application's video stream, but - to be honest - I am not able to found a solution.


Solution

  • As of iOS 17.1.2

    The video gesture effects settings are per app. If you disable it in the FaceTime app, it won't also be disabled in your app.

    You have to start a video session within your app, then go disable the gesture effects in Control Center; the "Video Effects" button does not appear in Control Center until you start a video session.

    And even though it is a "per app" setting, there is no switch to enable or disable it in the Settings app under your app's settings, so you cannot give your user a link to your Settings screen to tell them to disable it; you have to tell them to use Control Center.

    (I think every developer agrees -- Apple really dropped the ball on the APIs and implementation of this "feature" for third party apps. Here's hoping they improve it in future OS releases.)

    Update for iOS 17.4

    From the documentation headers for AVCaptureDevice.reactionEffectGesturesEnabled which was updated for iOS 17.4/macOS 14.4:

    By default, gesture detection is enabled. As of iOS 17.4 and macOS 14.4, applications can control the default value of this property by adding the following key to their Info.plist:

    <key>NSCameraReactionEffectGesturesEnabledDefault</key>

    A value of true enables gesture detection and a value of false disables it, until such time that the user makes their own selection in Control Center.

    Unfortunately, Apple's online API docs for reactionEffectGesturesEnabled have not yet been updated to reflect this change, nor is there any documentation of NSCameraReactionEffectGesturesEnabledDefault yet.