diff --git a/CoreStore.podspec b/CoreStore.podspec index 2e50f943..c444fba6 100644 --- a/CoreStore.podspec +++ b/CoreStore.podspec @@ -11,12 +11,22 @@ Pod::Spec.new do |s| s.ios.deployment_target = "13.0" s.osx.deployment_target = "10.15" - s.watchos.deployment_target = "6.0" s.tvos.deployment_target = "13.0" + s.watchos.deployment_target = "6.0" - s.source_files = "Sources", "Sources/**/*.{swift,h,m}" + s.source_files = "Sources", "Sources/**/*.swift" s.public_header_files = "Sources/**/*.h" s.frameworks = "Foundation", "CoreData" s.requires_arc = true s.pod_target_xcconfig = { 'OTHER_SWIFT_FLAGS[config=Debug]' => '-D DEBUG', 'OTHER_LDFLAGS' => '-weak_framework Combine -weak_framework SwiftUI' } + + s.test_spec "CoreStoreTests" do |ts| + ts.source_files = "CoreStoreTests", "CoreStoreTests/**/*.swift", "CoreStoreTests/**/*.xcdatamodeld", "CoreStoreTests/**/*.xcdatamodel" + ts.public_header_files = "CoreStoreTests/**/*.h" + ts.resources = [ "CoreStoreTests/**/*.xcdatamodeld", "CoreStoreTests/**/*.xcdatamodel" ] + ts.preserve_paths = "CoreStoreTests/**/*.xcdatamodeld" + ts.frameworks = "Foundation", "CoreData" + ts.requires_arc = true + ts.platforms = { :ios => nil, :osx => nil, :tvos => nil, :watchos => nil } + end end diff --git a/CoreStore.xcodeproj/project.pbxproj b/CoreStore.xcodeproj/project.pbxproj index bd6df61f..3bef46ba 100644 --- a/CoreStore.xcodeproj/project.pbxproj +++ b/CoreStore.xcodeproj/project.pbxproj @@ -848,12 +848,12 @@ remoteGlobalIDString = 82BA18881C4BBCBA00A0916E; remoteInfo = "CoreStore tvOS"; }; - B5114DA528CEEE5400EEAE78 /* PBXContainerItemProxy */ = { + B5114DCB28CF0C2B00EEAE78 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 2F03A52719C5C6DA005002A5 /* Project object */; proxyType = 1; - remoteGlobalIDString = 82BA18881C4BBCBA00A0916E; - remoteInfo = "CoreStore tvOS"; + remoteGlobalIDString = B563216E1BD65082006C9394; + remoteInfo = "CoreStore watchOS"; }; B52DD17F1BE1F8CD00949AFE /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; @@ -1878,7 +1878,7 @@ buildRules = ( ); dependencies = ( - B5114DA428CEEE5400EEAE78 /* PBXTargetDependency */, + B5114DCC28CF0C2B00EEAE78 /* PBXTargetDependency */, ); name = "CoreStoreTests watchOS"; productName = "CoreStore tvOSTests"; @@ -2935,10 +2935,10 @@ target = 82BA18881C4BBCBA00A0916E /* CoreStore tvOS */; targetProxy = 82BA18941C4BBCBA00A0916E /* PBXContainerItemProxy */; }; - B5114DA428CEEE5400EEAE78 /* PBXTargetDependency */ = { + B5114DCC28CF0C2B00EEAE78 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 82BA18881C4BBCBA00A0916E /* CoreStore tvOS */; - targetProxy = B5114DA528CEEE5400EEAE78 /* PBXContainerItemProxy */; + target = B563216E1BD65082006C9394 /* CoreStore watchOS */; + targetProxy = B5114DCB28CF0C2B00EEAE78 /* PBXContainerItemProxy */; }; B52DD1801BE1F8CD00949AFE /* PBXTargetDependency */ = { isa = PBXTargetDependency; diff --git a/CoreStore.xcodeproj/xcshareddata/xcschemes/CoreStore watchOS.xcscheme b/CoreStore.xcodeproj/xcshareddata/xcschemes/CoreStore watchOS.xcscheme index 4d256cc7..aa639710 100644 --- a/CoreStore.xcodeproj/xcshareddata/xcschemes/CoreStore watchOS.xcscheme +++ b/CoreStore.xcodeproj/xcshareddata/xcschemes/CoreStore watchOS.xcscheme @@ -29,7 +29,7 @@ @@ -47,7 +47,7 @@ diff --git a/CoreStoreTests/Info.plist b/CoreStoreTests/Info.plist index 899f6146..89acc5ed 100644 --- a/CoreStoreTests/Info.plist +++ b/CoreStoreTests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 6.2.1 + 9.0.0 CFBundleSignature ???? CFBundleVersion diff --git a/CoreStoreTests/ListObserverTests.swift b/CoreStoreTests/ListObserverTests.swift index b5d02990..c5eb384f 100644 --- a/CoreStoreTests/ListObserverTests.swift +++ b/CoreStoreTests/ListObserverTests.swift @@ -103,7 +103,7 @@ class ListObserverTests: BaseTestDataTestCase { let indexPath = userInfo?["indexPath"] as? IndexPath XCTAssertEqual(indexPath?.section, 0) - XCTAssertEqual(indexPath?.row, 0) + XCTAssertEqual(indexPath?.item, 0) let object = userInfo?["object"] as? TestEntity1 XCTAssertEqual(object?.testBoolean, NSNumber(value: true)) @@ -220,7 +220,7 @@ class ListObserverTests: BaseTestDataTestCase { case NSNumber(value: 101)?: XCTAssertEqual(indexPath?.section, 1) - XCTAssertEqual(indexPath?.row, 0) + XCTAssertEqual(indexPath?.item, 0) XCTAssertEqual(object?.testBoolean, NSNumber(value: true)) XCTAssertEqual(object?.testNumber, NSNumber(value: 11)) @@ -231,7 +231,7 @@ class ListObserverTests: BaseTestDataTestCase { case NSNumber(value: 102)?: XCTAssertEqual(indexPath?.section, 0) - XCTAssertEqual(indexPath?.row, 0) + XCTAssertEqual(indexPath?.item, 0) XCTAssertEqual(object?.testBoolean, NSNumber(value: false)) XCTAssertEqual(object?.testNumber, NSNumber(value: 22)) @@ -359,11 +359,11 @@ class ListObserverTests: BaseTestDataTestCase { let fromIndexPath = userInfo?["fromIndexPath"] as? IndexPath XCTAssertEqual(fromIndexPath?.section, 0) - XCTAssertEqual(fromIndexPath?.row, 0) + XCTAssertEqual(fromIndexPath?.item, 0) let toIndexPath = userInfo?["toIndexPath"] as? IndexPath XCTAssertEqual(toIndexPath?.section, 1) - XCTAssertEqual(toIndexPath?.row, 1) + XCTAssertEqual(toIndexPath?.item, 1) let object = userInfo?["object"] as? TestEntity1 XCTAssertEqual(object?.testEntityID, NSNumber(value: 102)) @@ -468,7 +468,7 @@ class ListObserverTests: BaseTestDataTestCase { let indexPath = userInfo?["indexPath"] as? IndexPath XCTAssertEqual(indexPath?.section, 0) - XCTAssert(indexPath?.row == 0 || indexPath?.row == 1) + XCTAssert(indexPath?.item == 0 || indexPath?.item == 1) let object = userInfo?["object"] as? TestEntity1 XCTAssertEqual(object?.isDeleted, true) diff --git a/CoreStoreTests/Model.xcdatamodeld/Model.xcdatamodel/contents b/CoreStoreTests/Model.xcdatamodeld/Model.xcdatamodel/contents index e5461b79..a50f5b78 100644 --- a/CoreStoreTests/Model.xcdatamodeld/Model.xcdatamodel/contents +++ b/CoreStoreTests/Model.xcdatamodeld/Model.xcdatamodel/contents @@ -1,6 +1,6 @@ - - + + @@ -12,7 +12,7 @@ - + @@ -30,8 +30,4 @@ - - - - \ No newline at end of file diff --git a/CoreStoreTests/TransactionTests.swift b/CoreStoreTests/TransactionTests.swift index a640791f..c63f7d3b 100644 --- a/CoreStoreTests/TransactionTests.swift +++ b/CoreStoreTests/TransactionTests.swift @@ -23,6 +23,7 @@ // SOFTWARE. // +import Foundation import XCTest @testable @@ -428,7 +429,7 @@ final class TransactionTests: BaseTestCase { let indexPath = userInfo?["indexPath"] as? IndexPath XCTAssertEqual(indexPath?.section, 0) - XCTAssertEqual(indexPath?.row, 0) + XCTAssertEqual(indexPath?.item, 0) let object = userInfo?["object"] as? TestEntity1 XCTAssertEqual(object?.testBoolean, NSNumber(value: true))