I created some custom keyboard, and although I wasn't able to really test it I have an impression that my keyboard is extremely unstable on device.
In some cases it just isn't loaded in app (I have it with Telegram messenger; when my keyboard is active and I'm trying to open Telegram I don't have any keyboard at all from time to time; to fix it I have to open any other app with keyboard input and go back to Telegram).
In some cases it is unloaded without user's interaction.
In some cases it is shown in keyboards list (not in the settings, but after the long tap on the switch keyboard button) as "(null)-myKeyboard". Sometimes it happens just after install (but if I'm just wait for, like, a minute — it will work)
In some cases — and this one worries me the most — my keyboard is removed from the active keyboards list in Settings.
When it works, it works. But it is obviously not very usable.
My keyboard is written in Swift (a bunch of buttons with a lot of NSLayoutConstraints, all written in code); I'm using Realm to store some constants; I have like 3-4 small images on buttons; I need full access for my keyboard.
Could you please give me some directions? What could be the problem here, and what is the best way to find it?