From 8e8db1d7bdf1080957aee3b283b389d9707c488c Mon Sep 17 00:00:00 2001 From: Navka Sergey Date: Wed, 30 Sep 2020 11:31:37 +0300 Subject: [PATCH 1/3] removed manual update `mainContext` after deletion all objects --- DBClient/CoreData/CoreDataDBClient.swift | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/DBClient/CoreData/CoreDataDBClient.swift b/DBClient/CoreData/CoreDataDBClient.swift index c8799fb..706ba86 100644 --- a/DBClient/CoreData/CoreDataDBClient.swift +++ b/DBClient/CoreData/CoreDataDBClient.swift @@ -95,8 +95,8 @@ public class CoreDataDBClient { private lazy var managedObjectModel: NSManagedObjectModel = { guard let modelURL = self.bundle.url(/service/forresource: self.modelName, withExtension: "momd"), - let objectModel = NSManagedObjectModel(contentsOf: modelURL) else { - fatalError("Can't find managedObjectModel named \(self.modelName) in \(self.bundle)") + let objectModel = NSManagedObjectModel(contentsOf: modelURL) else { + fatalError("Can't find managedObjectModel named \(self.modelName) in \(self.bundle)") } return objectModel @@ -506,16 +506,9 @@ extension CoreDataDBClient: DBClient { let fetchRequest = NSFetchRequest(entityName: type.entityName) let deleteRequest = NSBatchDeleteRequest(fetchRequest: fetchRequest) - deleteRequest.resultType = .resultTypeObjectIDs - performWriteTask { [weak mainContext] context, savingClosure in + performWriteTask { context, savingClosure in do { - let result = try context.execute(deleteRequest) as? NSBatchDeleteResult - if let objectIDs = result?.result as? [NSManagedObjectID] { - for objectID in objectIDs { - guard let object = mainContext?.object(with: objectID) else { continue } - mainContext?.delete(object) - } - } + try context.execute(deleteRequest) try savingClosure() completion(.success(())) } catch { From c74af8bdc2cd8eb4c502466be0fc710200f4d40e Mon Sep 17 00:00:00 2001 From: Navka Sergey Date: Wed, 30 Sep 2020 11:33:31 +0300 Subject: [PATCH 2/3] removed warnings --- DBClient/CoreData/CoreDataChange.swift | 6 +- .../CoreData/CoreDataExecuteTests.swift | 2 +- .../Interface/Realm/RealmExecuteTests.swift | 2 +- .../xcshareddata/xcschemes/Example.xcscheme | 88 +++++++++++++++++++ 4 files changed, 93 insertions(+), 5 deletions(-) create mode 100644 Example/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme diff --git a/DBClient/CoreData/CoreDataChange.swift b/DBClient/CoreData/CoreDataChange.swift index 0e67796..5eee582 100644 --- a/DBClient/CoreData/CoreDataChange.swift +++ b/DBClient/CoreData/CoreDataChange.swift @@ -32,21 +32,21 @@ enum CoreDataChange { var isDeletion: Bool { switch self { - case .delete(_): return true + case .delete(_, _): return true default: return false } } var isUpdate: Bool { switch self { - case .update(_): return true + case .update(_, _): return true default: return false } } var isInsertion: Bool { switch self { - case .insert(_): return true + case .insert(_, _): return true default: return false } } diff --git a/Example/DBClientTests/Interface/CoreData/CoreDataExecuteTests.swift b/Example/DBClientTests/Interface/CoreData/CoreDataExecuteTests.swift index de23225..8b24f51 100644 --- a/Example/DBClientTests/Interface/CoreData/CoreDataExecuteTests.swift +++ b/Example/DBClientTests/Interface/CoreData/CoreDataExecuteTests.swift @@ -96,7 +96,7 @@ final class CoreDataExecuteTests: DBClientCoreDataTest { self.dbClient.insert(randomUsers) { result in if result.value != nil { - let request = FetchRequest(sortDescriptor: sortDescriptor) + let request = FetchRequest(sortDescriptors: [sortDescriptor]) self.dbClient.execute(request) { result in expectedUsers = result.value ?? [] diff --git a/Example/DBClientTests/Interface/Realm/RealmExecuteTests.swift b/Example/DBClientTests/Interface/Realm/RealmExecuteTests.swift index 3ac71c6..f5ff144 100644 --- a/Example/DBClientTests/Interface/Realm/RealmExecuteTests.swift +++ b/Example/DBClientTests/Interface/Realm/RealmExecuteTests.swift @@ -86,7 +86,7 @@ final class RealmExecuteTests: DBClientRealmTest { self.dbClient.insert(randomUsers) { result in if result.value != nil { - let request = FetchRequest(sortDescriptor: sortDescriptor) + let request = FetchRequest(sortDescriptors: [sortDescriptor]) self.dbClient.execute(request) { result in expectedUsers = result.value ?? [] diff --git a/Example/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme b/Example/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme new file mode 100644 index 0000000..61d9f67 --- /dev/null +++ b/Example/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 343483ea978bfbfbef83396a4324a3301f1943d8 Mon Sep 17 00:00:00 2001 From: Navka Sergey Date: Wed, 30 Sep 2020 11:44:48 +0300 Subject: [PATCH 3/3] bump version # use cocoapods 1.9.3 --- DBClient.podspec | 2 +- Example/Example.xcodeproj/project.pbxproj | 164 ++++++++++++---------- Example/Podfile.lock | 12 +- README.md | 2 +- 4 files changed, 96 insertions(+), 84 deletions(-) diff --git a/DBClient.podspec b/DBClient.podspec index 6b2eb23..efc98c9 100644 --- a/DBClient.podspec +++ b/DBClient.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'DBClient' - s.version = '1.4.2' + s.version = '1.4.3' s.requires_arc = true s.summary = 'CoreData & Realm wrapper written on Swift' s.homepage = '' diff --git a/Example/Example.xcodeproj/project.pbxproj b/Example/Example.xcodeproj/project.pbxproj index 742e25d..aa2ea30 100644 --- a/Example/Example.xcodeproj/project.pbxproj +++ b/Example/Example.xcodeproj/project.pbxproj @@ -7,8 +7,8 @@ objects = { /* Begin PBXBuildFile section */ - 6544BEF6B0A326E74A0930F3 /* Pods_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8EE3B934F48958491C32E38F /* Pods_Example.framework */; }; - 91146657A7C9C72AEB2CA0A0 /* Pods_DBClientTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5FF85D02C1E34B0EF6E75EB /* Pods_DBClientTests.framework */; }; + 24F5AB7E06BE309DAFA43371 /* Pods_DBClientTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B8DBBB775543A888D702A40 /* Pods_DBClientTests.framework */; }; + 2C2BCF9228F8F0E457834967 /* Pods_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FCD4ED25CA4CA6C0699D7A79 /* Pods_Example.framework */; }; B8275B001E4B6D2600232EE4 /* DBClientTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8275AFF1E4B6D2600232EE4 /* DBClientTest.swift */; }; B8477EA11E4DC0EA00608B78 /* User+Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8477E9A1E4DC0EA00608B78 /* User+Comparable.swift */; }; B8477EA21E4DC0EA00608B78 /* User+Equtable.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8477E9B1E4DC0EA00608B78 /* User+Equtable.swift */; }; @@ -55,11 +55,11 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 75617BC79816F39A066B228E /* Pods-DBClientTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DBClientTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-DBClientTests/Pods-DBClientTests.release.xcconfig"; sourceTree = ""; }; - 8EE3B934F48958491C32E38F /* Pods_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 9A5965F4590A17BA658C0DF4 /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig"; sourceTree = ""; }; - 9D0BE2A63D58FAA10DB1082A /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Example/Pods-Example.release.xcconfig"; sourceTree = ""; }; - A17286BF14E3A7198D1175A3 /* Pods-DBClientTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DBClientTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-DBClientTests/Pods-DBClientTests.debug.xcconfig"; sourceTree = ""; }; + 09BFF17BEA68F323DD3BCB0E /* Pods-DBClientTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DBClientTests.release.xcconfig"; path = "Target Support Files/Pods-DBClientTests/Pods-DBClientTests.release.xcconfig"; sourceTree = ""; }; + 6BBE30FC1C4B342BACF53109 /* Pods-DBClientTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DBClientTests.debug.xcconfig"; path = "Target Support Files/Pods-DBClientTests/Pods-DBClientTests.debug.xcconfig"; sourceTree = ""; }; + 8B8DBBB775543A888D702A40 /* Pods_DBClientTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_DBClientTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 97E5218D9718CDE9EC738C70 /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.release.xcconfig"; path = "Target Support Files/Pods-Example/Pods-Example.release.xcconfig"; sourceTree = ""; }; + A64DC9680543C1817F5C8581 /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.debug.xcconfig"; path = "Target Support Files/Pods-Example/Pods-Example.debug.xcconfig"; sourceTree = ""; }; B8275AFD1E4B6D2500232EE4 /* DBClientTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DBClientTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; B8275AFF1E4B6D2600232EE4 /* DBClientTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DBClientTest.swift; sourceTree = ""; }; B8275B011E4B6D2600232EE4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -97,7 +97,7 @@ C53372761E261A30004ECBCF /* ObjectUser.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ObjectUser.swift; sourceTree = ""; }; C53372771E261A30004ECBCF /* User+Realm.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "User+Realm.swift"; sourceTree = ""; }; C53372781E261A30004ECBCF /* User.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; - F5FF85D02C1E34B0EF6E75EB /* Pods_DBClientTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_DBClientTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + FCD4ED25CA4CA6C0699D7A79 /* Pods_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -105,7 +105,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 91146657A7C9C72AEB2CA0A0 /* Pods_DBClientTests.framework in Frameworks */, + 24F5AB7E06BE309DAFA43371 /* Pods_DBClientTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -113,29 +113,18 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 6544BEF6B0A326E74A0930F3 /* Pods_Example.framework in Frameworks */, + 2C2BCF9228F8F0E457834967 /* Pods_Example.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 508C283B1E64110854D66E0E /* Pods */ = { + 9E02C52126369B76E0996861 /* Frameworks */ = { isa = PBXGroup; children = ( - 9A5965F4590A17BA658C0DF4 /* Pods-Example.debug.xcconfig */, - 9D0BE2A63D58FAA10DB1082A /* Pods-Example.release.xcconfig */, - A17286BF14E3A7198D1175A3 /* Pods-DBClientTests.debug.xcconfig */, - 75617BC79816F39A066B228E /* Pods-DBClientTests.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; - 779BEA8364EDA4F88D3C7A7B /* Frameworks */ = { - isa = PBXGroup; - children = ( - 8EE3B934F48958491C32E38F /* Pods_Example.framework */, - F5FF85D02C1E34B0EF6E75EB /* Pods_DBClientTests.framework */, + 8B8DBBB775543A888D702A40 /* Pods_DBClientTests.framework */, + FCD4ED25CA4CA6C0699D7A79 /* Pods_Example.framework */, ); name = Frameworks; sourceTree = ""; @@ -196,9 +185,9 @@ children = ( B8275AFE1E4B6D2600232EE4 /* DBClientTests */, C53372581E26155D004ECBCF /* Example */, - 779BEA8364EDA4F88D3C7A7B /* Frameworks */, - 508C283B1E64110854D66E0E /* Pods */, C53372571E26155D004ECBCF /* Products */, + EB716B5158D9F975E8891343 /* Pods */, + 9E02C52126369B76E0996861 /* Frameworks */, ); sourceTree = ""; }; @@ -257,6 +246,17 @@ path = Realm; sourceTree = ""; }; + EB716B5158D9F975E8891343 /* Pods */ = { + isa = PBXGroup; + children = ( + 6BBE30FC1C4B342BACF53109 /* Pods-DBClientTests.debug.xcconfig */, + 09BFF17BEA68F323DD3BCB0E /* Pods-DBClientTests.release.xcconfig */, + A64DC9680543C1817F5C8581 /* Pods-Example.debug.xcconfig */, + 97E5218D9718CDE9EC738C70 /* Pods-Example.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -264,11 +264,11 @@ isa = PBXNativeTarget; buildConfigurationList = B8275B061E4B6D2600232EE4 /* Build configuration list for PBXNativeTarget "DBClientTests" */; buildPhases = ( - BF151D4AF0AD5B6D29F45416 /* [CP] Check Pods Manifest.lock */, + 0DE39FA0C3D9382CE2F6A3DF /* [CP] Check Pods Manifest.lock */, B8275AF91E4B6D2500232EE4 /* Sources */, B8275AFA1E4B6D2500232EE4 /* Frameworks */, B8275AFB1E4B6D2500232EE4 /* Resources */, - 3C04B97117E537708993B649 /* [CP] Embed Pods Frameworks */, + 613847FAD710B824251819D6 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -284,12 +284,12 @@ isa = PBXNativeTarget; buildConfigurationList = C533726A1E26155D004ECBCF /* Build configuration list for PBXNativeTarget "Example" */; buildPhases = ( - 7A7AA963D82D9DF854F879D4 /* [CP] Check Pods Manifest.lock */, + 2BF092517B630DA2399B842F /* [CP] Check Pods Manifest.lock */, C53372521E26155D004ECBCF /* Sources */, C53372531E26155D004ECBCF /* Frameworks */, C53372541E26155D004ECBCF /* Resources */, - 5DD0265501157C9DFB18D487 /* [CP] Embed Pods Frameworks */, 8839DF70215C08D90021A85A /* ShellScript */, + D6B25D338516D2CD0B2FA861 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -307,7 +307,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0820; - LastUpgradeCheck = 1000; + LastUpgradeCheck = 1200; ORGANIZATIONNAME = Yalantis; TargetAttributes = { B8275AFC1E4B6D2500232EE4 = { @@ -325,10 +325,9 @@ }; buildConfigurationList = C53372511E26155D004ECBCF /* Build configuration list for PBXProject "Example" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( - English, en, Base, ); @@ -364,70 +363,72 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 3C04B97117E537708993B649 /* [CP] Embed Pods Frameworks */ = { + 0DE39FA0C3D9382CE2F6A3DF /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-DBClientTests/Pods-DBClientTests-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/DBClient/DBClient.framework", - "${BUILT_PRODUCTS_DIR}/Realm/Realm.framework", - "${BUILT_PRODUCTS_DIR}/RealmSwift/RealmSwift.framework", - "${BUILT_PRODUCTS_DIR}/YALResult/YALResult.framework", + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( ); - name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DBClient.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Realm.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RealmSwift.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YALResult.framework", + "$(DERIVED_FILE_DIR)/Pods-DBClientTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DBClientTests/Pods-DBClientTests-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 5DD0265501157C9DFB18D487 /* [CP] Embed Pods Frameworks */ = { + 2BF092517B630DA2399B842F /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/DBClient/DBClient.framework", - "${BUILT_PRODUCTS_DIR}/Realm/Realm.framework", - "${BUILT_PRODUCTS_DIR}/RealmSwift/RealmSwift.framework", - "${BUILT_PRODUCTS_DIR}/YALResult/YALResult.framework", + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( ); - name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DBClient.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Realm.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RealmSwift.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YALResult.framework", + "$(DERIVED_FILE_DIR)/Pods-Example-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 7A7AA963D82D9DF854F879D4 /* [CP] Check Pods Manifest.lock */ = { + 613847FAD710B824251819D6 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", + "${PODS_ROOT}/Target Support Files/Pods-DBClientTests/Pods-DBClientTests-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/DBClient/DBClient.framework", + "${BUILT_PRODUCTS_DIR}/Realm/Realm.framework", + "${BUILT_PRODUCTS_DIR}/RealmSwift/RealmSwift.framework", + "${BUILT_PRODUCTS_DIR}/YALResult/YALResult.framework", ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Example-checkManifestLockResult.txt", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DBClient.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Realm.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RealmSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YALResult.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DBClientTests/Pods-DBClientTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; 8839DF70215C08D90021A85A /* ShellScript */ = { @@ -445,24 +446,31 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\n"; + shellScript = " +"; }; - BF151D4AF0AD5B6D29F45416 /* [CP] Check Pods Manifest.lock */ = { + D6B25D338516D2CD0B2FA861 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", + "${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/DBClient/DBClient.framework", + "${BUILT_PRODUCTS_DIR}/Realm/Realm.framework", + "${BUILT_PRODUCTS_DIR}/RealmSwift/RealmSwift.framework", + "${BUILT_PRODUCTS_DIR}/YALResult/YALResult.framework", ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-DBClientTests-checkManifestLockResult.txt", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DBClient.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Realm.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RealmSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YALResult.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -544,7 +552,7 @@ /* Begin XCBuildConfiguration section */ B8275B041E4B6D2600232EE4 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A17286BF14E3A7198D1175A3 /* Pods-DBClientTests.debug.xcconfig */; + baseConfigurationReference = 6BBE30FC1C4B342BACF53109 /* Pods-DBClientTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; INFOPLIST_FILE = DBClientTests/Info.plist; @@ -558,7 +566,7 @@ }; B8275B051E4B6D2600232EE4 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 75617BC79816F39A066B228E /* Pods-DBClientTests.release.xcconfig */; + baseConfigurationReference = 09BFF17BEA68F323DD3BCB0E /* Pods-DBClientTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; INFOPLIST_FILE = DBClientTests/Info.plist; @@ -574,6 +582,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -594,6 +603,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -618,7 +628,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.2; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -632,6 +642,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -652,6 +663,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -670,7 +682,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.2; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; @@ -681,7 +693,7 @@ }; C533726B1E26155D004ECBCF /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9A5965F4590A17BA658C0DF4 /* Pods-Example.debug.xcconfig */; + baseConfigurationReference = A64DC9680543C1817F5C8581 /* Pods-Example.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Example/Info.plist; @@ -694,7 +706,7 @@ }; C533726C1E26155D004ECBCF /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9D0BE2A63D58FAA10DB1082A /* Pods-Example.release.xcconfig */; + baseConfigurationReference = 97E5218D9718CDE9EC738C70 /* Pods-Example.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Example/Info.plist; diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 65ae243..f2e5a93 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,10 +1,10 @@ PODS: - - DBClient/Core (1.4.2): + - DBClient/Core (1.4.3): - YALResult (= 1.4) - - DBClient/CoreData (1.4.2): + - DBClient/CoreData (1.4.3): - DBClient/Core - YALResult (= 1.4) - - DBClient/Realm (1.4.2): + - DBClient/Realm (1.4.3): - DBClient/Core - RealmSwift (~> 3.15.0) - YALResult (= 1.4) @@ -20,7 +20,7 @@ DEPENDENCIES: - DBClient/Realm (from `../`) SPEC REPOS: - https://github.com/cocoapods/specs.git: + https://github.com/CocoaPods/Specs.git: - Realm - RealmSwift - YALResult @@ -30,11 +30,11 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - DBClient: 6833b6f3abb9bbd90dc3289621179f3fad102c0c + DBClient: cad8d754cd7ae07256c75f23108ab9b2167398a0 Realm: 9b834e1be6062f544805252c812348872dc5d4ed RealmSwift: 8a41886f8ab6efef9eb8df97de2f2bb911561a79 YALResult: 26915691cdd19269936336d6f28e1a015c64175e PODFILE CHECKSUM: 01e2cf56f70348c45b9e7248a505591dd86d210b -COCOAPODS: 1.6.1 +COCOAPODS: 1.9.3 diff --git a/README.md b/README.md index 4bc75a3..305fb84 100644 --- a/README.md +++ b/README.md @@ -143,7 +143,7 @@ public func upsertManagedObject(in context: NSManagedObjectContext, existedInsta | Version | Swift | Dependencies | iOS | |----------|-------|----------------------------------------|------| -| `1.4.2` | 5 | RealmSwift 3.15.0, YALResult 1.4 | 10 | +| `1.4.3` | 5.3 | RealmSwift 3.15.0, YALResult 1.4 | 10 | | `1.3` | 4.2 | RealmSwift 3.11.1, YALResult 1.1 | 10 | | `1.0` | 4.2 | RealmSwift 2.10.1, YALResult 1.0 | 10 | | `0.7` | 4.0 | RealmSwift 2.10.1, BoltsSwift 1.4 | 9 |