Accessing data via shared data container vs openParentApplication:reply:

Hi,


I am just starting to make an apple watch app/extension for an app that I already have on the iPhone. On the iPhone the app has a core data store that it uses to store data. Looking at Apple's documentation it seems that the right way to access this core data store on the watch would be to setup the data store in a shared app group container.


To do this I would also need to perform the following steps :


1. Migrate the existing data store from the current location into the shared container on app startup (at least the first time)

2. Take care of cases where the core data store is encrypted (we encrypt the sqlite DB underneath) and also figure out if that will conflict with the migration in step 1.


The steps above are possible to do although they are not trivial.


I was wondering what issues would there be if I was to avoid this step altogether (using the shared container) and simply called openParentApplication:reply: everytime my watch app needed data ? My gut instinct tells me that this method would be wrong but I'm not sure why that would be the case.


As I see it, if I user the shared container the watch extension would have direct access to the core data store but since the extension runs on the phone it would be the same thing as using the openParent:reply: call ? What am I not understanding that makes the openParent:reply: option look ok ?


Thanks

Accessing data via shared data container vs openParentApplication:reply:
 
 
Q