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!