Compare commits
47 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
bb049169f3 | |
|
|
6edea81be4 | |
|
|
37521d7688 | |
|
|
947ad69bb9 | |
|
|
aa4db8ab94 | |
|
|
a5f94a9873 | |
|
|
37ace7bf3a | |
|
|
3145b1514d | |
|
|
89a9890a7b | |
|
|
eeadeb1be4 | |
|
|
e1dbd596e8 | |
|
|
3c5797b83b | |
|
|
a2e7e90589 | |
|
|
7ea3b51102 | |
|
|
d1e9360390 | |
|
|
af6787d98e | |
|
|
a74d933bdc | |
|
|
67edd7f222 | |
|
|
adb0f172ef | |
|
|
91d332a283 | |
|
|
1bb332f9c3 | |
|
|
f5a2ad5667 | |
|
|
f18d9506dd | |
|
|
886245d1ae | |
|
|
e0f35db589 | |
|
|
5d5cb8e2b6 | |
|
|
a9bcdbbfc6 | |
|
|
c381b38ee4 | |
|
|
14244a39cd | |
|
|
e31504a52c | |
|
|
c75d48fd6d | |
|
|
62cef6b3a0 | |
|
|
0a8388d2cb | |
|
|
6e7d8ca7eb | |
|
|
6262085f77 | |
|
|
ebb6e36778 | |
|
|
bf5108fc80 | |
|
|
6bd5391daa | |
|
|
b6dab8d81e | |
|
|
539c0c6265 | |
|
|
e7c762cb15 | |
|
|
1f9b6417f4 | |
|
|
1aea5d6144 | |
|
|
692ed39781 | |
|
|
17dc0a30cd | |
|
|
9bdc7bea15 | |
|
|
381780c8ee |
|
|
@ -0,0 +1 @@
|
||||||
|
github "realm/realm-cocoa" "v10.1.4"
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
Pod::Spec.new do |s|
|
Pod::Spec.new do |s|
|
||||||
s.name = 'DAO'
|
s.name = 'DAO'
|
||||||
s.version = '1.3.4'
|
s.version = '1.6.1'
|
||||||
s.summary = 'DAO Library'
|
s.summary = 'DAO Library'
|
||||||
s.description = 'Library provides easy way to cache entities.'
|
s.description = 'Library provides easy way to cache entities.'
|
||||||
s.homepage = 'https://github.com/RedMadRobot/DAO'
|
s.homepage = 'https://github.com/RedMadRobot/DAO'
|
||||||
|
|
@ -8,12 +8,13 @@ Pod::Spec.new do |s|
|
||||||
s.author = { 'vani2' => 'iv@redmadrobot.com', 'hoppus' => 'e.popov@redmadrobot.com' }
|
s.author = { 'vani2' => 'iv@redmadrobot.com', 'hoppus' => 'e.popov@redmadrobot.com' }
|
||||||
s.source = { :git => 'https://github.com/RedMadRobot/DAO.git', :tag => s.version, :submodules => true }
|
s.source = { :git => 'https://github.com/RedMadRobot/DAO.git', :tag => s.version, :submodules => true }
|
||||||
s.platform = :ios, '9.0'
|
s.platform = :ios, '9.0'
|
||||||
s.swift_version = '4.0'
|
s.swift_version = '5.3'
|
||||||
s.source_files = 'DAO/Classes/Core/**/*'
|
s.source_files = 'DAO/Classes/Core/**/*'
|
||||||
|
|
||||||
s.subspec 'Realm' do |r|
|
s.subspec 'Realm' do |r|
|
||||||
r.source_files = 'DAO/Classes/RealmDAO/**/*', 'DAO/Classes/Core/**/*'
|
r.source_files = 'DAO/Classes/RealmDAO/**/*', 'DAO/Classes/Core/**/*'
|
||||||
r.dependency "RealmSwift"
|
r.dependency "Realm", '~> 10.1'
|
||||||
|
r.dependency "RealmSwift", '~> 10.1'
|
||||||
end
|
end
|
||||||
|
|
||||||
s.subspec 'CoreData' do |cd|
|
s.subspec 'CoreData' do |cd|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,802 @@
|
||||||
|
// !$*UTF8*$!
|
||||||
|
{
|
||||||
|
archiveVersion = 1;
|
||||||
|
classes = {
|
||||||
|
};
|
||||||
|
objectVersion = 50;
|
||||||
|
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 */; };
|
||||||
|
CC741226237414070032D352 /* CascadeDeletionProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC74121E237414070032D352 /* CascadeDeletionProtocol.swift */; };
|
||||||
|
CC741227237414070032D352 /* RLMEntry.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC74121F237414070032D352 /* RLMEntry.swift */; };
|
||||||
|
CC741228237414070032D352 /* Entity.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC741221237414070032D352 /* Entity.swift */; };
|
||||||
|
CC741229237414070032D352 /* DAO.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC741222237414070032D352 /* DAO.swift */; };
|
||||||
|
CC741234237414420032D352 /* Entity.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC74122B237414420032D352 /* Entity.swift */; };
|
||||||
|
CC741235237414420032D352 /* DAO.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC74122C237414420032D352 /* DAO.swift */; };
|
||||||
|
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 */; };
|
||||||
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
|
/* Begin PBXCopyFilesBuildPhase section */
|
||||||
|
CC741207237412EB0032D352 /* Embed Frameworks */ = {
|
||||||
|
isa = PBXCopyFilesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
dstPath = "";
|
||||||
|
dstSubfolderSpec = 10;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
name = "Embed Frameworks";
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* 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 = "<group>"; };
|
||||||
|
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 = "<group>"; };
|
||||||
|
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 = "<group>"; };
|
||||||
|
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 = "<group>"; };
|
||||||
|
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 = "<group>"; };
|
||||||
|
CC74121A237414070032D352 /* RealmDAO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RealmDAO.swift; sourceTree = "<group>"; };
|
||||||
|
CC74121C237414070032D352 /* RealmTranslator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RealmTranslator.swift; sourceTree = "<group>"; };
|
||||||
|
CC74121E237414070032D352 /* CascadeDeletionProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CascadeDeletionProtocol.swift; sourceTree = "<group>"; };
|
||||||
|
CC74121F237414070032D352 /* RLMEntry.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RLMEntry.swift; sourceTree = "<group>"; };
|
||||||
|
CC741221237414070032D352 /* Entity.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Entity.swift; sourceTree = "<group>"; };
|
||||||
|
CC741222237414070032D352 /* DAO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DAO.swift; sourceTree = "<group>"; };
|
||||||
|
CC74122B237414420032D352 /* Entity.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Entity.swift; sourceTree = "<group>"; };
|
||||||
|
CC74122C237414420032D352 /* DAO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DAO.swift; sourceTree = "<group>"; };
|
||||||
|
CC74122F237414420032D352 /* CoreDataConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CoreDataConfiguration.swift; sourceTree = "<group>"; };
|
||||||
|
CC741231237414420032D352 /* CoreDataDAO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CoreDataDAO.swift; sourceTree = "<group>"; };
|
||||||
|
CC741233237414420032D352 /* CoreDataTranslator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CoreDataTranslator.swift; sourceTree = "<group>"; };
|
||||||
|
CC74123923741CB20032D352 /* RealmSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = RealmSwift.framework; path = Carthage/Build/iOS/RealmSwift.framework; sourceTree = "<group>"; };
|
||||||
|
CCF3733D2375451600536DE9 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = "DAO/Supporting Files/Info.plist"; sourceTree = "<group>"; };
|
||||||
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
|
CC7411D32374124D0032D352 /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
A5A85A8625ADBD73B3EEA43F /* Pods_RealmDAO.framework in Frameworks */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
CC7411E1237412650032D352 /* Frameworks */ = {
|
||||||
|
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 = "<group>";
|
||||||
|
};
|
||||||
|
CC7411CA2374116F0032D352 = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
CCF3733D2375451600536DE9 /* Info.plist */,
|
||||||
|
CC7411D82374124D0032D352 /* RealmDAO */,
|
||||||
|
CC7411E5237412650032D352 /* CoreDataDAO */,
|
||||||
|
CC7411D72374124D0032D352 /* Products */,
|
||||||
|
CC7411FD237412E30032D352 /* Frameworks */,
|
||||||
|
9BBD4E66B9CEA0C2F7995438 /* Pods */,
|
||||||
|
);
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
CC7411D72374124D0032D352 /* Products */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
CC7411D62374124D0032D352 /* RealmDAO.framework */,
|
||||||
|
CC7411E4237412650032D352 /* CoreDataDAO.framework */,
|
||||||
|
);
|
||||||
|
name = Products;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
CC7411D82374124D0032D352 /* RealmDAO */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
CC741220237414070032D352 /* Core */,
|
||||||
|
CC741216237414070032D352 /* RealmDAO */,
|
||||||
|
);
|
||||||
|
name = RealmDAO;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
CC7411E5237412650032D352 /* CoreDataDAO */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
CC74122A237414420032D352 /* Core */,
|
||||||
|
CC74122D237414420032D352 /* CoreDataDAO */,
|
||||||
|
);
|
||||||
|
name = CoreDataDAO;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
CC7411FD237412E30032D352 /* Frameworks */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
CC74123923741CB20032D352 /* RealmSwift.framework */,
|
||||||
|
2E8A9BAF7ECAEC811F5ACE3C /* Pods_CoreDataDAO.framework */,
|
||||||
|
3CA293F66C575881DDE04B1E /* Pods_RealmDAO.framework */,
|
||||||
|
);
|
||||||
|
name = Frameworks;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
CC741216237414070032D352 /* RealmDAO */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
CC741217237414070032D352 /* Configuration */,
|
||||||
|
CC741219237414070032D352 /* DAO */,
|
||||||
|
CC74121B237414070032D352 /* Translator */,
|
||||||
|
CC74121D237414070032D352 /* Model */,
|
||||||
|
);
|
||||||
|
name = RealmDAO;
|
||||||
|
path = DAO/Classes/RealmDAO;
|
||||||
|
sourceTree = SOURCE_ROOT;
|
||||||
|
};
|
||||||
|
CC741217237414070032D352 /* Configuration */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
CC741218237414070032D352 /* RealmConfiguration.swift */,
|
||||||
|
);
|
||||||
|
path = Configuration;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
CC741219237414070032D352 /* DAO */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
CC74121A237414070032D352 /* RealmDAO.swift */,
|
||||||
|
);
|
||||||
|
path = DAO;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
CC74121B237414070032D352 /* Translator */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
CC74121C237414070032D352 /* RealmTranslator.swift */,
|
||||||
|
);
|
||||||
|
path = Translator;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
CC74121D237414070032D352 /* Model */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
CC74121E237414070032D352 /* CascadeDeletionProtocol.swift */,
|
||||||
|
CC74121F237414070032D352 /* RLMEntry.swift */,
|
||||||
|
);
|
||||||
|
path = Model;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
CC741220237414070032D352 /* Core */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
CC741221237414070032D352 /* Entity.swift */,
|
||||||
|
CC741222237414070032D352 /* DAO.swift */,
|
||||||
|
);
|
||||||
|
name = Core;
|
||||||
|
path = DAO/Classes/Core;
|
||||||
|
sourceTree = SOURCE_ROOT;
|
||||||
|
};
|
||||||
|
CC74122A237414420032D352 /* Core */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
CC74122B237414420032D352 /* Entity.swift */,
|
||||||
|
CC74122C237414420032D352 /* DAO.swift */,
|
||||||
|
);
|
||||||
|
name = Core;
|
||||||
|
path = DAO/Classes/Core;
|
||||||
|
sourceTree = SOURCE_ROOT;
|
||||||
|
};
|
||||||
|
CC74122D237414420032D352 /* CoreDataDAO */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
CC74122E237414420032D352 /* Configuration */,
|
||||||
|
CC741230237414420032D352 /* DAO */,
|
||||||
|
CC741232237414420032D352 /* Translator */,
|
||||||
|
);
|
||||||
|
name = CoreDataDAO;
|
||||||
|
path = DAO/Classes/CoreDataDAO;
|
||||||
|
sourceTree = SOURCE_ROOT;
|
||||||
|
};
|
||||||
|
CC74122E237414420032D352 /* Configuration */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
CC74122F237414420032D352 /* CoreDataConfiguration.swift */,
|
||||||
|
);
|
||||||
|
path = Configuration;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
CC741230237414420032D352 /* DAO */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
CC741231237414420032D352 /* CoreDataDAO.swift */,
|
||||||
|
);
|
||||||
|
path = DAO;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
CC741232237414420032D352 /* Translator */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
CC741233237414420032D352 /* CoreDataTranslator.swift */,
|
||||||
|
);
|
||||||
|
path = Translator;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* End PBXGroup section */
|
||||||
|
|
||||||
|
/* Begin PBXHeadersBuildPhase section */
|
||||||
|
CC7411D12374124D0032D352 /* Headers */ = {
|
||||||
|
isa = PBXHeadersBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
CC7411DF237412650032D352 /* Headers */ = {
|
||||||
|
isa = PBXHeadersBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXHeadersBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXNativeTarget section */
|
||||||
|
CC7411D52374124D0032D352 /* RealmDAO */ = {
|
||||||
|
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 */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
);
|
||||||
|
name = RealmDAO;
|
||||||
|
productName = RealmDAO;
|
||||||
|
productReference = CC7411D62374124D0032D352 /* RealmDAO.framework */;
|
||||||
|
productType = "com.apple.product-type.framework";
|
||||||
|
};
|
||||||
|
CC7411E3237412650032D352 /* CoreDataDAO */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = CC7411E9237412650032D352 /* Build configuration list for PBXNativeTarget "CoreDataDAO" */;
|
||||||
|
buildPhases = (
|
||||||
|
FEB9F6DAC170B0F648B677DE /* [CP] Check Pods Manifest.lock */,
|
||||||
|
CC7411DF237412650032D352 /* Headers */,
|
||||||
|
CC7411E0237412650032D352 /* Sources */,
|
||||||
|
CC7411E1237412650032D352 /* Frameworks */,
|
||||||
|
CC7411E2237412650032D352 /* Resources */,
|
||||||
|
CC741207237412EB0032D352 /* Embed Frameworks */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
);
|
||||||
|
name = CoreDataDAO;
|
||||||
|
productName = CoreDataDAO;
|
||||||
|
productReference = CC7411E4237412650032D352 /* CoreDataDAO.framework */;
|
||||||
|
productType = "com.apple.product-type.framework";
|
||||||
|
};
|
||||||
|
/* End PBXNativeTarget section */
|
||||||
|
|
||||||
|
/* Begin PBXProject section */
|
||||||
|
CC7411CB2374116F0032D352 /* Project object */ = {
|
||||||
|
isa = PBXProject;
|
||||||
|
attributes = {
|
||||||
|
LastUpgradeCheck = 1120;
|
||||||
|
TargetAttributes = {
|
||||||
|
CC7411D52374124D0032D352 = {
|
||||||
|
CreatedOnToolsVersion = 11.2;
|
||||||
|
};
|
||||||
|
CC7411E3237412650032D352 = {
|
||||||
|
CreatedOnToolsVersion = 11.2;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
buildConfigurationList = CC7411CE2374116F0032D352 /* Build configuration list for PBXProject "DAO" */;
|
||||||
|
compatibilityVersion = "Xcode 9.3";
|
||||||
|
developmentRegion = en;
|
||||||
|
hasScannedForEncodings = 0;
|
||||||
|
knownRegions = (
|
||||||
|
en,
|
||||||
|
Base,
|
||||||
|
);
|
||||||
|
mainGroup = CC7411CA2374116F0032D352;
|
||||||
|
productRefGroup = CC7411D72374124D0032D352 /* Products */;
|
||||||
|
projectDirPath = "";
|
||||||
|
projectRoot = "";
|
||||||
|
targets = (
|
||||||
|
CC7411D52374124D0032D352 /* RealmDAO */,
|
||||||
|
CC7411E3237412650032D352 /* CoreDataDAO */,
|
||||||
|
);
|
||||||
|
};
|
||||||
|
/* End PBXProject section */
|
||||||
|
|
||||||
|
/* Begin PBXResourcesBuildPhase section */
|
||||||
|
CC7411D42374124D0032D352 /* Resources */ = {
|
||||||
|
isa = PBXResourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
CC7411E2237412650032D352 /* Resources */ = {
|
||||||
|
isa = PBXResourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* 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;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
CC741229237414070032D352 /* DAO.swift in Sources */,
|
||||||
|
CC741225237414070032D352 /* RealmTranslator.swift in Sources */,
|
||||||
|
CC741224237414070032D352 /* RealmDAO.swift in Sources */,
|
||||||
|
CC741228237414070032D352 /* Entity.swift in Sources */,
|
||||||
|
CC741226237414070032D352 /* CascadeDeletionProtocol.swift in Sources */,
|
||||||
|
CC741227237414070032D352 /* RLMEntry.swift in Sources */,
|
||||||
|
CC741223237414070032D352 /* RealmConfiguration.swift in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
CC7411E0237412650032D352 /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
CC741236237414420032D352 /* CoreDataConfiguration.swift in Sources */,
|
||||||
|
CC741235237414420032D352 /* DAO.swift in Sources */,
|
||||||
|
CC741234237414420032D352 /* Entity.swift in Sources */,
|
||||||
|
CC741238237414420032D352 /* CoreDataTranslator.swift in Sources */,
|
||||||
|
CC741237237414420032D352 /* CoreDataDAO.swift in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXSourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin XCBuildConfiguration section */
|
||||||
|
CC7411CF2374116F0032D352 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
CC7411D02374116F0032D352 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
CC7411DC2374124D0032D352 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 50E6127A1CFFD5C64BD5C4C0 /* Pods-RealmDAO.debug.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
|
DEFINES_MODULE = YES;
|
||||||
|
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||||
|
DYLIB_CURRENT_VERSION = 1;
|
||||||
|
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
ENABLE_TESTABILITY = YES;
|
||||||
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"$(PROJECT_DIR)/Carthage/Build/iOS",
|
||||||
|
);
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
|
"DEBUG=1",
|
||||||
|
"$(inherited)",
|
||||||
|
);
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
INFOPLIST_FILE = "$(SRCROOT)/DAO/Supporting Files/Info.plist";
|
||||||
|
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
"@loader_path/Frameworks",
|
||||||
|
);
|
||||||
|
MARKETING_VERSION = 1.5.0;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||||
|
MTL_FAST_MATH = YES;
|
||||||
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = ru.redmadrobot.RealmDAO;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
SKIP_INSTALL = YES;
|
||||||
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
|
VERSION_INFO_PREFIX = "";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
CC7411DD2374124D0032D352 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = BB6593BCAA1FA4DC2224EB94 /* Pods-RealmDAO.release.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
|
DEFINES_MODULE = YES;
|
||||||
|
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||||
|
DYLIB_CURRENT_VERSION = 1;
|
||||||
|
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||||
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"$(PROJECT_DIR)/Carthage/Build/iOS",
|
||||||
|
);
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
INFOPLIST_FILE = "$(SRCROOT)/DAO/Supporting Files/Info.plist";
|
||||||
|
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
"@loader_path/Frameworks",
|
||||||
|
);
|
||||||
|
MARKETING_VERSION = 1.5.0;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
|
MTL_FAST_MATH = YES;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = ru.redmadrobot.RealmDAO;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
SKIP_INSTALL = YES;
|
||||||
|
SWIFT_COMPILATION_MODE = wholemodule;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
VALIDATE_PRODUCT = YES;
|
||||||
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
|
VERSION_INFO_PREFIX = "";
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
CC7411EA237412650032D352 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = B2C2591874CB39D025BA9678 /* Pods-CoreDataDAO.debug.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
|
DEFINES_MODULE = YES;
|
||||||
|
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||||
|
DYLIB_CURRENT_VERSION = 1;
|
||||||
|
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
ENABLE_TESTABILITY = YES;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
|
"DEBUG=1",
|
||||||
|
"$(inherited)",
|
||||||
|
);
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
INFOPLIST_FILE = "$(SRCROOT)/DAO/Supporting Files/Info.plist";
|
||||||
|
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
"@loader_path/Frameworks",
|
||||||
|
);
|
||||||
|
MARKETING_VERSION = 1.5.0;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||||
|
MTL_FAST_MATH = YES;
|
||||||
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = ru.redmadrobot.CoreDataDAO;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
SKIP_INSTALL = YES;
|
||||||
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
|
VERSION_INFO_PREFIX = "";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
CC7411EB237412650032D352 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 5EEB202F6918AB3DB4D5F157 /* Pods-CoreDataDAO.release.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
|
DEFINES_MODULE = YES;
|
||||||
|
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||||
|
DYLIB_CURRENT_VERSION = 1;
|
||||||
|
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||||
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
INFOPLIST_FILE = "$(SRCROOT)/DAO/Supporting Files/Info.plist";
|
||||||
|
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
"@loader_path/Frameworks",
|
||||||
|
);
|
||||||
|
MARKETING_VERSION = 1.5.0;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
|
MTL_FAST_MATH = YES;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = ru.redmadrobot.CoreDataDAO;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
SKIP_INSTALL = YES;
|
||||||
|
SWIFT_COMPILATION_MODE = wholemodule;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
VALIDATE_PRODUCT = YES;
|
||||||
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
|
VERSION_INFO_PREFIX = "";
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
/* End XCBuildConfiguration section */
|
||||||
|
|
||||||
|
/* Begin XCConfigurationList section */
|
||||||
|
CC7411CE2374116F0032D352 /* Build configuration list for PBXProject "DAO" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
CC7411CF2374116F0032D352 /* Debug */,
|
||||||
|
CC7411D02374116F0032D352 /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
CC7411DE2374124D0032D352 /* Build configuration list for PBXNativeTarget "RealmDAO" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
CC7411DC2374124D0032D352 /* Debug */,
|
||||||
|
CC7411DD2374124D0032D352 /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
CC7411E9237412650032D352 /* Build configuration list for PBXNativeTarget "CoreDataDAO" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
CC7411EA237412650032D352 /* Debug */,
|
||||||
|
CC7411EB237412650032D352 /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
/* End XCConfigurationList section */
|
||||||
|
};
|
||||||
|
rootObject = CC7411CB2374116F0032D352 /* Project object */;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Workspace
|
||||||
|
version = "1.0">
|
||||||
|
<FileRef
|
||||||
|
location = "self:DAO.xcodeproj">
|
||||||
|
</FileRef>
|
||||||
|
</Workspace>
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>IDEDidComputeMac32BitWarning</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
|
@ -0,0 +1,67 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "1120"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "CC7411E3237412650032D352"
|
||||||
|
BuildableName = "CoreDataDAO.framework"
|
||||||
|
BlueprintName = "CoreDataDAO"
|
||||||
|
ReferencedContainer = "container:DAO.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||||
|
<Testables>
|
||||||
|
</Testables>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
debugServiceExtension = "internal"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "CC7411E3237412650032D352"
|
||||||
|
BuildableName = "CoreDataDAO.framework"
|
||||||
|
BlueprintName = "CoreDataDAO"
|
||||||
|
ReferencedContainer = "container:DAO.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
||||||
|
|
@ -0,0 +1,67 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "1120"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "CC7411D52374124D0032D352"
|
||||||
|
BuildableName = "RealmDAO.framework"
|
||||||
|
BlueprintName = "RealmDAO"
|
||||||
|
ReferencedContainer = "container:DAO.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||||
|
<Testables>
|
||||||
|
</Testables>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
debugServiceExtension = "internal"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "CC7411D52374124D0032D352"
|
||||||
|
BuildableName = "RealmDAO.framework"
|
||||||
|
BlueprintName = "RealmDAO"
|
||||||
|
ReferencedContainer = "container:DAO.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Workspace
|
||||||
|
version = "1.0">
|
||||||
|
<FileRef
|
||||||
|
location = "group:DAO.xcodeproj">
|
||||||
|
</FileRef>
|
||||||
|
<FileRef
|
||||||
|
location = "group:Pods/Pods.xcodeproj">
|
||||||
|
</FileRef>
|
||||||
|
</Workspace>
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>IDEDidComputeMac32BitWarning</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
|
@ -14,18 +14,18 @@ import Foundation
|
||||||
open class Entity: Hashable {
|
open class Entity: Hashable {
|
||||||
|
|
||||||
/// Hash value for compare entities.
|
/// Hash value for compare entities.
|
||||||
open var hashValue: Int {
|
open func hash(into hasher: inout Hasher) {
|
||||||
get {
|
hasher.combine(entityId)
|
||||||
return self.entityId.hashValue
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Unique entity identifer.
|
/// Unique entity identifer.
|
||||||
open var entityId: String = ""
|
open var entityId: String
|
||||||
|
|
||||||
|
|
||||||
required public init() {}
|
required public init() {
|
||||||
|
entityId = UUID().uuidString
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Creates an instance with identifier.
|
/// Creates an instance with identifier.
|
||||||
|
|
@ -36,7 +36,7 @@ open class Entity: Hashable {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Function to redefine it in children for proper equality.
|
/// Redefine this function in child class for proper equality.
|
||||||
///
|
///
|
||||||
/// - Parameter other: entity compare with.
|
/// - Parameter other: entity compare with.
|
||||||
/// - Returns: result of comparison.
|
/// - Returns: result of comparison.
|
||||||
|
|
|
||||||
|
|
@ -10,12 +10,12 @@ import CoreData
|
||||||
|
|
||||||
|
|
||||||
/// `DAO` pattern implementation for `CoreData`.
|
/// `DAO` pattern implementation for `CoreData`.
|
||||||
open class CoreDataDAO<CDModel: NSManagedObject, Model: Entity> : DAO<Model> {
|
open class CoreDataDAO<Model: Entity, CDModel: NSManagedObject> : DAO<Model> {
|
||||||
|
|
||||||
// MARK: - Private
|
// MARK: - Private
|
||||||
|
|
||||||
/// Translator for current `CDModel` and `Model` types.
|
/// Translator for current `Model` and `CDModel` types.
|
||||||
private var translator: CoreDataTranslator<CDModel, Model>
|
private var translator: CoreDataTranslator<Model, CDModel>
|
||||||
|
|
||||||
|
|
||||||
/// Persistent store cooridnator. Can be configured by `CoreDataConfiguration`.
|
/// Persistent store cooridnator. Can be configured by `CoreDataConfiguration`.
|
||||||
|
|
@ -43,11 +43,11 @@ open class CoreDataDAO<CDModel: NSManagedObject, Model: Entity> : DAO<Model> {
|
||||||
/// Creates an instance with specified `translator` and `configuration`.
|
/// Creates an instance with specified `translator` and `configuration`.
|
||||||
///
|
///
|
||||||
/// - Parameters:
|
/// - Parameters:
|
||||||
/// - translator: translator for current `CDModel` and `Model` types.
|
/// - translator: translator for current `Model` and `CDModel` types.
|
||||||
/// - configuration: configuration. See also `CoreDataConfiguration`.
|
/// - configuration: configuration. See also `CoreDataConfiguration`.
|
||||||
/// - Throws: error if loading or adding persistence store is failed.
|
/// - Throws: error if loading or adding persistence store is failed.
|
||||||
public convenience init(
|
public convenience init(
|
||||||
_ translator: CoreDataTranslator<CDModel, Model>,
|
_ translator: CoreDataTranslator<Model, CDModel>,
|
||||||
configuration: CoreDataConfiguration) throws {
|
configuration: CoreDataConfiguration) throws {
|
||||||
|
|
||||||
if #available(iOS 10, *) {
|
if #available(iOS 10, *) {
|
||||||
|
|
@ -101,11 +101,11 @@ open class CoreDataDAO<CDModel: NSManagedObject, Model: Entity> : DAO<Model> {
|
||||||
/// Creates an instance with specified `translator` and `persistentContainer`.
|
/// Creates an instance with specified `translator` and `persistentContainer`.
|
||||||
///
|
///
|
||||||
/// - Parameters:
|
/// - Parameters:
|
||||||
/// - translator: translator for current `CDModel` and `Model` types.
|
/// - translator: translator for current `Model` and `CDModel` types.
|
||||||
/// - persistentContainer: initialized NSPersistentContainer with loaded persistent stores
|
/// - persistentContainer: initialized NSPersistentContainer with loaded persistent stores
|
||||||
@available(iOS 10.0, *)
|
@available(iOS 10.0, *)
|
||||||
public convenience init(
|
public convenience init(
|
||||||
_ translator: CoreDataTranslator<CDModel, Model>,
|
_ translator: CoreDataTranslator<Model, CDModel>,
|
||||||
persistentContainer: NSPersistentContainer) {
|
persistentContainer: NSPersistentContainer) {
|
||||||
|
|
||||||
self.init(
|
self.init(
|
||||||
|
|
@ -117,10 +117,10 @@ open class CoreDataDAO<CDModel: NSManagedObject, Model: Entity> : DAO<Model> {
|
||||||
/// Creates an instance with specified `translator` and `persistentStoreCoordinator`.
|
/// Creates an instance with specified `translator` and `persistentStoreCoordinator`.
|
||||||
///
|
///
|
||||||
/// - Parameters:
|
/// - Parameters:
|
||||||
/// - translator: translator for current `CDModel` and `Model` types.
|
/// - translator: translator for current `Model` and `CDModel` types.
|
||||||
/// - persistentStoreCoordinator: initialized NSPersistentStoreCoordinator with loaded persistent stores
|
/// - persistentStoreCoordinator: initialized NSPersistentStoreCoordinator with loaded persistent stores
|
||||||
public init(
|
public init(
|
||||||
_ translator: CoreDataTranslator<CDModel, Model>,
|
_ translator: CoreDataTranslator<Model, CDModel>,
|
||||||
persistentStoreCoordinator: NSPersistentStoreCoordinator) {
|
persistentStoreCoordinator: NSPersistentStoreCoordinator) {
|
||||||
|
|
||||||
self.translator = translator
|
self.translator = translator
|
||||||
|
|
@ -351,7 +351,7 @@ open class CoreDataDAO<CDModel: NSManagedObject, Model: Entity> : DAO<Model> {
|
||||||
inContext context: NSManagedObjectContext) -> Bool {
|
inContext context: NSManagedObjectContext) -> Bool {
|
||||||
|
|
||||||
let existingEntries = fetchEntries(entryId, inContext: context)
|
let existingEntries = fetchEntries(entryId, inContext: context)
|
||||||
return existingEntries.count > 0
|
return !existingEntries.isEmpty
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import CoreData
|
||||||
|
|
||||||
/// Parent class for `CoreData` translators.
|
/// Parent class for `CoreData` translators.
|
||||||
/// Translators fill properties of new/existant entities from entries and other way.
|
/// Translators fill properties of new/existant entities from entries and other way.
|
||||||
open class CoreDataTranslator<CDModel: NSManagedObject, Model: Entity> {
|
open class CoreDataTranslator<Model: Entity, CDModel: NSManagedObject> {
|
||||||
|
|
||||||
/// Helper property for `CoreDataDAO`.
|
/// Helper property for `CoreDataDAO`.
|
||||||
open var entryClassName: String {
|
open var entryClassName: String {
|
||||||
|
|
@ -59,7 +59,7 @@ open class CoreDataTranslator<CDModel: NSManagedObject, Model: Entity> {
|
||||||
in context: NSManagedObjectContext) {
|
in context: NSManagedObjectContext) {
|
||||||
|
|
||||||
fromEntities
|
fromEntities
|
||||||
.flatMap { entity -> (CDModel, Model)? in
|
.compactMap { entity -> (CDModel, Model)? in
|
||||||
if let entry = NSEntityDescription.insertNewObject(
|
if let entry = NSEntityDescription.insertNewObject(
|
||||||
forEntityName: self.entryClassName,
|
forEntityName: self.entryClassName,
|
||||||
into: context) as? CDModel {
|
into: context) as? CDModel {
|
||||||
|
|
@ -78,7 +78,7 @@ open class CoreDataTranslator<CDModel: NSManagedObject, Model: Entity> {
|
||||||
/// All properties of entries will be overridden by entities properties.
|
/// All properties of entries will be overridden by entities properties.
|
||||||
///
|
///
|
||||||
/// - Parameters:
|
/// - Parameters:
|
||||||
/// - entities: array of instances of `CDModel` type.
|
/// - entities: array of instances of `Model` type.
|
||||||
/// - fromEntries: array of instances of `CDModel` type.
|
/// - fromEntries: array of instances of `CDModel` type.
|
||||||
open func fill(_ entities: inout [Model], fromEntries: Set<CDModel>?) {
|
open func fill(_ entities: inout [Model], fromEntries: Set<CDModel>?) {
|
||||||
entities.removeAll()
|
entities.removeAll()
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,9 @@ public struct RealmConfiguration {
|
||||||
/// Version of database.
|
/// Version of database.
|
||||||
public let databaseVersion: UInt64
|
public let databaseVersion: UInt64
|
||||||
|
|
||||||
|
/// URL of database.
|
||||||
|
public let databaseURL: URL?
|
||||||
|
|
||||||
/// Migration block for manual migration.
|
/// Migration block for manual migration.
|
||||||
public let migrationBlock: MigrationBlock?
|
public let migrationBlock: MigrationBlock?
|
||||||
|
|
||||||
|
|
@ -35,21 +38,24 @@ public struct RealmConfiguration {
|
||||||
public let shouldCompactOnLaunch: ((Int, Int) -> Bool)?
|
public let shouldCompactOnLaunch: ((Int, Int) -> Bool)?
|
||||||
|
|
||||||
|
|
||||||
/// Create an instance with specified `databaseFileName`, `databaseVersion`, `migrationBlock`.
|
/// Create an instance with specified `databaseFileName`, `dataBaseURL`, `databaseVersion`, `migrationBlock`.
|
||||||
///
|
///
|
||||||
/// - Parameters:
|
/// - Parameters:
|
||||||
/// - databaseFileName: name. See above.
|
/// - databaseFileName: name. See above.
|
||||||
|
/// - databaseURL: url. See above.
|
||||||
/// - databaseVersion: version. See above.
|
/// - databaseVersion: version. See above.
|
||||||
/// - migrationBlock: migration block. See above.
|
/// - migrationBlock: migration block. See above.
|
||||||
/// - encryptionKey: encryption key. See above.
|
/// - encryptionKey: encryption key. See above.
|
||||||
public init(
|
public init(
|
||||||
databaseFileName: String = "Database.realm",
|
databaseFileName: String = "Database.realm",
|
||||||
|
databaseURL: URL? = nil,
|
||||||
databaseVersion: UInt64 = 1,
|
databaseVersion: UInt64 = 1,
|
||||||
migrationBlock: MigrationBlock? = nil,
|
migrationBlock: MigrationBlock? = nil,
|
||||||
encryptionKey: Data? = nil,
|
encryptionKey: Data? = nil,
|
||||||
shouldCompactOnLaunch: ((Int, Int) -> Bool)? = nil) {
|
shouldCompactOnLaunch: ((Int, Int) -> Bool)? = nil) {
|
||||||
|
|
||||||
self.databaseFileName = databaseFileName
|
self.databaseFileName = databaseFileName
|
||||||
|
self.databaseURL = databaseURL
|
||||||
self.databaseVersion = databaseVersion
|
self.databaseVersion = databaseVersion
|
||||||
self.migrationBlock = migrationBlock
|
self.migrationBlock = migrationBlock
|
||||||
self.encryptionKey = encryptionKey
|
self.encryptionKey = encryptionKey
|
||||||
|
|
|
||||||
|
|
@ -19,10 +19,25 @@ open class RealmDAO<Model: Entity, RealmModel: RLMEntry>: DAO<Model> {
|
||||||
/// Translator for current `RLMEntry` and `RealmModel` types.
|
/// Translator for current `RLMEntry` and `RealmModel` types.
|
||||||
private let translator: RealmTranslator<Model, RealmModel>
|
private let translator: RealmTranslator<Model, RealmModel>
|
||||||
private let configuration: Realm.Configuration
|
private let configuration: Realm.Configuration
|
||||||
|
/// In-memory Realm instance.
|
||||||
|
private var inMemoryRealm: Realm?
|
||||||
|
|
||||||
// MARK: - Public
|
// MARK: - Public
|
||||||
|
|
||||||
|
/// Creates an instance with specified `translator` and `configuration`.
|
||||||
|
///
|
||||||
|
/// - Parameters:
|
||||||
|
/// - translator: translator for current `Model` and `RealmModel` types.
|
||||||
|
/// - configuration: configuration. See also `Realm.Configuration`.
|
||||||
|
public init(
|
||||||
|
_ translator: RealmTranslator<Model, RealmModel>,
|
||||||
|
configuration: Realm.Configuration) {
|
||||||
|
|
||||||
|
self.translator = translator
|
||||||
|
self.configuration = configuration
|
||||||
|
super.init()
|
||||||
|
}
|
||||||
|
|
||||||
/// Creates an instance with specified `translator` and `configuration`.
|
/// Creates an instance with specified `translator` and `configuration`.
|
||||||
///
|
///
|
||||||
/// - Parameters:
|
/// - Parameters:
|
||||||
|
|
@ -53,7 +68,7 @@ open class RealmDAO<Model: Entity, RealmModel: RLMEntry>: DAO<Model> {
|
||||||
|
|
||||||
var config = Realm.Configuration.defaultConfiguration
|
var config = Realm.Configuration.defaultConfiguration
|
||||||
|
|
||||||
guard let path = self.pathForFileName(configuration.databaseFileName) else {
|
guard let path = configuration.databaseURL ?? self.pathForFileName(configuration.databaseFileName) else {
|
||||||
fatalError("Cant find path for DB with filename: \(configuration.databaseFileName)"
|
fatalError("Cant find path for DB with filename: \(configuration.databaseFileName)"
|
||||||
+ " v.\(configuration.databaseVersion)")
|
+ " v.\(configuration.databaseVersion)")
|
||||||
}
|
}
|
||||||
|
|
@ -82,9 +97,9 @@ open class RealmDAO<Model: Entity, RealmModel: RLMEntry>: DAO<Model> {
|
||||||
//MARK: - DAO
|
//MARK: - DAO
|
||||||
|
|
||||||
override open func persist(_ entity: Model) throws {
|
override open func persist(_ entity: Model) throws {
|
||||||
if let entry = readFromRealm(entity.entityId) {
|
if let entry = try readFromRealm(entity.entityId) {
|
||||||
try autoreleasepool {
|
try autoreleasepool {
|
||||||
realm().beginWrite()
|
try realm().beginWrite()
|
||||||
translator.fill(entry, fromEntity: entity)
|
translator.fill(entry, fromEntity: entity)
|
||||||
try realm().commitWrite()
|
try realm().commitWrite()
|
||||||
}
|
}
|
||||||
|
|
@ -97,26 +112,31 @@ open class RealmDAO<Model: Entity, RealmModel: RLMEntry>: DAO<Model> {
|
||||||
|
|
||||||
|
|
||||||
open override func persist(_ entities: [Model]) throws {
|
open override func persist(_ entities: [Model]) throws {
|
||||||
let entries = List<RealmModel>()
|
|
||||||
entries.append(objectsIn: entities.flatMap { self.readFromRealm($0.entityId) })
|
|
||||||
|
|
||||||
|
let entries = List<RealmModel>()
|
||||||
|
for entity in entities {
|
||||||
|
if let entry = try? readFromRealm(entity.entityId) {
|
||||||
|
entries.append(entry)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let realm = try self.realm()
|
||||||
try autoreleasepool {
|
try autoreleasepool {
|
||||||
realm().beginWrite()
|
realm.beginWrite()
|
||||||
translator.fill(entries, fromEntities: entities)
|
translator.fill(entries, fromEntities: entities)
|
||||||
|
|
||||||
entries.forEach {
|
entries.forEach {
|
||||||
self.realm().create(RealmModel.self, value: $0, update: true)
|
realm.create(RealmModel.self, value: $0, update: .all)
|
||||||
}
|
}
|
||||||
|
|
||||||
try realm().commitWrite()
|
try realm.commitWrite()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
override open func read(_ entityId: String) -> Model? {
|
override open func read(_ entityId: String) -> Model? {
|
||||||
guard let entry = readFromRealm(entityId) else {
|
|
||||||
return nil
|
guard let entry = try? readFromRealm(entityId) else { return nil }
|
||||||
}
|
|
||||||
|
|
||||||
let entity = Model()
|
let entity = Model()
|
||||||
translator.fill(entity, fromEntry: entry)
|
translator.fill(entity, fromEntry: entry)
|
||||||
|
|
@ -126,10 +146,15 @@ open class RealmDAO<Model: Entity, RealmModel: RLMEntry>: DAO<Model> {
|
||||||
|
|
||||||
|
|
||||||
open override func read() -> [Model] {
|
open override func read() -> [Model] {
|
||||||
return readFromRealm().map {
|
do {
|
||||||
let entity = Model()
|
let results = try readFromRealm()
|
||||||
self.translator.fill(entity, fromEntry: $0)
|
return results.map {
|
||||||
return entity
|
let entity = Model()
|
||||||
|
self.translator.fill(entity, fromEntry: $0)
|
||||||
|
return entity
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
return []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -152,7 +177,12 @@ open class RealmDAO<Model: Entity, RealmModel: RLMEntry>: DAO<Model> {
|
||||||
orderedBy field: String?,
|
orderedBy field: String?,
|
||||||
ascending: Bool = true) -> [Model] {
|
ascending: Bool = true) -> [Model] {
|
||||||
|
|
||||||
var entries = readFromRealm(predicate)
|
var entries: Results<RealmModel>
|
||||||
|
do {
|
||||||
|
entries = try readFromRealm(predicate)
|
||||||
|
} catch {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
|
||||||
if let field = field {
|
if let field = field {
|
||||||
entries = entries.sorted(byKeyPath: field, ascending: ascending)
|
entries = entries.sorted(byKeyPath: field, ascending: ascending)
|
||||||
|
|
@ -167,7 +197,7 @@ open class RealmDAO<Model: Entity, RealmModel: RLMEntry>: DAO<Model> {
|
||||||
|
|
||||||
|
|
||||||
override open func erase() throws {
|
override open func erase() throws {
|
||||||
let results = readFromRealm()
|
let results = try readFromRealm()
|
||||||
let entries: List<RealmModel> = List<RealmModel>()
|
let entries: List<RealmModel> = List<RealmModel>()
|
||||||
|
|
||||||
entries.append(objectsIn: results.map {
|
entries.append(objectsIn: results.map {
|
||||||
|
|
@ -179,7 +209,7 @@ open class RealmDAO<Model: Entity, RealmModel: RLMEntry>: DAO<Model> {
|
||||||
|
|
||||||
|
|
||||||
override open func erase(_ entityId: String) throws {
|
override open func erase(_ entityId: String) throws {
|
||||||
guard let entry = readFromRealm(entityId) else {
|
guard let entry = try readFromRealm(entityId) else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try delete(entry)
|
try delete(entry)
|
||||||
|
|
@ -189,28 +219,32 @@ open class RealmDAO<Model: Entity, RealmModel: RLMEntry>: DAO<Model> {
|
||||||
// MARK: - Private
|
// MARK: - Private
|
||||||
|
|
||||||
private func write(_ entry: RealmModel) throws {
|
private func write(_ entry: RealmModel) throws {
|
||||||
try self.realm().write {
|
let realm = try self.realm()
|
||||||
self.realm().create(RealmModel.self, value: entry, update: true)
|
try realm.write {
|
||||||
|
realm.create(RealmModel.self, value: entry, update: .all)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private func write(_ entries: List<RealmModel>) throws {
|
private func write(_ entries: List<RealmModel>) throws {
|
||||||
try self.realm().write {
|
let realm = try self.realm()
|
||||||
|
try realm.write {
|
||||||
entries.forEach { (e: RealmModel) -> () in
|
entries.forEach { (e: RealmModel) -> () in
|
||||||
self.realm().create(RealmModel.self, value: e, update: true)
|
realm.create(RealmModel.self, value: e, update: .all)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private func readFromRealm(_ entryId: String) -> RealmModel? {
|
private func readFromRealm(_ entryId: String) throws -> RealmModel? {
|
||||||
return self.realm().object(ofType: RealmModel.self, forPrimaryKey: entryId)
|
let realm = try self.realm()
|
||||||
|
return realm.object(ofType: RealmModel.self, forPrimaryKey: entryId)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private func readFromRealm(_ predicate: NSPredicate? = nil) -> Results<RealmModel> {
|
private func readFromRealm(_ predicate: NSPredicate? = nil) throws -> Results<RealmModel> {
|
||||||
let results: Results<RealmModel> = self.realm().objects(RealmModel.self)
|
let realm = try self.realm()
|
||||||
|
let results: Results<RealmModel> = realm.objects(RealmModel.self)
|
||||||
guard let predicate = predicate else {
|
guard let predicate = predicate else {
|
||||||
return results
|
return results
|
||||||
}
|
}
|
||||||
|
|
@ -232,27 +266,34 @@ open class RealmDAO<Model: Entity, RealmModel: RLMEntry>: DAO<Model> {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private func cascadeDelete(_ object: AnyObject?) {
|
private func cascadeDelete(_ object: Any?) {
|
||||||
if let deletable = object as? CascadeDeletionProtocol {
|
switch object {
|
||||||
deletable.objectsToDelete.forEach { child in
|
case let listObject as List<RealmModel>:
|
||||||
cascadeDelete(child)
|
for object in listObject {
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if let realmArray = object as? ListBase {
|
|
||||||
for i in 0..<realmArray.count {
|
|
||||||
let object = realmArray._rlmArray[UInt(i)]
|
|
||||||
cascadeDelete(object)
|
cascadeDelete(object)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if let realmObject = object as? Object {
|
case let object as Object:
|
||||||
self.realm().delete(realmObject)
|
if !object.isInvalidated, let deletable = object as? CascadeDeletionProtocol {
|
||||||
|
deletable.objectsToDelete.forEach { child in
|
||||||
|
cascadeDelete(child)
|
||||||
|
}
|
||||||
|
|
||||||
|
try? self.realm().delete(object)
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private func realm() -> Realm {
|
private func realm() throws -> Realm {
|
||||||
return try! Realm(configuration: configuration)
|
let realm = try Realm(configuration: configuration)
|
||||||
|
|
||||||
|
if configuration.inMemoryIdentifier != nil {
|
||||||
|
inMemoryRealm = realm
|
||||||
|
}
|
||||||
|
|
||||||
|
return realm
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import RealmSwift
|
import RealmSwift
|
||||||
import Realm
|
|
||||||
|
|
||||||
|
|
||||||
/// Parent class for `Realm` entries.
|
/// Parent class for `Realm` entries.
|
||||||
|
|
@ -29,34 +28,12 @@ open class RLMEntry: Object {
|
||||||
|
|
||||||
|
|
||||||
/// Creates an instance with emppty `entryId`.
|
/// Creates an instance with emppty `entryId`.
|
||||||
public required init() {
|
public required override init() {
|
||||||
self.entryId = ""
|
self.entryId = ""
|
||||||
super.init()
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
open override class func primaryKey() -> String? {
|
||||||
/// Creates an instance with specified `realm` and `schema`.
|
|
||||||
///
|
|
||||||
/// - Parameters:
|
|
||||||
/// - realm: instance of RLMRealm.
|
|
||||||
/// - schema: instance of RLMObjectSchema.
|
|
||||||
required public init(realm: RLMRealm, schema: RLMObjectSchema) {
|
|
||||||
self.entryId = ""
|
|
||||||
super.init(realm: realm, schema: schema)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// 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? {
|
|
||||||
return "entryId"
|
return "entryId"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,10 +37,7 @@ open class RealmTranslator<Model: Entity, RealmModel: RLMEntry> {
|
||||||
|
|
||||||
fromEntities
|
fromEntities
|
||||||
.map { entity -> (RealmModel, Model) in
|
.map { entity -> (RealmModel, Model) in
|
||||||
|
let entry = entries.first { $0.entryId == entity.entityId }
|
||||||
let entry = entries
|
|
||||||
.filter { $0.entryId == entity.entityId }
|
|
||||||
.first
|
|
||||||
|
|
||||||
if let entry = entry {
|
if let entry = entry {
|
||||||
return (entry, entity)
|
return (entry, entity)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>$(PRODUCT_NAME)</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>$(MARKETING_VERSION)</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
|
@ -14,7 +14,7 @@ import CoreData
|
||||||
|
|
||||||
final class CoreDataDAOEntityTests: XCTestCase {
|
final class CoreDataDAOEntityTests: XCTestCase {
|
||||||
|
|
||||||
private var dao: CoreDataDAO<CDEntity, Entity>!
|
private var dao: CoreDataDAO<Entity, CDEntity>!
|
||||||
|
|
||||||
override func setUp() {
|
override func setUp() {
|
||||||
super.setUp()
|
super.setUp()
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import CoreData
|
||||||
|
|
||||||
final class CoreDataDAOFoldersTests: XCTestCase {
|
final class CoreDataDAOFoldersTests: XCTestCase {
|
||||||
|
|
||||||
private var dao: CoreDataDAO<CDFolder, Folder>!
|
private var dao: CoreDataDAO<Folder, CDFolder>!
|
||||||
|
|
||||||
override func setUp() {
|
override func setUp() {
|
||||||
super.setUp()
|
super.setUp()
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,8 @@ import CoreData
|
||||||
|
|
||||||
final class CoreDataDAOManyDAOTests: XCTestCase {
|
final class CoreDataDAOManyDAOTests: XCTestCase {
|
||||||
|
|
||||||
private var messagesDAO: CoreDataDAO<CDMessage, Message>!
|
private var messagesDAO: CoreDataDAO<Message, CDMessage>!
|
||||||
private var folderDAO: CoreDataDAO<CDFolder, Folder>!
|
private var folderDAO: CoreDataDAO<Folder, CDFolder>!
|
||||||
|
|
||||||
override func setUp() {
|
override func setUp() {
|
||||||
super.setUp()
|
super.setUp()
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import CoreData
|
||||||
|
|
||||||
final class CoreDataDAOMessagesTests: XCTestCase {
|
final class CoreDataDAOMessagesTests: XCTestCase {
|
||||||
|
|
||||||
private var dao: CoreDataDAO<CDMessage, Message>!
|
private var dao: CoreDataDAO<Message, CDMessage>!
|
||||||
|
|
||||||
override func setUp() {
|
override func setUp() {
|
||||||
super.setUp()
|
super.setUp()
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
|
02160229232A36ED0036116E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 02160228232A36ED0036116E /* Assets.xcassets */; };
|
||||||
607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; };
|
607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; };
|
||||||
63EBBC5B24D75059B9ADA532 /* Pods_RealmDAOTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0DCA2A834AEC013372828BE4 /* Pods_RealmDAOTests.framework */; };
|
63EBBC5B24D75059B9ADA532 /* Pods_RealmDAOTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0DCA2A834AEC013372828BE4 /* Pods_RealmDAOTests.framework */; };
|
||||||
78A211B7C1B6D6AF282EBB71 /* Pods_DAO_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A944DFD46BDAF9137BA01D6 /* Pods_DAO_Example.framework */; };
|
78A211B7C1B6D6AF282EBB71 /* Pods_DAO_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A944DFD46BDAF9137BA01D6 /* Pods_DAO_Example.framework */; };
|
||||||
|
|
@ -60,6 +61,7 @@
|
||||||
/* End PBXContainerItemProxy section */
|
/* End PBXContainerItemProxy section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
|
02160228232A36ED0036116E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||||
048D2FC052C450E7600E2FA9 /* Pods-RealmDAOTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RealmDAOTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-RealmDAOTests/Pods-RealmDAOTests.release.xcconfig"; sourceTree = "<group>"; };
|
048D2FC052C450E7600E2FA9 /* Pods-RealmDAOTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RealmDAOTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-RealmDAOTests/Pods-RealmDAOTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
0DCA2A834AEC013372828BE4 /* Pods_RealmDAOTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RealmDAOTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
0DCA2A834AEC013372828BE4 /* Pods_RealmDAOTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RealmDAOTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
1DD31E834DFA3BE6198A94A4 /* Pods-CoreDataDAOTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CoreDataDAOTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-CoreDataDAOTests/Pods-CoreDataDAOTests.release.xcconfig"; sourceTree = "<group>"; };
|
1DD31E834DFA3BE6198A94A4 /* Pods-CoreDataDAOTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CoreDataDAOTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-CoreDataDAOTests/Pods-CoreDataDAOTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
|
@ -70,7 +72,7 @@
|
||||||
607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||||
6B14B1EA7DC79FC4DC1DE526 /* Pods-DAO_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DAO_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-DAO_Example/Pods-DAO_Example.release.xcconfig"; sourceTree = "<group>"; };
|
6B14B1EA7DC79FC4DC1DE526 /* Pods-DAO_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DAO_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-DAO_Example/Pods-DAO_Example.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
6F42144986137E1707B5FAC0 /* Pods_CoreDataDAOTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CoreDataDAOTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
6F42144986137E1707B5FAC0 /* Pods_CoreDataDAOTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CoreDataDAOTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
7AA81098C68FE90BF55455CC /* DAO.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = DAO.podspec; path = ../DAO.podspec; sourceTree = "<group>"; };
|
7AA81098C68FE90BF55455CC /* DAO.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = DAO.podspec; path = ../DAO.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
|
||||||
8FB85F7F7AE5E16EDA09AF5A /* Pods-RealmDAOTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RealmDAOTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RealmDAOTests/Pods-RealmDAOTests.debug.xcconfig"; sourceTree = "<group>"; };
|
8FB85F7F7AE5E16EDA09AF5A /* Pods-RealmDAOTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RealmDAOTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RealmDAOTests/Pods-RealmDAOTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
9096125064B44D5035341130 /* Pods-DAO_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DAO_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-DAO_Example/Pods-DAO_Example.debug.xcconfig"; sourceTree = "<group>"; };
|
9096125064B44D5035341130 /* Pods-DAO_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DAO_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-DAO_Example/Pods-DAO_Example.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
A0C0C1D67BC9E557747CBD93 /* Pods-DAO_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DAO_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-DAO_Tests/Pods-DAO_Tests.debug.xcconfig"; sourceTree = "<group>"; };
|
A0C0C1D67BC9E557747CBD93 /* Pods-DAO_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DAO_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-DAO_Tests/Pods-DAO_Tests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
|
@ -304,6 +306,7 @@
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
AA3525801EEFDC24009C4375 /* Model.xcdatamodeld */,
|
AA3525801EEFDC24009C4375 /* Model.xcdatamodeld */,
|
||||||
|
02160228232A36ED0036116E /* Assets.xcassets */,
|
||||||
);
|
);
|
||||||
path = Resources;
|
path = Resources;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
|
@ -414,24 +417,24 @@
|
||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
LastSwiftUpdateCheck = 0830;
|
LastSwiftUpdateCheck = 0830;
|
||||||
LastUpgradeCheck = 0900;
|
LastUpgradeCheck = 1030;
|
||||||
ORGANIZATIONNAME = CocoaPods;
|
ORGANIZATIONNAME = CocoaPods;
|
||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
607FACCF1AFB9204008FA782 = {
|
607FACCF1AFB9204008FA782 = {
|
||||||
CreatedOnToolsVersion = 6.3.1;
|
CreatedOnToolsVersion = 6.3.1;
|
||||||
LastSwiftMigration = 0900;
|
LastSwiftMigration = 1030;
|
||||||
};
|
};
|
||||||
AA10ECA91EEFE039001228A1 = {
|
AA10ECA91EEFE039001228A1 = {
|
||||||
CreatedOnToolsVersion = 8.3.2;
|
CreatedOnToolsVersion = 8.3.2;
|
||||||
DevelopmentTeam = 42LRQS6X44;
|
DevelopmentTeam = 42LRQS6X44;
|
||||||
LastSwiftMigration = 0830;
|
LastSwiftMigration = 1030;
|
||||||
ProvisioningStyle = Automatic;
|
ProvisioningStyle = Automatic;
|
||||||
TestTargetID = 607FACCF1AFB9204008FA782;
|
TestTargetID = 607FACCF1AFB9204008FA782;
|
||||||
};
|
};
|
||||||
AA3525861EEFDCE6009C4375 = {
|
AA3525861EEFDCE6009C4375 = {
|
||||||
CreatedOnToolsVersion = 8.3.2;
|
CreatedOnToolsVersion = 8.3.2;
|
||||||
DevelopmentTeam = 42LRQS6X44;
|
DevelopmentTeam = 42LRQS6X44;
|
||||||
LastSwiftMigration = 0900;
|
LastSwiftMigration = 1030;
|
||||||
ProvisioningStyle = Automatic;
|
ProvisioningStyle = Automatic;
|
||||||
TestTargetID = 607FACCF1AFB9204008FA782;
|
TestTargetID = 607FACCF1AFB9204008FA782;
|
||||||
};
|
};
|
||||||
|
|
@ -439,7 +442,7 @@
|
||||||
};
|
};
|
||||||
buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "DAO" */;
|
buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "DAO" */;
|
||||||
compatibilityVersion = "Xcode 3.2";
|
compatibilityVersion = "Xcode 3.2";
|
||||||
developmentRegion = English;
|
developmentRegion = en;
|
||||||
hasScannedForEncodings = 0;
|
hasScannedForEncodings = 0;
|
||||||
knownRegions = (
|
knownRegions = (
|
||||||
en,
|
en,
|
||||||
|
|
@ -462,6 +465,7 @@
|
||||||
isa = PBXResourcesBuildPhase;
|
isa = PBXResourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
|
02160229232A36ED0036116E /* Assets.xcassets in Resources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
|
@ -524,7 +528,7 @@
|
||||||
files = (
|
files = (
|
||||||
);
|
);
|
||||||
inputPaths = (
|
inputPaths = (
|
||||||
"${SRCROOT}/Pods/Target Support Files/Pods-DAO_Example/Pods-DAO_Example-frameworks.sh",
|
"${PODS_ROOT}/Target Support Files/Pods-DAO_Example/Pods-DAO_Example-frameworks.sh",
|
||||||
"${BUILT_PRODUCTS_DIR}/DAO/DAO.framework",
|
"${BUILT_PRODUCTS_DIR}/DAO/DAO.framework",
|
||||||
"${BUILT_PRODUCTS_DIR}/Realm/Realm.framework",
|
"${BUILT_PRODUCTS_DIR}/Realm/Realm.framework",
|
||||||
"${BUILT_PRODUCTS_DIR}/RealmSwift/RealmSwift.framework",
|
"${BUILT_PRODUCTS_DIR}/RealmSwift/RealmSwift.framework",
|
||||||
|
|
@ -537,7 +541,7 @@
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-DAO_Example/Pods-DAO_Example-frameworks.sh\"\n";
|
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DAO_Example/Pods-DAO_Example-frameworks.sh\"\n";
|
||||||
showEnvVarsInLog = 0;
|
showEnvVarsInLog = 0;
|
||||||
};
|
};
|
||||||
EC8476E3A4C369B6B36446A1 /* [CP] Check Pods Manifest.lock */ = {
|
EC8476E3A4C369B6B36446A1 /* [CP] Check Pods Manifest.lock */ = {
|
||||||
|
|
@ -632,6 +636,7 @@
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
|
@ -640,12 +645,14 @@
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
CLANG_WARN_COMMA = YES;
|
CLANG_WARN_COMMA = YES;
|
||||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
CLANG_WARN_EMPTY_BODY = YES;
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
CLANG_WARN_INT_CONVERSION = YES;
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
|
@ -685,6 +692,7 @@
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
|
@ -693,12 +701,14 @@
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
CLANG_WARN_COMMA = YES;
|
CLANG_WARN_COMMA = YES;
|
||||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
CLANG_WARN_EMPTY_BODY = YES;
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
CLANG_WARN_INT_CONVERSION = YES;
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
|
@ -732,14 +742,15 @@
|
||||||
baseConfigurationReference = 9096125064B44D5035341130 /* Pods-DAO_Example.debug.xcconfig */;
|
baseConfigurationReference = 9096125064B44D5035341130 /* Pods-DAO_Example.debug.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||||
INFOPLIST_FILE = DAO/Info.plist;
|
INFOPLIST_FILE = DAO/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||||
|
MARKETING_VERSION = 1.5.0;
|
||||||
MODULE_NAME = ExampleApp;
|
MODULE_NAME = ExampleApp;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
|
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_SWIFT3_OBJC_INFERENCE = On;
|
SWIFT_VERSION = 5.0;
|
||||||
SWIFT_VERSION = 4.0;
|
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
|
|
@ -748,14 +759,15 @@
|
||||||
baseConfigurationReference = 6B14B1EA7DC79FC4DC1DE526 /* Pods-DAO_Example.release.xcconfig */;
|
baseConfigurationReference = 6B14B1EA7DC79FC4DC1DE526 /* Pods-DAO_Example.release.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||||
INFOPLIST_FILE = DAO/Info.plist;
|
INFOPLIST_FILE = DAO/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||||
|
MARKETING_VERSION = 1.5.0;
|
||||||
MODULE_NAME = ExampleApp;
|
MODULE_NAME = ExampleApp;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
|
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_SWIFT3_OBJC_INFERENCE = On;
|
SWIFT_VERSION = 5.0;
|
||||||
SWIFT_VERSION = 4.0;
|
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
|
|
@ -771,14 +783,14 @@
|
||||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
DEVELOPMENT_TEAM = 42LRQS6X44;
|
DEVELOPMENT_TEAM = 42LRQS6X44;
|
||||||
INFOPLIST_FILE = RealmDAOTests/Info.plist;
|
INFOPLIST_FILE = RealmDAOTests/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.redmadrobot.RealmDAOTests;
|
PRODUCT_BUNDLE_IDENTIFIER = com.redmadrobot.RealmDAOTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "RealmDAOTests/RealmDAOTests-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "RealmDAOTests/RealmDAOTests-Bridging-Header.h";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
SWIFT_VERSION = 3.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DAO_Example.app/DAO_Example";
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DAO_Example.app/DAO_Example";
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
|
|
@ -794,12 +806,12 @@
|
||||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||||
DEVELOPMENT_TEAM = 42LRQS6X44;
|
DEVELOPMENT_TEAM = 42LRQS6X44;
|
||||||
INFOPLIST_FILE = RealmDAOTests/Info.plist;
|
INFOPLIST_FILE = RealmDAOTests/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.redmadrobot.RealmDAOTests;
|
PRODUCT_BUNDLE_IDENTIFIER = com.redmadrobot.RealmDAOTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "RealmDAOTests/RealmDAOTests-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "RealmDAOTests/RealmDAOTests-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 3.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DAO_Example.app/DAO_Example";
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DAO_Example.app/DAO_Example";
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
|
|
@ -816,15 +828,14 @@
|
||||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
DEVELOPMENT_TEAM = 42LRQS6X44;
|
DEVELOPMENT_TEAM = 42LRQS6X44;
|
||||||
INFOPLIST_FILE = CoreDataDAOTests/Info.plist;
|
INFOPLIST_FILE = CoreDataDAOTests/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.redmadrobot.CoreDataDAOTests;
|
PRODUCT_BUNDLE_IDENTIFIER = com.redmadrobot.CoreDataDAOTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "CoreDataDAOTests/CoreDataDAOTests-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "CoreDataDAOTests/CoreDataDAOTests-Bridging-Header.h";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
SWIFT_SWIFT3_OBJC_INFERENCE = On;
|
SWIFT_VERSION = 5.0;
|
||||||
SWIFT_VERSION = 4.0;
|
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DAO_Example.app/DAO_Example";
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DAO_Example.app/DAO_Example";
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
|
|
@ -840,13 +851,12 @@
|
||||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||||
DEVELOPMENT_TEAM = 42LRQS6X44;
|
DEVELOPMENT_TEAM = 42LRQS6X44;
|
||||||
INFOPLIST_FILE = CoreDataDAOTests/Info.plist;
|
INFOPLIST_FILE = CoreDataDAOTests/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.redmadrobot.CoreDataDAOTests;
|
PRODUCT_BUNDLE_IDENTIFIER = com.redmadrobot.CoreDataDAOTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "CoreDataDAOTests/CoreDataDAOTests-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "CoreDataDAOTests/CoreDataDAOTests-Bridging-Header.h";
|
||||||
SWIFT_SWIFT3_OBJC_INFERENCE = On;
|
SWIFT_VERSION = 5.0;
|
||||||
SWIFT_VERSION = 4.0;
|
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DAO_Example.app/DAO_Example";
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DAO_Example.app/DAO_Example";
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Scheme
|
<Scheme
|
||||||
LastUpgradeVersion = "0900"
|
LastUpgradeVersion = "1030"
|
||||||
version = "1.3">
|
version = "1.3">
|
||||||
<BuildAction
|
<BuildAction
|
||||||
parallelizeBuildables = "YES"
|
parallelizeBuildables = "YES"
|
||||||
|
|
@ -20,20 +20,6 @@
|
||||||
ReferencedContainer = "container:DAO.xcodeproj">
|
ReferencedContainer = "container:DAO.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildActionEntry>
|
</BuildActionEntry>
|
||||||
<BuildActionEntry
|
|
||||||
buildForTesting = "YES"
|
|
||||||
buildForRunning = "YES"
|
|
||||||
buildForProfiling = "NO"
|
|
||||||
buildForArchiving = "NO"
|
|
||||||
buildForAnalyzing = "YES">
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "607FACE41AFB9204008FA782"
|
|
||||||
BuildableName = "DAO_Tests.xctest"
|
|
||||||
BlueprintName = "DAO_Tests"
|
|
||||||
ReferencedContainer = "container:DAO.xcodeproj">
|
|
||||||
</BuildableReference>
|
|
||||||
</BuildActionEntry>
|
|
||||||
</BuildActionEntries>
|
</BuildActionEntries>
|
||||||
</BuildAction>
|
</BuildAction>
|
||||||
<TestAction
|
<TestAction
|
||||||
|
|
@ -42,16 +28,6 @@
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||||
<Testables>
|
<Testables>
|
||||||
<TestableReference
|
|
||||||
skipped = "NO">
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "607FACE41AFB9204008FA782"
|
|
||||||
BuildableName = "DAO_Tests.xctest"
|
|
||||||
BlueprintName = "DAO_Tests"
|
|
||||||
ReferencedContainer = "container:DAO.xcodeproj">
|
|
||||||
</BuildableReference>
|
|
||||||
</TestableReference>
|
|
||||||
<TestableReference
|
<TestableReference
|
||||||
skipped = "NO">
|
skipped = "NO">
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import UIKit
|
||||||
@UIApplicationMain
|
@UIApplicationMain
|
||||||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||||
|
|
||||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
|
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
import DAO
|
import DAO
|
||||||
import CoreData
|
import CoreData
|
||||||
|
|
||||||
class CDEntityTranslator: CoreDataTranslator<CDEntity, Entity> {
|
class CDEntityTranslator: CoreDataTranslator<Entity, CDEntity> {
|
||||||
|
|
||||||
override func fill(_ entity: Entity, fromEntry: CDEntity) {
|
override func fill(_ entity: Entity, fromEntry: CDEntity) {
|
||||||
entity.entityId = fromEntry.entryId
|
entity.entityId = fromEntry.entryId
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import DAO
|
||||||
import CoreData
|
import CoreData
|
||||||
|
|
||||||
|
|
||||||
class CDFolderTranslator: CoreDataTranslator<CDFolder, Folder> {
|
class CDFolderTranslator: CoreDataTranslator<Folder, CDFolder> {
|
||||||
|
|
||||||
required init() {}
|
required init() {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import DAO
|
||||||
import CoreData
|
import CoreData
|
||||||
|
|
||||||
|
|
||||||
class CDMessageTranslator: CoreDataTranslator<CDMessage, Message> {
|
class CDMessageTranslator: CoreDataTranslator<Message, CDMessage> {
|
||||||
|
|
||||||
override func fill(_ entity: Message?, fromEntry entry: CDMessage) {
|
override func fill(_ entity: Message?, fromEntry entry: CDMessage) {
|
||||||
entity?.entityId = entry.entryId
|
entity?.entityId = entry.entryId
|
||||||
|
|
|
||||||
|
|
@ -28,17 +28,16 @@ class Folder: Entity {
|
||||||
super.init()
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override func equals<T>(_ other: T) -> Bool where T : Entity {
|
||||||
override func equals<T>(_ other: T) -> Bool where T : Folder {
|
guard let other = other as? Folder else { return false }
|
||||||
return (super.equals(other)) && self.name == other.name && self.messagesArrayEquals(other.messages)
|
return super.equals(other) && name == other.name && messagesArrayEquals(other.messages)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fileprivate func messagesArrayEquals(_ otherMessages: [Message]) -> Bool {
|
fileprivate func messagesArrayEquals(_ otherMessages: [Message]) -> Bool {
|
||||||
if (self.messages.count != otherMessages.count) { return false }
|
if messages.count != otherMessages.count { return false }
|
||||||
|
|
||||||
for message in otherMessages {
|
for message in otherMessages {
|
||||||
if (!messages.contains(message)) { return false }
|
if !messages.contains(message) { return false }
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,19 +13,17 @@ class Message: Entity {
|
||||||
|
|
||||||
var text: String?
|
var text: String?
|
||||||
|
|
||||||
init(entityId: String, text: String?)
|
init(entityId: String, text: String?) {
|
||||||
{
|
|
||||||
self.text = text
|
self.text = text
|
||||||
super.init(entityId: entityId)
|
super.init(entityId: entityId)
|
||||||
}
|
}
|
||||||
|
|
||||||
required init()
|
required init() {
|
||||||
{
|
|
||||||
super.init()
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
override func equals<T>(_ other: T) -> Bool where T: Message
|
override func equals<T>(_ other: T) -> Bool where T: Entity {
|
||||||
{
|
guard let other = other as? Message else { return false }
|
||||||
return super.equals(other) && self.text == other.text
|
return super.equals(other) && self.text == other.text
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,10 @@
|
||||||
<string>en</string>
|
<string>en</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>$(EXECUTABLE_NAME)</string>
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
|
<key>CFBundleIcons</key>
|
||||||
|
<dict/>
|
||||||
|
<key>CFBundleIcons~ipad</key>
|
||||||
|
<dict/>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
|
@ -15,7 +19,7 @@
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.3.4</string>
|
<string>$(MARKETING_VERSION)</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"size" : "20x20",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"size" : "20x20",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"size" : "29x29",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"size" : "29x29",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"size" : "40x40",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"size" : "40x40",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"size" : "60x60",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"size" : "60x60",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "ios-marketing",
|
||||||
|
"size" : "1024x1024",
|
||||||
|
"scale" : "1x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"minimum-system-version" : "12.0",
|
||||||
|
"subtype" : "2688h",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"minimum-system-version" : "12.0",
|
||||||
|
"subtype" : "1792h",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"minimum-system-version" : "11.0",
|
||||||
|
"subtype" : "2436h",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"minimum-system-version" : "8.0",
|
||||||
|
"subtype" : "736h",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"orientation" : "portrait",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"extent" : "full-screen",
|
||||||
|
"minimum-system-version" : "8.0",
|
||||||
|
"subtype" : "667h",
|
||||||
|
"scale" : "2x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,21 +1,21 @@
|
||||||
PODS:
|
PODS:
|
||||||
- DAO (1.3.4):
|
- DAO (1.6.0):
|
||||||
- DAO/CoreData (= 1.3.4)
|
- DAO/CoreData (= 1.6.0)
|
||||||
- DAO/Realm (= 1.3.4)
|
- DAO/Realm (= 1.6.0)
|
||||||
- DAO/CoreData (1.3.4)
|
- DAO/CoreData (1.6.0)
|
||||||
- DAO/Realm (1.3.4):
|
- DAO/Realm (1.6.0):
|
||||||
- RealmSwift
|
- RealmSwift (~> 10.1)
|
||||||
- Realm (3.1.1):
|
- Realm (10.1.4):
|
||||||
- Realm/Headers (= 3.1.1)
|
- Realm/Headers (= 10.1.4)
|
||||||
- Realm/Headers (3.1.1)
|
- Realm/Headers (10.1.4)
|
||||||
- RealmSwift (3.1.1):
|
- RealmSwift (10.1.4):
|
||||||
- Realm (= 3.1.1)
|
- Realm (= 10.1.4)
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
- DAO (from `../`)
|
- DAO (from `../`)
|
||||||
|
|
||||||
SPEC REPOS:
|
SPEC REPOS:
|
||||||
https://github.com/cocoapods/specs.git:
|
trunk:
|
||||||
- Realm
|
- Realm
|
||||||
- RealmSwift
|
- RealmSwift
|
||||||
|
|
||||||
|
|
@ -24,10 +24,10 @@ EXTERNAL SOURCES:
|
||||||
:path: "../"
|
:path: "../"
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
DAO: 84a1ac59b03be201dc2b5ffb8f207e2d35a7b459
|
DAO: de381bf3ef4af1592f5e9cbb5e157d3bb02b4e73
|
||||||
Realm: 42d1c38a5b1bbcc828b48a7ce702cb86fc68adf4
|
Realm: 80f4fb2971ccb9adc27a47d0955ae8e533a7030b
|
||||||
RealmSwift: d31937ca6a6ee54acde64ec839523c0a3c04924b
|
RealmSwift: 0e566ca714edb377bba8ea0811eafcea0b93734e
|
||||||
|
|
||||||
PODFILE CHECKSUM: 304d7b9f54070467c355fe795db431630f017f61
|
PODFILE CHECKSUM: 304d7b9f54070467c355fe795db431630f017f61
|
||||||
|
|
||||||
COCOAPODS: 1.5.3
|
COCOAPODS: 1.10.0
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ final class RealmDAOMessagesTests: XCTestCase {
|
||||||
let message3 = Message(entityId: "3", text: "3")
|
let message3 = Message(entityId: "3", text: "3")
|
||||||
|
|
||||||
XCTAssertNoThrow(try dao.persist([message1, message2, message3]), "Persist is failed")
|
XCTAssertNoThrow(try dao.persist([message1, message2, message3]), "Persist is failed")
|
||||||
let threeMessages = dao.read()
|
let threeMessages = dao.read(orderedBy: "entryId", ascending: true)
|
||||||
|
|
||||||
XCTAssertEqual(threeMessages.count, 3)
|
XCTAssertEqual(threeMessages.count, 3)
|
||||||
XCTAssertEqual(threeMessages[0].entityId, "1")
|
XCTAssertEqual(threeMessages[0].entityId, "1")
|
||||||
|
|
@ -70,7 +70,7 @@ final class RealmDAOMessagesTests: XCTestCase {
|
||||||
|
|
||||||
XCTAssertNoThrow(try dao.persist([message1, message2, message3, message55, message66]), "Persist is failed")
|
XCTAssertNoThrow(try dao.persist([message1, message2, message3, message55, message66]), "Persist is failed")
|
||||||
|
|
||||||
let fiveMessages = dao.read()
|
let fiveMessages = dao.read(orderedBy: "entryId", ascending: true)
|
||||||
|
|
||||||
XCTAssertEqual(fiveMessages.count, 5)
|
XCTAssertEqual(fiveMessages.count, 5)
|
||||||
XCTAssertEqual(fiveMessages[0].entityId, "1")
|
XCTAssertEqual(fiveMessages[0].entityId, "1")
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
@ -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
|
||||||
56
README.md
56
README.md
|
|
@ -1,6 +1,6 @@
|
||||||
[](https://img.shields.io/github/issues/RedMadRobot/DAO.svg)
|
[](https://img.shields.io/github/issues/RedMadRobot/DAO.svg)
|
||||||
[](https://img.shields.io/badge/pod-1.0.1-blue.svg)
|
[](https://img.shields.io/badge/pod-1.6.0-blue.svg)
|
||||||
[](https://img.shields.io/badge/swift-3.0-red.svg)
|
[](https://img.shields.io/badge/swift-5.3-red.svg)
|
||||||
[](https://img.shields.io/badge/license-MIT-blue.svg)
|
[](https://img.shields.io/badge/license-MIT-blue.svg)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -32,6 +32,54 @@ Or with Realm:
|
||||||
pod 'DAO/Realm'
|
pod 'DAO/Realm'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Carthage
|
||||||
|
|
||||||
|
Make the following entry in your Cartfile:
|
||||||
|
|
||||||
|
```
|
||||||
|
github "RedMadRobot/DAO"
|
||||||
|
```
|
||||||
|
|
||||||
|
Then run `carthage update`.
|
||||||
|
|
||||||
|
At last, you need to set up your Xcode project manually to add the framework:
|
||||||
|
|
||||||
|
1. On “General” settings tab of your target, in the “Linked Frameworks and Libraries” section add each framework you want to use from Carthage/Build folder.
|
||||||
|
|
||||||
|
2. On “Build Phases” settings tab of your target, click the “+” icon and choose “New Run Script Phase”. Create a Run Script with the following content:
|
||||||
|
|
||||||
|
```
|
||||||
|
/usr/local/bin/carthage copy-frameworks
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Add the paths to the frameworks you want to use under “Input Files”:
|
||||||
|
|
||||||
|
3.1. For using with CoreData:
|
||||||
|
|
||||||
|
```
|
||||||
|
$(SRCROOT)/Carthage/Build/iOS/CoreDataDAO.framework
|
||||||
|
```
|
||||||
|
|
||||||
|
3.2. Or with Realm:
|
||||||
|
|
||||||
|
```
|
||||||
|
$(SRCROOT)/Carthage/Build/iOS/RealmDAO.framework
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Add the paths to the copied frameworks to the “Output Files”:
|
||||||
|
|
||||||
|
4.1. For using with CoreData:
|
||||||
|
|
||||||
|
```
|
||||||
|
$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/CoreDataDAO.framework
|
||||||
|
```
|
||||||
|
|
||||||
|
4.2. Or with Realm
|
||||||
|
|
||||||
|
```
|
||||||
|
$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/RealmDAO.framework
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```swift
|
```swift
|
||||||
|
|
@ -63,8 +111,8 @@ Please look at the example project for more information.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- XCode 9
|
- Xcode 11
|
||||||
- Swift 4
|
- Swift 5
|
||||||
- iOS 9
|
- iOS 9
|
||||||
|
|
||||||
## Authors
|
## Authors
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Example/Pods/Pods.xcodeproj
|
|
||||||
Loading…
Reference in New Issue