How to Migrate Core Data's Data to App Group's Data
问题 I just added App Groups to my app using this StackOverFlow post. Unfortunately since the defaultDirectoryURL is changing, I can not fetch any of the old data I made before using the App Groups directory. I know the data is still there because when I switch back to using a regular NSPersistentContainer instead of the GroupedPersistentContainer , I can get the data. How can I migrate my old data over to where I'm fetching the app group's data? Core Data code: class CoreDataManager { static let