How to return from the custom keyboard hosting app to the host app

We are developing a custom keyboard with barcode scanning functionality in Swift. Since the camera function cannot be used to scan on the custom keyboard, we are considering using the hosting app to perform the scanning and then return to the host app.


Is there any way to automatically return to the host app after scanning in the hosting app? In the following apps that I have benchmarked,

Custom Keyboard > Scan in Hosting App > Automatically return to host app after scan

This transition seems to be achievable.

https://apps.apple.com/jp/app/imagerswift/id1469166411


We have investigated and verified the following three points

  1. whether it is possible to come back to the keyboard app with a custom URL scheme

→The keyboard app does not allow custom URLs to be set.

  1. Can we return to the host app with a custom URL scheme?

→The keyboard app cannot recognize which app is the host app.

  1. Is it possible to press the Back to xxxx link that appears in the upper left corner of the screen as an iOS function?

→Cannot be controlled from the app.

How to return from the custom keyboard hosting app to the host app
 
 
Q