Skip to content

Instantly share code, notes, and snippets.

@horseshoe7
horseshoe7 / gist:e85bbb90278f626bea2f827ee5228703
Last active April 27, 2021 08:33
Incremental MHWMigrationManager extended for optional finalDestinationURL
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
@class MHWMigrationManager;
@protocol MHWMigrationManagerDelegate <NSObject>
NS_ASSUME_NONNULL_BEGIN
@optional
- (void)migrationManager:(MHWMigrationManager *)migrationManager migrationProgress:(float)migrationProgress;
@horseshoe7
horseshoe7 / gist:0083ce48cba98ae107a18de06a39767f
Created September 13, 2017 08:34
Initialization of Core Data stack that needs a manual migration from 2 different models and stores:
// see also this gist: https://gist.github.com/horseshoe7/e85bbb90278f626bea2f827ee5228703
// and a post about Core Data migrations at http://horseshoe7.wordpress.com
import Foundation
import CoreData
class CoreDataStackHelper : NSObject, MHWMigrationManagerDelegate {
var currentModelStoreURL: URL? = nil