From e1dbd596e86c80514ba9d83e4c4cf89b54b655c3 Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Wed, 25 Nov 2020 14:24:21 +0300 Subject: [PATCH] update Realm to 10.1.4; remove Carthage --- Cartfile | 1 - Cartfile.resolved | 1 - DAO.podspec | 5 +- DAO.xcodeproj/project.pbxproj | 93 ++++++++++++++++--- DAO.xcworkspace/contents.xcworkspacedata | 10 ++ .../xcshareddata/IDEWorkspaceChecks.plist | 8 ++ DAO/Classes/RealmDAO/Model/RLMEntry.swift | 17 +--- Example/Podfile.lock | 30 +++--- Podfile | 14 +++ Podfile.lock | 23 +++++ _Pods.xcodeproj | 1 - 11 files changed, 154 insertions(+), 49 deletions(-) delete mode 100644 Cartfile delete mode 100644 Cartfile.resolved create mode 100644 DAO.xcworkspace/contents.xcworkspacedata create mode 100644 DAO.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 Podfile create mode 100644 Podfile.lock delete mode 120000 _Pods.xcodeproj diff --git a/Cartfile b/Cartfile deleted file mode 100644 index 1e6745c..0000000 --- a/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "realm/realm-cocoa" ~> 5.3 diff --git a/Cartfile.resolved b/Cartfile.resolved deleted file mode 100644 index 1e49ab5..0000000 --- a/Cartfile.resolved +++ /dev/null @@ -1 +0,0 @@ -github "realm/realm-cocoa" "v5.3.3" diff --git a/DAO.podspec b/DAO.podspec index d667eee..b8bb636 100644 --- a/DAO.podspec +++ b/DAO.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'DAO' - s.version = '1.5.0' + s.version = '1.6.0' s.summary = 'DAO Library' s.description = 'Library provides easy way to cache entities.' s.homepage = 'https://github.com/RedMadRobot/DAO' @@ -13,7 +13,8 @@ Pod::Spec.new do |s| s.subspec 'Realm' do |r| r.source_files = 'DAO/Classes/RealmDAO/**/*', 'DAO/Classes/Core/**/*' - r.dependency "RealmSwift", '~> 5.3' + r.dependency "Realm", '~> 10.1' + r.dependency "RealmSwift", '~> 10.1' end s.subspec 'CoreData' do |cd| diff --git a/DAO.xcodeproj/project.pbxproj b/DAO.xcodeproj/project.pbxproj index 3f81932..dd25827 100644 --- a/DAO.xcodeproj/project.pbxproj +++ b/DAO.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + 48BC874C4FE8134679B29670 /* Pods_CoreDataDAO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2E8A9BAF7ECAEC811F5ACE3C /* Pods_CoreDataDAO.framework */; }; + A5A85A8625ADBD73B3EEA43F /* Pods_RealmDAO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3CA293F66C575881DDE04B1E /* Pods_RealmDAO.framework */; }; CC741223237414070032D352 /* RealmConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC741218237414070032D352 /* RealmConfiguration.swift */; }; CC741224237414070032D352 /* RealmDAO.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC74121A237414070032D352 /* RealmDAO.swift */; }; CC741225237414070032D352 /* RealmTranslator.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC74121C237414070032D352 /* RealmTranslator.swift */; }; @@ -19,22 +21,9 @@ CC741236237414420032D352 /* CoreDataConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC74122F237414420032D352 /* CoreDataConfiguration.swift */; }; CC741237237414420032D352 /* CoreDataDAO.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC741231237414420032D352 /* CoreDataDAO.swift */; }; CC741238237414420032D352 /* CoreDataTranslator.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC741233237414420032D352 /* CoreDataTranslator.swift */; }; - CC74123A23741CB20032D352 /* RealmSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC74123923741CB20032D352 /* RealmSwift.framework */; }; - CC74123B23741CB20032D352 /* RealmSwift.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = CC74123923741CB20032D352 /* RealmSwift.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ - CC741202237412E30032D352 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - CC74123B23741CB20032D352 /* RealmSwift.framework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; CC741207237412EB0032D352 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -48,6 +37,12 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 2E8A9BAF7ECAEC811F5ACE3C /* Pods_CoreDataDAO.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CoreDataDAO.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 3CA293F66C575881DDE04B1E /* Pods_RealmDAO.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RealmDAO.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 50E6127A1CFFD5C64BD5C4C0 /* Pods-RealmDAO.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RealmDAO.debug.xcconfig"; path = "Target Support Files/Pods-RealmDAO/Pods-RealmDAO.debug.xcconfig"; sourceTree = ""; }; + 5EEB202F6918AB3DB4D5F157 /* Pods-CoreDataDAO.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CoreDataDAO.release.xcconfig"; path = "Target Support Files/Pods-CoreDataDAO/Pods-CoreDataDAO.release.xcconfig"; sourceTree = ""; }; + B2C2591874CB39D025BA9678 /* Pods-CoreDataDAO.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CoreDataDAO.debug.xcconfig"; path = "Target Support Files/Pods-CoreDataDAO/Pods-CoreDataDAO.debug.xcconfig"; sourceTree = ""; }; + BB6593BCAA1FA4DC2224EB94 /* Pods-RealmDAO.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RealmDAO.release.xcconfig"; path = "Target Support Files/Pods-RealmDAO/Pods-RealmDAO.release.xcconfig"; sourceTree = ""; }; CC7411D62374124D0032D352 /* RealmDAO.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RealmDAO.framework; sourceTree = BUILT_PRODUCTS_DIR; }; CC7411E4237412650032D352 /* CoreDataDAO.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CoreDataDAO.framework; sourceTree = BUILT_PRODUCTS_DIR; }; CC741218237414070032D352 /* RealmConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RealmConfiguration.swift; sourceTree = ""; }; @@ -71,7 +66,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - CC74123A23741CB20032D352 /* RealmSwift.framework in Frameworks */, + A5A85A8625ADBD73B3EEA43F /* Pods_RealmDAO.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -79,12 +74,25 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 48BC874C4FE8134679B29670 /* Pods_CoreDataDAO.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 9BBD4E66B9CEA0C2F7995438 /* Pods */ = { + isa = PBXGroup; + children = ( + B2C2591874CB39D025BA9678 /* Pods-CoreDataDAO.debug.xcconfig */, + 5EEB202F6918AB3DB4D5F157 /* Pods-CoreDataDAO.release.xcconfig */, + 50E6127A1CFFD5C64BD5C4C0 /* Pods-RealmDAO.debug.xcconfig */, + BB6593BCAA1FA4DC2224EB94 /* Pods-RealmDAO.release.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; CC7411CA2374116F0032D352 = { isa = PBXGroup; children = ( @@ -93,6 +101,7 @@ CC7411E5237412650032D352 /* CoreDataDAO */, CC7411D72374124D0032D352 /* Products */, CC7411FD237412E30032D352 /* Frameworks */, + 9BBD4E66B9CEA0C2F7995438 /* Pods */, ); sourceTree = ""; }; @@ -127,6 +136,8 @@ isa = PBXGroup; children = ( CC74123923741CB20032D352 /* RealmSwift.framework */, + 2E8A9BAF7ECAEC811F5ACE3C /* Pods_CoreDataDAO.framework */, + 3CA293F66C575881DDE04B1E /* Pods_RealmDAO.framework */, ); name = Frameworks; sourceTree = ""; @@ -255,11 +266,11 @@ isa = PBXNativeTarget; buildConfigurationList = CC7411DE2374124D0032D352 /* Build configuration list for PBXNativeTarget "RealmDAO" */; buildPhases = ( + 17FFAD6DEDF561AB3CECEB03 /* [CP] Check Pods Manifest.lock */, CC7411D12374124D0032D352 /* Headers */, CC7411D22374124D0032D352 /* Sources */, CC7411D32374124D0032D352 /* Frameworks */, CC7411D42374124D0032D352 /* Resources */, - CC741202237412E30032D352 /* Embed Frameworks */, ); buildRules = ( ); @@ -274,6 +285,7 @@ isa = PBXNativeTarget; buildConfigurationList = CC7411E9237412650032D352 /* Build configuration list for PBXNativeTarget "CoreDataDAO" */; buildPhases = ( + FEB9F6DAC170B0F648B677DE /* [CP] Check Pods Manifest.lock */, CC7411DF237412650032D352 /* Headers */, CC7411E0237412650032D352 /* Sources */, CC7411E1237412650032D352 /* Frameworks */, @@ -341,6 +353,53 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + 17FFAD6DEDF561AB3CECEB03 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RealmDAO-checkManifestLockResult.txt", + ); + 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"; + showEnvVarsInLog = 0; + }; + FEB9F6DAC170B0F648B677DE /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-CoreDataDAO-checkManifestLockResult.txt", + ); + 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"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ CC7411D22374124D0032D352 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -385,6 +444,7 @@ }; CC7411DC2374124D0032D352 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 50E6127A1CFFD5C64BD5C4C0 /* Pods-RealmDAO.debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -470,6 +530,7 @@ }; CC7411DD2374124D0032D352 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = BB6593BCAA1FA4DC2224EB94 /* Pods-RealmDAO.release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -549,6 +610,7 @@ }; CC7411EA237412650032D352 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = B2C2591874CB39D025BA9678 /* Pods-CoreDataDAO.debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -630,6 +692,7 @@ }; CC7411EB237412650032D352 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 5EEB202F6918AB3DB4D5F157 /* Pods-CoreDataDAO.release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; diff --git a/DAO.xcworkspace/contents.xcworkspacedata b/DAO.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..a5db114 --- /dev/null +++ b/DAO.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/DAO.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/DAO.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/DAO.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/DAO/Classes/RealmDAO/Model/RLMEntry.swift b/DAO/Classes/RealmDAO/Model/RLMEntry.swift index 5f44a09..7b8e098 100644 --- a/DAO/Classes/RealmDAO/Model/RLMEntry.swift +++ b/DAO/Classes/RealmDAO/Model/RLMEntry.swift @@ -9,7 +9,6 @@ import Foundation import RealmSwift -import Realm /// Parent class for `Realm` entries. @@ -29,22 +28,12 @@ open class RLMEntry: Object { /// Creates an instance with emppty `entryId`. - public required init() { + public required override init() { self.entryId = "" super.init() } - - /// Creates an instance with specified `value` and `schema`. - /// - /// - Parameters: - /// - value: value. - /// - schema: instance of `RLMSchema`. - required public init(value: Any, schema: RLMSchema) { - fatalError("init(value:schema:) has not been implemented") - } - - - override open class func primaryKey() -> String? { + + open override class func primaryKey() -> String? { return "entryId" } diff --git a/Example/Podfile.lock b/Example/Podfile.lock index b9d205b..0e90176 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,15 +1,15 @@ PODS: - - DAO (1.4.1): - - DAO/CoreData (= 1.4.1) - - DAO/Realm (= 1.4.1) - - DAO/CoreData (1.4.1) - - DAO/Realm (1.4.1): - - RealmSwift (~> 5.3) - - Realm (5.3.3): - - Realm/Headers (= 5.3.3) - - Realm/Headers (5.3.3) - - RealmSwift (5.3.3): - - Realm (= 5.3.3) + - DAO (1.6.0): + - DAO/CoreData (= 1.6.0) + - DAO/Realm (= 1.6.0) + - DAO/CoreData (1.6.0) + - DAO/Realm (1.6.0): + - RealmSwift (~> 10.1) + - Realm (10.1.4): + - Realm/Headers (= 10.1.4) + - Realm/Headers (10.1.4) + - RealmSwift (10.1.4): + - Realm (= 10.1.4) DEPENDENCIES: - DAO (from `../`) @@ -24,10 +24,10 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - DAO: 027d2c1e53cebecf5c41e494a44a057cb373ebe0 - Realm: 2d57ea355bf8ca2a0964d6bfb38d28d7ff2addf6 - RealmSwift: 0a709536ecea30eea1d3c514f6ade2ed078dee3c + DAO: de381bf3ef4af1592f5e9cbb5e157d3bb02b4e73 + Realm: 80f4fb2971ccb9adc27a47d0955ae8e533a7030b + RealmSwift: 0e566ca714edb377bba8ea0811eafcea0b93734e PODFILE CHECKSUM: 304d7b9f54070467c355fe795db431630f017f61 -COCOAPODS: 1.9.3 +COCOAPODS: 1.10.0 diff --git a/Podfile b/Podfile new file mode 100644 index 0000000..bd7447f --- /dev/null +++ b/Podfile @@ -0,0 +1,14 @@ +source "https://cdn.cocoapods.org/" + +platform :ios, '9.0' +inhibit_all_warnings! +use_frameworks! + +target 'CoreDataDAO' do + # nothing +end + +target 'RealmDAO' do + pod "Realm" + pod "RealmSwift" +end diff --git a/Podfile.lock b/Podfile.lock new file mode 100644 index 0000000..7164c81 --- /dev/null +++ b/Podfile.lock @@ -0,0 +1,23 @@ +PODS: + - Realm (10.1.4): + - Realm/Headers (= 10.1.4) + - Realm/Headers (10.1.4) + - RealmSwift (10.1.4): + - Realm (= 10.1.4) + +DEPENDENCIES: + - Realm + - RealmSwift + +SPEC REPOS: + trunk: + - Realm + - RealmSwift + +SPEC CHECKSUMS: + Realm: 80f4fb2971ccb9adc27a47d0955ae8e533a7030b + RealmSwift: 0e566ca714edb377bba8ea0811eafcea0b93734e + +PODFILE CHECKSUM: e04c82ad38fec22650d3fead6f618fe0e4c5a783 + +COCOAPODS: 1.10.0 diff --git a/_Pods.xcodeproj b/_Pods.xcodeproj deleted file mode 120000 index 3c5a8e7..0000000 --- a/_Pods.xcodeproj +++ /dev/null @@ -1 +0,0 @@ -Example/Pods/Pods.xcodeproj \ No newline at end of file