watch OS support

This commit is contained in:
John Estropia
2015-10-20 20:38:58 +09:00
parent 4792c4462e
commit dc8bdf3bad
14 changed files with 433 additions and 42 deletions

View File

@@ -23,7 +23,7 @@
// SOFTWARE.
//
#import <CoreData/CoreData.h>
#import <Foundation/Foundation.h>
FOUNDATION_EXPORT double CoreStoreVersionNumber;
FOUNDATION_EXPORT const unsigned char CoreStoreVersionString[];

View File

@@ -24,6 +24,7 @@
//
import Foundation
import CoreData
public func +(left: OrderBy, right: OrderBy) -> OrderBy {

View File

@@ -24,6 +24,7 @@
//
import Foundation
import CoreData
public func &&(left: Where, right: Where) -> Where {

View File

@@ -24,6 +24,8 @@
//
import Foundation
import CoreData
// MARK: - CoreStore

View File

@@ -149,7 +149,7 @@ internal final class FetchedResultsControllerDelegate: NSObject, NSFetchedResult
break
}
if self.deletedSections.contains(indexPath.section) {
if self.deletedSections.contains(indexPath.indexAtPosition(0)) {
self.handler?.controller(
controller,
@@ -162,7 +162,7 @@ internal final class FetchedResultsControllerDelegate: NSObject, NSFetchedResult
}
case .Update:
guard let section = indexPath?.section else {
guard let section = indexPath?.indexAtPosition(0) else {
return
}

View File

@@ -24,6 +24,7 @@
//
import Foundation
import CoreData
/**
The `NSError` error domain for `CoreStore`.

View File

@@ -102,7 +102,7 @@ public final class ListMonitor<T: NSManagedObject> {
*/
public subscript(sectionIndex: Int, itemIndex: Int) -> T {
return self[NSIndexPath(forItem: itemIndex, inSection: sectionIndex)]
return self[NSIndexPath(indexes: [sectionIndex, itemIndex], length: 2)]
}
/**
@@ -157,7 +157,10 @@ public final class ListMonitor<T: NSManagedObject> {
*/
public subscript(safeIndexPath indexPath: NSIndexPath) -> T? {
return self[safeSectionIndex: indexPath.section, safeItemIndex: indexPath.item]
return self[
safeSectionIndex: indexPath.indexAtPosition(0),
safeItemIndex: indexPath.indexAtPosition(1)
]
}
/**

View File

@@ -24,6 +24,7 @@
//
import Foundation
import CoreData
import GCDKit