Skip to content

Commit

Permalink
Merge pull request #2 from iCookbook/core-data
Browse files Browse the repository at this point in the history
Core Data & Unit tests
  • Loading branch information
htmlprogrammist authored Jan 2, 2023
2 parents 072a7ed + cc2d756 commit 97acc2c
Show file tree
Hide file tree
Showing 23 changed files with 610 additions and 320 deletions.
165 changes: 17 additions & 148 deletions Example/Persistence.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,21 @@
607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; };
607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; };
607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; };
607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 607FACC81AFB9204008FA782 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 607FACCF1AFB9204008FA782;
remoteInfo = Persistence;
};
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
1D59596C374EF1CAF4499C76 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
2CB305A6B0AE5BA1D5E1AF85 /* Pods-Persistence_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Persistence_Example.release.xcconfig"; path = "Target Support Files/Pods-Persistence_Example/Pods-Persistence_Example.release.xcconfig"; sourceTree = "<group>"; };
607FACD01AFB9204008FA782 /* Persistence_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Persistence_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
607FACD71AFB9204008FA782 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
607FACE51AFB9204008FA782 /* Persistence_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Persistence_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = "<group>"; };
8A61697697463A7F785519B3 /* Pods-Persistence_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Persistence_Example.debug.xcconfig"; path = "../../../../Pods/Target Support Files/Pods-Persistence_Example/Pods-Persistence_Example.debug.xcconfig"; sourceTree = "<group>"; };
6E78780884236588C4AC1DB4 /* Pods-Persistence_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Persistence_Example.debug.xcconfig"; path = "Target Support Files/Pods-Persistence_Example/Pods-Persistence_Example.debug.xcconfig"; sourceTree = "<group>"; };
B94BF6514C33AB4F56989DDB /* Pods_Persistence_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Persistence_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
C4853AFA4324AE486137C217 /* Persistence.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Persistence.podspec; path = ../Persistence.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
E43B5DBCCFF93E3FE06FEDC9 /* Pods-Persistence_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Persistence_Example.release.xcconfig"; path = "../../../../Pods/Target Support Files/Pods-Persistence_Example/Pods-Persistence_Example.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -53,42 +39,24 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
607FACE21AFB9204008FA782 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
24C4EA6A4CF1EC309930B633 /* Pods */ = {
isa = PBXGroup;
children = (
8A61697697463A7F785519B3 /* Pods-Persistence_Example.debug.xcconfig */,
E43B5DBCCFF93E3FE06FEDC9 /* Pods-Persistence_Example.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
};
607FACC71AFB9204008FA782 = {
isa = PBXGroup;
children = (
607FACF51AFB993E008FA782 /* Podspec Metadata */,
607FACD21AFB9204008FA782 /* Example for Persistence */,
607FACE81AFB9204008FA782 /* Tests */,
607FACD11AFB9204008FA782 /* Products */,
24C4EA6A4CF1EC309930B633 /* Pods */,
D6C1D55B17F3FF093B1CA33C /* Frameworks */,
E1F7E20E09017FBE05E97297 /* Pods */,
);
sourceTree = "<group>";
};
607FACD11AFB9204008FA782 /* Products */ = {
isa = PBXGroup;
children = (
607FACD01AFB9204008FA782 /* Persistence_Example.app */,
607FACE51AFB9204008FA782 /* Persistence_Tests.xctest */,
);
name = Products;
sourceTree = "<group>";
Expand All @@ -115,23 +83,6 @@
name = "Supporting Files";
sourceTree = "<group>";
};
607FACE81AFB9204008FA782 /* Tests */ = {
isa = PBXGroup;
children = (
607FACEB1AFB9204008FA782 /* Tests.swift */,
607FACE91AFB9204008FA782 /* Supporting Files */,
);
path = Tests;
sourceTree = "<group>";
};
607FACE91AFB9204008FA782 /* Supporting Files */ = {
isa = PBXGroup;
children = (
607FACEA1AFB9204008FA782 /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
607FACF51AFB993E008FA782 /* Podspec Metadata */ = {
isa = PBXGroup;
children = (
Expand All @@ -149,6 +100,16 @@
name = Frameworks;
sourceTree = "<group>";
};
E1F7E20E09017FBE05E97297 /* Pods */ = {
isa = PBXGroup;
children = (
6E78780884236588C4AC1DB4 /* Pods-Persistence_Example.debug.xcconfig */,
2CB305A6B0AE5BA1D5E1AF85 /* Pods-Persistence_Example.release.xcconfig */,
);
name = Pods;
path = ../../../Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand All @@ -171,24 +132,6 @@
productReference = 607FACD01AFB9204008FA782 /* Persistence_Example.app */;
productType = "com.apple.product-type.application";
};
607FACE41AFB9204008FA782 /* Persistence_Tests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "Persistence_Tests" */;
buildPhases = (
607FACE11AFB9204008FA782 /* Sources */,
607FACE21AFB9204008FA782 /* Frameworks */,
607FACE31AFB9204008FA782 /* Resources */,
);
buildRules = (
);
dependencies = (
607FACE71AFB9204008FA782 /* PBXTargetDependency */,
);
name = Persistence_Tests;
productName = Tests;
productReference = 607FACE51AFB9204008FA782 /* Persistence_Tests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
Expand All @@ -203,11 +146,6 @@
CreatedOnToolsVersion = 6.3.1;
LastSwiftMigration = 0900;
};
607FACE41AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
LastSwiftMigration = 0900;
TestTargetID = 607FACCF1AFB9204008FA782;
};
};
};
buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "Persistence" */;
Expand All @@ -224,7 +162,6 @@
projectRoot = "";
targets = (
607FACCF1AFB9204008FA782 /* Persistence_Example */,
607FACE41AFB9204008FA782 /* Persistence_Tests */,
);
};
/* End PBXProject section */
Expand All @@ -240,13 +177,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
607FACE31AFB9204008FA782 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -279,11 +209,13 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Persistence_Example/Pods-Persistence_Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/Logger/Logger.framework",
"${BUILT_PRODUCTS_DIR}/Models/Models.framework",
"${BUILT_PRODUCTS_DIR}/Persistence/Persistence.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Logger.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Models.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Persistence.framework",
);
Expand All @@ -304,24 +236,8 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
607FACE11AFB9204008FA782 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
607FACEC1AFB9204008FA782 /* Tests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
607FACE71AFB9204008FA782 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 607FACCF1AFB9204008FA782 /* Persistence_Example */;
targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
607FACD91AFB9204008FA782 /* Main.storyboard */ = {
isa = PBXVariantGroup;
Expand Down Expand Up @@ -453,7 +369,7 @@
};
607FACF01AFB9204008FA782 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 8A61697697463A7F785519B3 /* Pods-Persistence_Example.debug.xcconfig */;
baseConfigurationReference = 6E78780884236588C4AC1DB4 /* Pods-Persistence_Example.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = Persistence/Info.plist;
Expand All @@ -468,7 +384,7 @@
};
607FACF11AFB9204008FA782 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = E43B5DBCCFF93E3FE06FEDC9 /* Pods-Persistence_Example.release.xcconfig */;
baseConfigurationReference = 2CB305A6B0AE5BA1D5E1AF85 /* Pods-Persistence_Example.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = Persistence/Info.plist;
Expand All @@ -481,44 +397,6 @@
};
name = Release;
};
607FACF31AFB9204008FA782 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = (
"$(PLATFORM_DIR)/Developer/Library/Frameworks",
"$(inherited)",
);
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Persistence_Example.app/Persistence_Example";
};
name = Debug;
};
607FACF41AFB9204008FA782 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = (
"$(PLATFORM_DIR)/Developer/Library/Frameworks",
"$(inherited)",
);
INFOPLIST_FILE = Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Persistence_Example.app/Persistence_Example";
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
Expand All @@ -540,15 +418,6 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "Persistence_Tests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
607FACF31AFB9204008FA782 /* Debug */,
607FACF41AFB9204008FA782 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 607FACC81AFB9204008FA782 /* Project object */;
Expand Down
1 change: 1 addition & 0 deletions Example/Persistence/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
24 changes: 0 additions & 24 deletions Example/Tests/Info.plist

This file was deleted.

28 changes: 0 additions & 28 deletions Example/Tests/Tests.swift

This file was deleted.

11 changes: 8 additions & 3 deletions Persistence.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Persistence'
s.version = '1.5.1'
s.version = '2.0.0'
s.summary = 'Persistence layer of the project.'
s.homepage = 'https://github.com/iCookbook/Persistence'
s.author = { 'htmlprogrammist' => '[email protected]' }
Expand All @@ -9,8 +9,13 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '12.0'
s.swift_version = '5.0'

s.source_files = 'Persistence/**/*.{swift}'
s.resources = 'Persistence/**/*.{xcdatamodeld}'
s.source_files = 'Persistence/Sources/**/*.{swift}'
s.resources = 'Persistence/Sources/**/*.{xcdatamodeld}'

s.test_spec 'Tests' do |test_spec|
test_spec.source_files = 'Persistence/Tests/**/*.{swift}'
end

s.dependency 'Models'
s.dependency 'Logger'
end

This file was deleted.

Loading

0 comments on commit 97acc2c

Please sign in to comment.