Crossing the process boundary.
WHAT THE PROBLEM IS
Each has its own container, and cannot see the other's files by default.
WHAT AN APP GROUP PROVIDES
A shared container both can access.
WHAT IT REQUIRES
An entitlement, and the same identifier configured on each target.
WHAT TO PUT IN IT
Shared files A shared database Shared preference storage
WHAT SHARED PREFERENCE STORAGE REQUIRES
Initialising it with the group identifier, rather than the default.
WHAT A SHARED KEYCHAIN GROUP PROVIDES
Credentials accessible to both.
WHAT IT REQUIRES
Matching team identity and a declared access group.
WHAT TO BE CAREFUL WITH
Both processes writing simultaneously Assuming the application is running when the extension is Caching data that the other changed
WHAT TO DESIGN FOR
Either running without the other.
WHAT TO USE FOR COORDINATION
File coordination, where both may write.
WHAT TO TEST
Using the extension with the application never launched Using it while the application is running Data written by one appearing in the other
WHAT TO DOCUMENT
Which target owns which data.