Values not always persisted in App group between companion app & app extension

You must request open access in order to access shared NSUserDefaults. It’s stated directly in the App Extension Programming guide: By default, a keyboard has no network access and cannot share a container with its containing app. To enable these things, set the value of the RequestsOpenAccess Boolean key in the Info.plist file to YES. … Read more

Sharing UserDefaults between extensions

You cannot use UserDefaults.standard to share data between a host app and its app extension. You instead have to create a shared container with UserDefaults(suiteName:) to share data. Even though an app extension bundle is nested within its containing app’s bundle, the running app extension and containing app have no direct access to each other’s … Read more