I developed a iOS app that uses Core Data framework and saves the persistent store in the application document directory. Into the app terget I can retrieve the persistent store path using the following method:
- (NSString *)applicationDocumentsDirectory {
return [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject];
}
Then I created a new WatchKit extension target and I want to retrieve the persistent store saved by the iOS app, but when I try to use the above method in the Interface Controller of the watch extension, it returns a different path.
How can I find the persistent store path of the iOS app in the watchkit extesion target ?