How to open parent app from `ShieldActionDelegate`

Hello,

I think it is quite a common use-case to open the parent app that owns the ShieldActionDelegate when the user selects an action in the Shield.

There are only three options available that we can do in response to an action:

  • ShieldActionResponse.none
  • ShieldActionResponse.close
  • ShieldActionResponse.defer

It would be great if this new one would be added as well:

  • ShieldActionResponse.openParentApp

While finding a workaround for now, the problem is that the ShieldActionDelegate is not a normal app extension. That means, normal tricks do not work to open the parent app from here.

For example, UIApplication.shared.open(url) does not work because we can’t access UIApplication from the ShieldActionDelegate unfortunately.

NSExtensionContext is also not available in the ShieldActionDelegate unfortunately, so that’s also not possible.

There are apps however, that managed to find a workaround, in my research I stumbled across these two:

Please find a screen recording (gif) attached.

Their workaround is 100% what I’m looking for, so there MUST be a way to do so that is compliant with the App Store guidelines (after all, the apps are available on the App Store!).

I had documented my feature request more than 2 years ago in this radar as well: FB10393561

I am having the same issue. Can anyone explain how are these apps doing it?

There is not a supported way to do this. Some apps may have figured out ways to call up private API that should be rejected in App Review. The best course would be to file an Enhancement Request for API to do this.

How to open parent app from `ShieldActionDelegate`
 
 
Q