V3.0 Book Chapter 6 - Non-sequential versions not working

I followed along with the entire Chapter creating the final version of the UnCloudNotes that would migrate between v1 through v4 of the data store. I used the provided v2 version of the app to generate a note with an image on the simulator.

Then I used the final provided version of the app to migrate that to the final version. When I do, the image appears to get lost. By setting breakpoints in the code, I was able to verify that the migration from v2 to v3 using the routines in the DataMigrationManager appear to work - I kill the app after this migration and then use the v3 of the app on the simulator to successfully load that data store and see the image.

However, if I then let the final app version migration from v3 to v4, the image is lost. I double checked everything and just don’t see the problem. I do however notice that the AttachmentToImageAttachmentMigrationPolicyV3toV4 methods are never getting called so the mapping from v3 to v4 apparently is not being used during the migration. I’ve confirmed this problem with the code shipped with the book. Any ideas are appreciated. Thanks!

@cdisdero Thanks very much for your question, and my apologies for the delay in responding. Have you checked the errata for Core Data? There have been other posts regarding this chapter so it is very likely that a solution for your error has been found :slight_smile: Take a look, and get back to us if the problem still persists.

All the best!