Hello! I am developing a keyboard extension for my application and have some issues with it. I need transfer some small amount of data from main application to keyboard. For this purpose I write values to NSUserDefaults, which are shared between app and extension. I also added observers to some keys in user defaults to track when values change and take appropriate actions.
The problem is that just after writing info to user defaults keyboard freezes. After I perform gesture to hide keyboard it hides with tugging and after opening it again I have this output in console multiple times:
Full thread dump:
"< unnamed thread >"
"< unnamed thread >"
"Finalizer"
"< unnamed thread >"
"Debugger agent"
Then keyboard switches like the next keyboard button was pressed.
Sometimes UI just freezes without any output and sometimes observers don`t fire at all.
Have anybody ever had this strange issue?