fixed platform dependencies

This commit is contained in:
John Rommel Estropia
2016-06-17 01:24:19 +09:00
parent 76a2bc1da2
commit 2dc09289bf
33 changed files with 662 additions and 48 deletions

View File

@@ -68,6 +68,9 @@ internal extension NSManagedObjectContext {
context.mergePolicy = NSMergeByPropertyObjectTrumpMergePolicy
context.undoManager = nil
context.setupForCoreStoreWithContextName("com.corestore.rootcontext")
#if os(iOS) || os(OSX)
context.observerForDidImportUbiquitousContentChangesNotification = NotificationObserver(
notificationName: NSPersistentStoreDidImportUbiquitousContentChangesNotification,
object: coordinator,
@@ -84,6 +87,9 @@ internal extension NSManagedObjectContext {
}
}
)
#endif
return context
}