My custom keyboard works ok most of the time, but sometimes it is extremely slow to load and sometimes it couldn't be loaded at all (as a result I can't use any keyboard in the affected application because I need to have switching key to switch to another keyboard, and I don't have any).
I know that custom keyboards are always slower than Apple's ones (and maybe this is more or less ok for the user if he/she needs this keyboard) but the last one is a deal-breaker. So, my question is — how and where do I check in run-time if there is any problem with my keyboard? The unsuccessful loading is inconsistent so it's kind of hard to debug.
Right now almost all my code for the keyboard in viewDidLoad(), and the keyboard is very simple (UICollectionView with custom cells; all the data including images for the buttons-cells comes from shared Realm database).