I'm having some performance problems with a custom keyboard I'm working on. Loading all the words in the spell correction tree takes quite a bit of time. This seems to be done each time the keyboard appears - is there any way to preserve the state of the keyboard? Apps can do suspend / resume etc - but I can't find any documentation on how to do this for extensions, or if there's any mechanism for doing this att all.
Thanks!
You are loading dictionary from Internet or from the disk? For the first case NSUserDefaults, encoding (NsCopying) are the options to store info. You can load it in background.
According to the docs, os typically kills extension process, so, I think there is no way to prevent keyboard objects from deallocation (you may use nskeydarchiver).