Migration policy from v3 to v4

I have a question regarding the code in the migration policy file.
Why there is a function inside a func. nothing wrong but it’s not very common practice.

I am wondering if there is reason behind it. Please help me understand.
Code snippet below:

class AttachmentToImageAttachmentMigrationPolicyV3toV4: NSEntityMigrationPolicy {
  override **func** createDestinationInstances(forSource sInstance: NSManagedObject, in mapping: NSEntityMapping, manager: NSMigrationManager) throws {
    **func** traversePropertyMappings(block: (NSPropertyMapping, String) -> Void) throws

@alokc83 Please check out the updated version of the book:


I hope it helps!

This topic was automatically closed after 166 days. New replies are no longer allowed.