When a device is locked, is it possible to hide content in a widget?

Hi!
A widget can be shown in a lock screen where Today Extensions are.

When a device is locked, is it possible to hide content in such a widget?
Or is it possible to replace content in such a widget with a placeholder?

In a use case such as a widget shows content that is related to privacy, we would like to hide the content when a device is locked while we would like to show the content when the device is not locked.
Answered by levikline in 616246022
I have been testing my widget the past few days on an iPhone XR and the widget uses its placeholder view while the device is locked and there is a lock icon next to the app name, along with all other widgets. However, once my face is recognized by the device, the widget unlocks without needing to swipe up and enter the home screen. So, the widget from my experience self locks and requires facial or password permission.
Accepted Answer
I have been testing my widget the past few days on an iPhone XR and the widget uses its placeholder view while the device is locked and there is a lock icon next to the app name, along with all other widgets. However, once my face is recognized by the device, the widget unlocks without needing to swipe up and enter the home screen. So, the widget from my experience self locks and requires facial or password permission.
@levikline Can you explain how you have done this? I'm also facing the same use case but couldn't find a solution.
When a device is locked, is it possible to hide content in a widget?
 
 
Q