Hello,
I’m building an app that helps people spend less time on social media apps.
For that, I make heavy use of Apple’s Screen Time APIs, such as ManagedSettings and FamilyControls.
When an app is locked using a ShieldConfiguration
, the user has to open my app in order to unlock it (e.g. enter a code).
This is very cumbersome because no documented API exists to open the parent app (=my app) from the ShieldActionDelegate
(also part of my app) when the user presses a button of the ShieldConfiguration.
The ShieldActionDelegate
callback just offers three options in its ShieldActionResponse
:
.none
.defer
.close
.openParentApp
is missing.
We are working around this limitation by sending a local push notification that the user has to tap on.
This has multiple drawbacks:
- It has to be ensured that notification permission has been granted.
- It has to be ensured that notifications can be delivered even while focus is enabled.
- Features such as Apple Intelligence notification summaries and notification prioritization can heavily delay delivering notifications and thus frustrate the user.
Neither my users nor myself do understand why this is not possible in a smoother way, at least according to the documentation.
There are 3rd party apps that have such functionality, they can directly open their own app from a button press in the Shield, see here: https://apps.apple.com/us/app/applocker-passcode-lock-apps/id1132845904
It would be great if Apple could level the playfield for all developers and document how this is achievable, because technically it clearly is.
Thanks a lot and have a great day!