So, let's say I have a container app and an extension to that app for a custom keyboard. Let's say that custom keyboard has, by default 5 keys. Doesn't matter what those keys are.
Now, I want the user to be able to DISABLE any of the 5 keys in the container app. If disabled in the container app, the keys should appear red and disabled in the keyboard.
My question is: How do I load the user preferences/serialized data from the container app, into the UIInputViewController?
If anyone could help with steps necessary to make this happen, or provide a link to a tutorial (I can't seem to find one), it would be much appreciated.
So I finally figured it out. Here are the basic steps.
1) Create a Shared Group. This link provides step by step instructions on how to do that: https://stackoverflow.com/a/29051138/1152868. I had initially implemented these steps but I was still unable to access the shared directory (outlined in https://stackoverflow.com/a/26050187/1152868) from the extension. Turns out you have to add the entitlements file to both the container app AND the extension target. That was the biggie for me.
2) Once you confirm open access across your container app and the extension, you can share data between em. I referred to this tutorial for sharing: http://www.atomicbird.com/blog/sharing-with-app-extensions. You have two options: using a shared file directory or using a shared NSUserDefaults domain. In my app, I was saving and loading data with NSCoding. But, I experienced issues with unarchiving the data in the extension, so I decided to save to NSUserDefaults instead (the data I need in the extension can be formatted as a simple dictionary, so it was easy enough).
Using Shared Groups and NSUserDefaults, I am now able to save and load data from the container app to the extension!