3

So, I have this requirement where a keyboard extension must be able to open it's companion app and have the user take a specific action in there and then be able to go back to whatever previous app was opened and input some text in the previously selected text field.

Basically, if you take a look at Scandit Keyboard Wedge you'll see that behaviour: the user opens can press the "Scan" button on the custom keyboard and is taken in the companion app. Once a barcode is scanned the app automatically goes back to the previous opened app and inputs the barcode string into the text field that was being edited.

Now, reading through Apple's documentation I see a mention saying that a keyboard extension is not permitted to open another apps. Does this include it's own companion app?

Also, even so, I'm not really sure how I can have the keyboard extension open a custom URL since UIApplication.shared is not available in the keyboard extension.

Now, my second problem is, how does the companion app go back to the previously opened app?

Same goes for Google's own custom keyboard. Now, I found a question about this one here on SO. The answer suggests that this is using a private API to handle this thing. But then I'm curious: how did this even go throw Apple's review process? Am I expected to have my app rejected?

Mihai Fratu
  • 7,579
  • 2
  • 37
  • 63
  • 1
    Hello Mihai, I am also looking for a solution for this problem. I was able to solve the first part (open containing app from extension) but not the second part (go back to previous app). Did you find a solution? – ndreisg Aug 22 '19 at 09:36
  • Hi Mihai, Could you please tell us if you found the solution to this issue? – Fadi Abuzant Apr 09 '23 at 08:52
  • Nope - in the end the project was abandoned – Mihai Fratu Apr 11 '23 at 17:43

0 Answers0