Opening Main App from Screen Time Configuration Action Extension

I'm working on an app for iOS that will help people get tasks done.

Within the app, we use a ManagedSettingsStore to let the user setup distracting apps. When the user opens any of those apps while it is being shielded, our ShieldConfiguration target opens and displays a screen that we configure with the description of the task they are supposed to do. On the bottom of the view, there are two buttons, one to start the task, and another to dismiss and return to their home screen.

I want to have the button that starts the task open up the main application and deeplink to the focus view with the task that they started. Currently, the only thing that we can tell the system to do is via a ShieldActionResponse which is an enum with 3 cases: none, close, or defer.

None of these three allow us to open the main application. I have found no workarounds that allow us to do it either. I've tried creating a custom URL scheme and calling UIApplication.shared.open(url), but there is no shared application available within the action extension. I have tried using a NSExtensionContext to open a url, but that does not work either. I have even tried starting a live activity to show the user what task they are working on and have a live timer, but that does not work either.

I know it is technically possible, because an app I downloaded does it perfectly. The app is called "Ascent: Screen Time Control". Is there some sort of extension I am missing, or entitlement I have not requested? Any help would be very appreciated.

have the button that starts the task open up the main application and deeplink to the focus view

This is not possible unfortunately.

We have filed many bug reports on this but Apple has not addressed this so far.

This has also been a topic on the dev forums a couple of times: https://developer.apple.com/forums/thread/793060

There are some apps that use private API and App reviews seems to be fine with that because these apps are on the store. However, Apple is not telling us which API they are using which seems a bit unfair.

I would encourage you to file a bug report as well. That’s all we can do for now.

And fingers crossed Apple stops neglecting this framework at some point…

Here are my bug reports on this:

  • FB18846650
  • FB15500681
  • FB15079668
Opening Main App from Screen Time Configuration Action Extension
 
 
Q