I have an iOS custom keyboard that send input texts to its container app, which process them into predictions and send them back to the extension (keyboard) for the user.
In this situation, the container app can run in background for 180 seconds and still catch the inputs. This time elapsed, it goes to suspended mode and the keyboard cannot receive the predictions anymore.
What I've tried so far :
- Silent push notifications : could work but the user needs network. I don't want that.
- Background fetch : it is not sure that the container could wake up immediatly.
- Local notifications : I don't want the user to open the container in foreground. It must remain discreet.
- URL schemes : works but open the app in foreground. Not ideal.
Constraints :
- No network.
- The user should not have to open the container himself.
Concrete case :
- SwiftKey actually does that without user interaction nor network. I can't figure it how...
My question is : is there a way to wake up the container silently while the user is typing from the extension ? Or make the background task running forever ?
Thanks for reading.