I have an already published app that use core data.
Now I want to add support for watch kit and today extension.
I need to move core data into shared container without lose previous user saved data, how can I do that in the best way?
You can migrate a Core Data Stack. A fuller answer can be found here, but the short version is:
migratePersistentStore:toURL:options:withType:error:
to move it to the new location. Then remove the old copy.(The problem with Stephen's answer is that it assumes that the Core Data stack is a single SQLite file, which isn't always true.)