On iOS 15 we have possibility to be on focus mode https://support.apple.com/en-us/HT212608 I know it's impossible de set focus mode programmatically what i need is just check if we are on focus mode or not programmatically
How can i check if we are on focus mode on an application reactnative, the client want to block user to access to a specific screen if the user hasn't enable focus mode on parameters
How can i do that on reactnative for ios device
any help would be greatly appreciated
Edit
i use this part of code :
/// Retrieve the current authorization status: INFocusStatusAuthorizationStatus
let authorizationStatus = INFocusStatusCenter.default.authorizationStatus
/// Request authorization to check Focus Status
//
INFocusStatusCenter.default.requestAuthorization { status in
/// Provides a INFocusStatusAuthorizationStatus
}
/// Check if Focus is enabled. INFocusStatusAuthorizationStatus must be .authorized
let focused = INFocusStatusCenter.default.focusStatus.isFocused
return ["focused": focused!, "authorizationStatus": authorizationStatus];
but the focused variable is always false, even if i active the focus mode on parameters and i don't receive any notification when the application is active, why INFocusStatusCenter.default.focusStatus.isFocused is never true ? INFocusStatusAuthorizationStatus is authorized