From 90d7c3128c428de2842fad322195165f150eb5b8 Mon Sep 17 00:00:00 2001 From: Stephen Celis Date: Tue, 4 Aug 2020 10:09:36 -0400 Subject: [PATCH] 111 --- .../project.pbxproj | 819 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcschemes/WeatherFeature.xcscheme | 67 ++ .../DesigningDependencies/AppDelegate.swift | 8 + .../AppIcon.appiconset/Contents.json | 98 +++ .../Assets.xcassets/Contents.json | 6 + .../Base.lproj/LaunchScreen.storyboard | 25 + .../DesigningDependencies/Info.plist | 60 ++ .../Preview Assets.xcassets/Contents.json | 6 + .../DesigningDependencies/SceneDelegate.swift | 19 + .../WeatherClient/.gitignore | 5 + .../WeatherClient/Package.swift | 32 + .../WeatherClient/README.md | 3 + .../Sources/WeatherClient/Interface.swift | 31 + .../Sources/WeatherClient/Mocks.swift | 44 + .../Sources/WeatherClientLive/Live.swift | 38 + .../WeatherClient/Tests/LinuxMain.swift | 7 + .../WeatherClientTests.swift | 15 + .../WeatherClientTests/XCTestManifests.swift | 9 + .../DesigningDependenciesTests.swift | 34 + .../DesigningDependenciesTests/Info.plist | 22 + .../WeatherFeature/ContentView.swift | 100 +++ .../WeatherFeature/Info.plist | 22 + .../WeatherFeature/WeatherFeature.h | 19 + .../WeatherFeatureTests/Info.plist | 22 + .../WeatherFeatureTests.swift | 34 + 0111-designing-dependencies-pt2/README.md | 5 + README.md | 1 + 29 files changed, 1566 insertions(+) create mode 100644 0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies.xcodeproj/project.pbxproj create mode 100644 0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies.xcodeproj/xcshareddata/xcschemes/WeatherFeature.xcscheme create mode 100644 0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/AppDelegate.swift create mode 100644 0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/Assets.xcassets/Contents.json create mode 100644 0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/Base.lproj/LaunchScreen.storyboard create mode 100644 0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/Info.plist create mode 100644 0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/Preview Content/Preview Assets.xcassets/Contents.json create mode 100644 0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/SceneDelegate.swift create mode 100644 0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/.gitignore create mode 100644 0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/Package.swift create mode 100644 0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/README.md create mode 100644 0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/Sources/WeatherClient/Interface.swift create mode 100644 0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/Sources/WeatherClient/Mocks.swift create mode 100644 0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/Sources/WeatherClientLive/Live.swift create mode 100644 0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/Tests/LinuxMain.swift create mode 100644 0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/Tests/WeatherClientTests/WeatherClientTests.swift create mode 100644 0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/Tests/WeatherClientTests/XCTestManifests.swift create mode 100644 0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependenciesTests/DesigningDependenciesTests.swift create mode 100644 0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependenciesTests/Info.plist create mode 100644 0111-designing-dependencies-pt2/DesigningDependencies/WeatherFeature/ContentView.swift create mode 100644 0111-designing-dependencies-pt2/DesigningDependencies/WeatherFeature/Info.plist create mode 100644 0111-designing-dependencies-pt2/DesigningDependencies/WeatherFeature/WeatherFeature.h create mode 100644 0111-designing-dependencies-pt2/DesigningDependencies/WeatherFeatureTests/Info.plist create mode 100644 0111-designing-dependencies-pt2/DesigningDependencies/WeatherFeatureTests/WeatherFeatureTests.swift create mode 100644 0111-designing-dependencies-pt2/README.md diff --git a/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies.xcodeproj/project.pbxproj b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies.xcodeproj/project.pbxproj new file mode 100644 index 00000000..abf81285 --- /dev/null +++ b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies.xcodeproj/project.pbxproj @@ -0,0 +1,819 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 52; + objects = { + +/* Begin PBXBuildFile section */ + 2A55622624C8972A00955510 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A55622524C8972A00955510 /* AppDelegate.swift */; }; + 2A55622824C8972A00955510 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A55622724C8972A00955510 /* SceneDelegate.swift */; }; + 2A55622C24C8972B00955510 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2A55622B24C8972B00955510 /* Assets.xcassets */; }; + 2A55622F24C8972B00955510 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2A55622E24C8972B00955510 /* Preview Assets.xcassets */; }; + 2A55623224C8972B00955510 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2A55623024C8972B00955510 /* LaunchScreen.storyboard */; }; + 2A55623D24C8972B00955510 /* DesigningDependenciesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A55623C24C8972B00955510 /* DesigningDependenciesTests.swift */; }; + 2A55624824C8B6E500955510 /* WeatherClientLive in Frameworks */ = {isa = PBXBuildFile; productRef = 2A55624724C8B6E500955510 /* WeatherClientLive */; }; + 2A55625724C8B82200955510 /* WeatherFeature.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A55624E24C8B82200955510 /* WeatherFeature.framework */; }; + 2A55625E24C8B82200955510 /* WeatherFeatureTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A55625D24C8B82200955510 /* WeatherFeatureTests.swift */; }; + 2A55626024C8B82200955510 /* WeatherFeature.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A55625024C8B82200955510 /* WeatherFeature.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2A55626324C8B82200955510 /* WeatherFeature.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A55624E24C8B82200955510 /* WeatherFeature.framework */; }; + 2A55626524C8B82200955510 /* WeatherFeature.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 2A55624E24C8B82200955510 /* WeatherFeature.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 2A55626C24C8B83300955510 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A55622924C8972A00955510 /* ContentView.swift */; }; + 2A55F5A924C8BCB600ED4286 /* WeatherClient in Frameworks */ = {isa = PBXBuildFile; productRef = 2A55F5A824C8BCB600ED4286 /* WeatherClient */; }; + 2A55F5AB24C8BCB600ED4286 /* WeatherClient in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 2A55F5A824C8BCB600ED4286 /* WeatherClient */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 2A55623924C8972B00955510 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 2A55621A24C8972A00955510 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 2A55622124C8972A00955510; + remoteInfo = DesigningDependencies; + }; + 2A55625824C8B82200955510 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 2A55621A24C8972A00955510 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 2A55624D24C8B82200955510; + remoteInfo = WeatherFeature; + }; + 2A55626124C8B82200955510 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 2A55621A24C8972A00955510 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 2A55624D24C8B82200955510; + remoteInfo = WeatherFeature; + }; + 2A64479924C8B93E00ECE190 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 2A55621A24C8972A00955510 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 2A55622124C8972A00955510; + remoteInfo = DesigningDependencies; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 2A55626424C8B82200955510 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 2A55626524C8B82200955510 /* WeatherFeature.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; + 2A55F5AA24C8BCB600ED4286 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 2A55F5AB24C8BCB600ED4286 /* WeatherClient in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 2A55622224C8972A00955510 /* DesigningDependencies.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DesigningDependencies.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2A55622524C8972A00955510 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2A55622724C8972A00955510 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + 2A55622924C8972A00955510 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 2A55622B24C8972B00955510 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2A55622E24C8972B00955510 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 2A55623124C8972B00955510 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 2A55623324C8972B00955510 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 2A55623824C8972B00955510 /* DesigningDependenciesTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DesigningDependenciesTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 2A55623C24C8972B00955510 /* DesigningDependenciesTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DesigningDependenciesTests.swift; sourceTree = ""; }; + 2A55623E24C8972B00955510 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 2A55624E24C8B82200955510 /* WeatherFeature.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = WeatherFeature.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 2A55625024C8B82200955510 /* WeatherFeature.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WeatherFeature.h; sourceTree = ""; }; + 2A55625124C8B82200955510 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 2A55625624C8B82200955510 /* WeatherFeatureTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WeatherFeatureTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 2A55625D24C8B82200955510 /* WeatherFeatureTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WeatherFeatureTests.swift; sourceTree = ""; }; + 2A55625F24C8B82200955510 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 4B16222124C8B141007FE7AD /* WeatherClient */ = {isa = PBXFileReference; lastKnownFileType = folder; path = WeatherClient; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2A55621F24C8972A00955510 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 2A55624824C8B6E500955510 /* WeatherClientLive in Frameworks */, + 2A55626324C8B82200955510 /* WeatherFeature.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2A55623524C8972B00955510 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2A55624B24C8B82200955510 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 2A55F5A924C8BCB600ED4286 /* WeatherClient in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2A55625324C8B82200955510 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 2A55625724C8B82200955510 /* WeatherFeature.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 2A55621924C8972A00955510 = { + isa = PBXGroup; + children = ( + 2A55622424C8972A00955510 /* DesigningDependencies */, + 2A55623B24C8972B00955510 /* DesigningDependenciesTests */, + 2A55624F24C8B82200955510 /* WeatherFeature */, + 2A55625C24C8B82200955510 /* WeatherFeatureTests */, + 2A55622324C8972A00955510 /* Products */, + 4B16222224C8B212007FE7AD /* Frameworks */, + ); + sourceTree = ""; + }; + 2A55622324C8972A00955510 /* Products */ = { + isa = PBXGroup; + children = ( + 2A55622224C8972A00955510 /* DesigningDependencies.app */, + 2A55623824C8972B00955510 /* DesigningDependenciesTests.xctest */, + 2A55624E24C8B82200955510 /* WeatherFeature.framework */, + 2A55625624C8B82200955510 /* WeatherFeatureTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 2A55622424C8972A00955510 /* DesigningDependencies */ = { + isa = PBXGroup; + children = ( + 4B16222124C8B141007FE7AD /* WeatherClient */, + 2A55622524C8972A00955510 /* AppDelegate.swift */, + 2A55622724C8972A00955510 /* SceneDelegate.swift */, + 2A55622B24C8972B00955510 /* Assets.xcassets */, + 2A55623024C8972B00955510 /* LaunchScreen.storyboard */, + 2A55623324C8972B00955510 /* Info.plist */, + 2A55622D24C8972B00955510 /* Preview Content */, + ); + path = DesigningDependencies; + sourceTree = ""; + }; + 2A55622D24C8972B00955510 /* Preview Content */ = { + isa = PBXGroup; + children = ( + 2A55622E24C8972B00955510 /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + 2A55623B24C8972B00955510 /* DesigningDependenciesTests */ = { + isa = PBXGroup; + children = ( + 2A55623C24C8972B00955510 /* DesigningDependenciesTests.swift */, + 2A55623E24C8972B00955510 /* Info.plist */, + ); + path = DesigningDependenciesTests; + sourceTree = ""; + }; + 2A55624F24C8B82200955510 /* WeatherFeature */ = { + isa = PBXGroup; + children = ( + 2A55622924C8972A00955510 /* ContentView.swift */, + 2A55625024C8B82200955510 /* WeatherFeature.h */, + 2A55625124C8B82200955510 /* Info.plist */, + ); + path = WeatherFeature; + sourceTree = ""; + }; + 2A55625C24C8B82200955510 /* WeatherFeatureTests */ = { + isa = PBXGroup; + children = ( + 2A55625D24C8B82200955510 /* WeatherFeatureTests.swift */, + 2A55625F24C8B82200955510 /* Info.plist */, + ); + path = WeatherFeatureTests; + sourceTree = ""; + }; + 4B16222224C8B212007FE7AD /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 2A55624924C8B82200955510 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 2A55626024C8B82200955510 /* WeatherFeature.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 2A55622124C8972A00955510 /* DesigningDependencies */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2A55624124C8972B00955510 /* Build configuration list for PBXNativeTarget "DesigningDependencies" */; + buildPhases = ( + 2A55621E24C8972A00955510 /* Sources */, + 2A55621F24C8972A00955510 /* Frameworks */, + 2A55622024C8972A00955510 /* Resources */, + 2A55626424C8B82200955510 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 2A55626224C8B82200955510 /* PBXTargetDependency */, + ); + name = DesigningDependencies; + packageProductDependencies = ( + 2A55624724C8B6E500955510 /* WeatherClientLive */, + ); + productName = DesigningDependencies; + productReference = 2A55622224C8972A00955510 /* DesigningDependencies.app */; + productType = "com.apple.product-type.application"; + }; + 2A55623724C8972B00955510 /* DesigningDependenciesTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2A55624424C8972B00955510 /* Build configuration list for PBXNativeTarget "DesigningDependenciesTests" */; + buildPhases = ( + 2A55623424C8972B00955510 /* Sources */, + 2A55623524C8972B00955510 /* Frameworks */, + 2A55623624C8972B00955510 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 2A55623A24C8972B00955510 /* PBXTargetDependency */, + ); + name = DesigningDependenciesTests; + productName = DesigningDependenciesTests; + productReference = 2A55623824C8972B00955510 /* DesigningDependenciesTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 2A55624D24C8B82200955510 /* WeatherFeature */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2A55626624C8B82200955510 /* Build configuration list for PBXNativeTarget "WeatherFeature" */; + buildPhases = ( + 2A55624924C8B82200955510 /* Headers */, + 2A55624A24C8B82200955510 /* Sources */, + 2A55624B24C8B82200955510 /* Frameworks */, + 2A55624C24C8B82200955510 /* Resources */, + 2A55F5AA24C8BCB600ED4286 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = WeatherFeature; + packageProductDependencies = ( + 2A55F5A824C8BCB600ED4286 /* WeatherClient */, + ); + productName = WeatherFeature; + productReference = 2A55624E24C8B82200955510 /* WeatherFeature.framework */; + productType = "com.apple.product-type.framework"; + }; + 2A55625524C8B82200955510 /* WeatherFeatureTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2A55626924C8B82200955510 /* Build configuration list for PBXNativeTarget "WeatherFeatureTests" */; + buildPhases = ( + 2A55625224C8B82200955510 /* Sources */, + 2A55625324C8B82200955510 /* Frameworks */, + 2A55625424C8B82200955510 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 2A64479A24C8B93E00ECE190 /* PBXTargetDependency */, + 2A55625924C8B82200955510 /* PBXTargetDependency */, + ); + name = WeatherFeatureTests; + productName = WeatherFeatureTests; + productReference = 2A55625624C8B82200955510 /* WeatherFeatureTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2A55621A24C8972A00955510 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1160; + LastUpgradeCheck = 1160; + ORGANIZATIONNAME = "Point-Free"; + TargetAttributes = { + 2A55622124C8972A00955510 = { + CreatedOnToolsVersion = 11.6; + }; + 2A55623724C8972B00955510 = { + CreatedOnToolsVersion = 11.6; + TestTargetID = 2A55622124C8972A00955510; + }; + 2A55624D24C8B82200955510 = { + CreatedOnToolsVersion = 11.6; + }; + 2A55625524C8B82200955510 = { + CreatedOnToolsVersion = 11.6; + TestTargetID = 2A55622124C8972A00955510; + }; + }; + }; + buildConfigurationList = 2A55621D24C8972A00955510 /* Build configuration list for PBXProject "DesigningDependencies" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 2A55621924C8972A00955510; + productRefGroup = 2A55622324C8972A00955510 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2A55622124C8972A00955510 /* DesigningDependencies */, + 2A55623724C8972B00955510 /* DesigningDependenciesTests */, + 2A55624D24C8B82200955510 /* WeatherFeature */, + 2A55625524C8B82200955510 /* WeatherFeatureTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2A55622024C8972A00955510 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2A55623224C8972B00955510 /* LaunchScreen.storyboard in Resources */, + 2A55622F24C8972B00955510 /* Preview Assets.xcassets in Resources */, + 2A55622C24C8972B00955510 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2A55623624C8972B00955510 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2A55624C24C8B82200955510 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2A55625424C8B82200955510 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2A55621E24C8972A00955510 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2A55622624C8972A00955510 /* AppDelegate.swift in Sources */, + 2A55622824C8972A00955510 /* SceneDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2A55623424C8972B00955510 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2A55623D24C8972B00955510 /* DesigningDependenciesTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2A55624A24C8B82200955510 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2A55626C24C8B83300955510 /* ContentView.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2A55625224C8B82200955510 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2A55625E24C8B82200955510 /* WeatherFeatureTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 2A55623A24C8972B00955510 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 2A55622124C8972A00955510 /* DesigningDependencies */; + targetProxy = 2A55623924C8972B00955510 /* PBXContainerItemProxy */; + }; + 2A55625924C8B82200955510 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 2A55624D24C8B82200955510 /* WeatherFeature */; + targetProxy = 2A55625824C8B82200955510 /* PBXContainerItemProxy */; + }; + 2A55626224C8B82200955510 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 2A55624D24C8B82200955510 /* WeatherFeature */; + targetProxy = 2A55626124C8B82200955510 /* PBXContainerItemProxy */; + }; + 2A64479A24C8B93E00ECE190 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 2A55622124C8972A00955510 /* DesigningDependencies */; + targetProxy = 2A64479924C8B93E00ECE190 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 2A55623024C8972B00955510 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 2A55623124C8972B00955510 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 2A55623F24C8972B00955510 /* Debug */ = { + isa = XCBuildConfiguration; + 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; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + 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; + IPHONEOS_DEPLOYMENT_TARGET = 13.6; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 2A55624024C8972B00955510 /* Release */ = { + isa = XCBuildConfiguration; + 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; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + 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; + IPHONEOS_DEPLOYMENT_TARGET = 13.6; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2A55624224C8972B00955510 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_ASSET_PATHS = "\"DesigningDependencies/Preview Content\""; + ENABLE_PREVIEWS = YES; + INFOPLIST_FILE = DesigningDependencies/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.5; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = co.pointfree.DesigningDependencies; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 2A55624324C8972B00955510 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_ASSET_PATHS = "\"DesigningDependencies/Preview Content\""; + ENABLE_PREVIEWS = YES; + INFOPLIST_FILE = DesigningDependencies/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.5; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = co.pointfree.DesigningDependencies; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 2A55624524C8972B00955510 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = DesigningDependenciesTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.6; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = co.pointfree.DesigningDependenciesTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DesigningDependencies.app/DesigningDependencies"; + }; + name = Debug; + }; + 2A55624624C8972B00955510 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = DesigningDependenciesTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.6; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = co.pointfree.DesigningDependenciesTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DesigningDependencies.app/DesigningDependencies"; + }; + name = Release; + }; + 2A55626724C8B82200955510 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = WeatherFeature/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 13.5; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = co.pointfree.WeatherFeature; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 2A55626824C8B82200955510 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = WeatherFeature/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 13.5; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = co.pointfree.WeatherFeature; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 2A55626A24C8B82200955510 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = WeatherFeatureTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = co.pointfree.WeatherFeatureTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DesigningDependencies.app/DesigningDependencies"; + }; + name = Debug; + }; + 2A55626B24C8B82200955510 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = WeatherFeatureTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = co.pointfree.WeatherFeatureTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DesigningDependencies.app/DesigningDependencies"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2A55621D24C8972A00955510 /* Build configuration list for PBXProject "DesigningDependencies" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2A55623F24C8972B00955510 /* Debug */, + 2A55624024C8972B00955510 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2A55624124C8972B00955510 /* Build configuration list for PBXNativeTarget "DesigningDependencies" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2A55624224C8972B00955510 /* Debug */, + 2A55624324C8972B00955510 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2A55624424C8972B00955510 /* Build configuration list for PBXNativeTarget "DesigningDependenciesTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2A55624524C8972B00955510 /* Debug */, + 2A55624624C8972B00955510 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2A55626624C8B82200955510 /* Build configuration list for PBXNativeTarget "WeatherFeature" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2A55626724C8B82200955510 /* Debug */, + 2A55626824C8B82200955510 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2A55626924C8B82200955510 /* Build configuration list for PBXNativeTarget "WeatherFeatureTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2A55626A24C8B82200955510 /* Debug */, + 2A55626B24C8B82200955510 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCSwiftPackageProductDependency section */ + 2A55624724C8B6E500955510 /* WeatherClientLive */ = { + isa = XCSwiftPackageProductDependency; + productName = WeatherClientLive; + }; + 2A55F5A824C8BCB600ED4286 /* WeatherClient */ = { + isa = XCSwiftPackageProductDependency; + productName = WeatherClient; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = 2A55621A24C8972A00955510 /* Project object */; +} diff --git a/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..210e1799 --- /dev/null +++ b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies.xcodeproj/xcshareddata/xcschemes/WeatherFeature.xcscheme b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies.xcodeproj/xcshareddata/xcschemes/WeatherFeature.xcscheme new file mode 100644 index 00000000..339f9ebe --- /dev/null +++ b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies.xcodeproj/xcshareddata/xcschemes/WeatherFeature.xcscheme @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/AppDelegate.swift b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/AppDelegate.swift new file mode 100644 index 00000000..1cc418c1 --- /dev/null +++ b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/AppDelegate.swift @@ -0,0 +1,8 @@ +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + return true + } +} diff --git a/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/Assets.xcassets/AppIcon.appiconset/Contents.json b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..9221b9bb --- /dev/null +++ b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/Assets.xcassets/Contents.json b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/Assets.xcassets/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/Base.lproj/LaunchScreen.storyboard b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..865e9329 --- /dev/null +++ b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/Info.plist b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/Info.plist new file mode 100644 index 00000000..9742bf0f --- /dev/null +++ b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/Info.plist @@ -0,0 +1,60 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + + + + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/Preview Content/Preview Assets.xcassets/Contents.json b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/SceneDelegate.swift b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/SceneDelegate.swift new file mode 100644 index 00000000..14b4413e --- /dev/null +++ b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/SceneDelegate.swift @@ -0,0 +1,19 @@ +import SwiftUI +import UIKit +import WeatherClientLive +import WeatherFeature + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + var window: UIWindow? + + func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { + let contentView = ContentView(viewModel: AppViewModel(weatherClient: .live)) + + if let windowScene = scene as? UIWindowScene { + let window = UIWindow(windowScene: windowScene) + window.rootViewController = UIHostingController(rootView: contentView) + self.window = window + window.makeKeyAndVisible() + } + } +} diff --git a/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/.gitignore b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/.gitignore new file mode 100644 index 00000000..95c43209 --- /dev/null +++ b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/.gitignore @@ -0,0 +1,5 @@ +.DS_Store +/.build +/Packages +/*.xcodeproj +xcuserdata/ diff --git a/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/Package.swift b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/Package.swift new file mode 100644 index 00000000..144be0d6 --- /dev/null +++ b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/Package.swift @@ -0,0 +1,32 @@ +// swift-tools-version:5.2 + +import PackageDescription + +let package = Package( + name: "WeatherClient", + platforms: [.iOS(.v13)], + products: [ + .library( + name: "WeatherClient", + type: .dynamic, + targets: ["WeatherClient"]), + .library( + name: "WeatherClientLive", + type: .dynamic, + targets: ["WeatherClientLive"]), + ], + dependencies: [ + ], + targets: [ + .target( + name: "WeatherClient", + dependencies: []), + .testTarget( + name: "WeatherClientTests", + dependencies: ["WeatherClient"]), + + .target( + name: "WeatherClientLive", + dependencies: ["WeatherClient"]), + ] +) diff --git a/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/README.md b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/README.md new file mode 100644 index 00000000..a0e41739 --- /dev/null +++ b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/README.md @@ -0,0 +1,3 @@ +# WeatherClient + +A description of this package. diff --git a/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/Sources/WeatherClient/Interface.swift b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/Sources/WeatherClient/Interface.swift new file mode 100644 index 00000000..90bbcdbd --- /dev/null +++ b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/Sources/WeatherClient/Interface.swift @@ -0,0 +1,31 @@ +import Combine +import CoreLocation +import Foundation + +/// A client for accessing weather data for locations. +public struct WeatherClient { + public var weather: () -> AnyPublisher + public var searchLocations: (CLLocationCoordinate2D) -> AnyPublisher<[Location], Error> + + public init( + weather: @escaping () -> AnyPublisher, + searchLocations: @escaping (CLLocationCoordinate2D) -> AnyPublisher<[Location], Error> + ) { + self.weather = weather + self.searchLocations = searchLocations + } +} + +public struct WeatherResponse: Decodable, Equatable { + public var consolidatedWeather: [ConsolidatedWeather] + + public struct ConsolidatedWeather: Decodable, Equatable { + public var applicableDate: Date + public var id: Int + public var maxTemp: Double + public var minTemp: Double + public var theTemp: Double + } +} + +public struct Location {} diff --git a/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/Sources/WeatherClient/Mocks.swift b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/Sources/WeatherClient/Mocks.swift new file mode 100644 index 00000000..fab068b1 --- /dev/null +++ b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/Sources/WeatherClient/Mocks.swift @@ -0,0 +1,44 @@ +import Combine +import Foundation + +extension WeatherClient { + public static let empty = Self( + weather: { + Just(WeatherResponse(consolidatedWeather: [])) + .setFailureType(to: Error.self) + .eraseToAnyPublisher() + }, + searchLocations: { _ in + Just([]).setFailureType(to: Error.self) + .eraseToAnyPublisher() + }) + + public static let happyPath = Self( + weather: { + Just( + WeatherResponse( + consolidatedWeather: [ + .init(applicableDate: Date(), id: 1, maxTemp: 30, minTemp: 10, theTemp: 20), + .init(applicableDate: Date().addingTimeInterval(86400), id: 2, maxTemp: -10, minTemp: -30, theTemp: -20) + ] + ) + ) + .setFailureType(to: Error.self) + .eraseToAnyPublisher() + }, searchLocations: { _ in + Just([]) + .setFailureType(to: Error.self) + .eraseToAnyPublisher() + }) + + public static let failed = Self( + weather: { + Fail(error: NSError(domain: "", code: 1)) + .eraseToAnyPublisher() + }, searchLocations: { _ in + Just([]) + .setFailureType(to: Error.self) + .eraseToAnyPublisher() + }) +} + diff --git a/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/Sources/WeatherClientLive/Live.swift b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/Sources/WeatherClientLive/Live.swift new file mode 100644 index 00000000..1b6025a0 --- /dev/null +++ b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/Sources/WeatherClientLive/Live.swift @@ -0,0 +1,38 @@ +import Combine +import Foundation +import WeatherClient + +extension WeatherClient { + public static let live = Self( + weather: { + URLSession.shared.dataTaskPublisher(for: URL(string: "https://www.metaweather.com/api/location/2459115")!) + .map { data, _ in data } + .decode(type: WeatherResponse.self, decoder: weatherJsonDecoder) + .receive(on: DispatchQueue.main) + .eraseToAnyPublisher() + }, + searchLocations: { coordinate in + fatalError() + }) +} + +private let weatherJsonDecoder: JSONDecoder = { + let jsonDecoder = JSONDecoder() + let formatter = DateFormatter() + formatter.dateFormat = "yyyy-MM-dd" + jsonDecoder.dateDecodingStrategy = .formatted(formatter) + jsonDecoder.keyDecodingStrategy = .convertFromSnakeCase + return jsonDecoder +}() + + +public let __tmp0 = 2 * 2 * 2 * 2.0 / 2 + 2 +public let __tmp1 = 2 * 2 * 2 * 2.0 / 2 + 2 +public let __tmp2 = 2 * 2 * 2 * 2.0 / 2 + 2 +public let __tmp3 = 2 * 2 * 2 * 2.0 / 2 + 2 +public let __tmp4 = 2 * 2 * 2 * 2.0 / 2 + 2 +public let __tmp5 = 2 * 2 * 2 * 2.0 / 2 + 2 +public let __tmp6 = 2 * 2 * 2 * 2.0 / 2 + 2 +public let __tmp7 = 2 * 2 * 2 * 2.0 / 2 + 2 +public let __tmp8 = 2 * 2 * 2 * 2.0 / 2 + 2 +public let __tmp9 = 2 * 2 * 2 * 2.0 / 2 + 2 diff --git a/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/Tests/LinuxMain.swift b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/Tests/LinuxMain.swift new file mode 100644 index 00000000..28159025 --- /dev/null +++ b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/Tests/LinuxMain.swift @@ -0,0 +1,7 @@ +import XCTest + +import WeatherClientTests + +var tests = [XCTestCaseEntry]() +tests += WeatherClientTests.allTests() +XCTMain(tests) diff --git a/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/Tests/WeatherClientTests/WeatherClientTests.swift b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/Tests/WeatherClientTests/WeatherClientTests.swift new file mode 100644 index 00000000..6eeb29b2 --- /dev/null +++ b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/Tests/WeatherClientTests/WeatherClientTests.swift @@ -0,0 +1,15 @@ +import XCTest +@testable import WeatherClient + +final class WeatherClientTests: XCTestCase { + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct + // results. + XCTAssertEqual(WeatherClient().text, "Hello, World!") + } + + static var allTests = [ + ("testExample", testExample), + ] +} diff --git a/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/Tests/WeatherClientTests/XCTestManifests.swift b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/Tests/WeatherClientTests/XCTestManifests.swift new file mode 100644 index 00000000..ed485f4b --- /dev/null +++ b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependencies/WeatherClient/Tests/WeatherClientTests/XCTestManifests.swift @@ -0,0 +1,9 @@ +import XCTest + +#if !canImport(ObjectiveC) +public func allTests() -> [XCTestCaseEntry] { + return [ + testCase(WeatherClientTests.allTests), + ] +} +#endif diff --git a/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependenciesTests/DesigningDependenciesTests.swift b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependenciesTests/DesigningDependenciesTests.swift new file mode 100644 index 00000000..bb8f23f7 --- /dev/null +++ b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependenciesTests/DesigningDependenciesTests.swift @@ -0,0 +1,34 @@ +// +// DesigningDependenciesTests.swift +// DesigningDependenciesTests +// +// Created by Point-Free on 7/22/20. +// Copyright © 2020 Point-Free. All rights reserved. +// + +import XCTest +@testable import DesigningDependencies + +class DesigningDependenciesTests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() throws { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() throws { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependenciesTests/Info.plist b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependenciesTests/Info.plist new file mode 100644 index 00000000..64d65ca4 --- /dev/null +++ b/0111-designing-dependencies-pt2/DesigningDependencies/DesigningDependenciesTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/0111-designing-dependencies-pt2/DesigningDependencies/WeatherFeature/ContentView.swift b/0111-designing-dependencies-pt2/DesigningDependencies/WeatherFeature/ContentView.swift new file mode 100644 index 00000000..9ac14d17 --- /dev/null +++ b/0111-designing-dependencies-pt2/DesigningDependencies/WeatherFeature/ContentView.swift @@ -0,0 +1,100 @@ +import Combine +import SwiftUI +import WeatherClient + +public class AppViewModel: ObservableObject { + @Published var isConnected = true + @Published var weatherResults: [WeatherResponse.ConsolidatedWeather] = [] + + var weatherRequestCancellable: AnyCancellable? + + public init( + isConnected: Bool = true, + weatherClient: WeatherClient + ) { + self.isConnected = isConnected + + self.weatherRequestCancellable = weatherClient + .weather() + .sink( + receiveCompletion: { _ in }, + receiveValue: { [weak self] response in + self?.weatherResults = response.consolidatedWeather + }) + } +} + +public struct ContentView: View { + @ObservedObject var viewModel: AppViewModel + + public init(viewModel: AppViewModel) { + self.viewModel = viewModel + } + + public var body: some View { + NavigationView { + ZStack(alignment: .bottom) { + ZStack(alignment: .bottomTrailing) { + List { + ForEach(self.viewModel.weatherResults, id: \.id) { weather in + VStack(alignment: .leading) { + Text(dayOfWeekFormatter.string(from: weather.applicableDate).capitalized) + .font(.title) + + Text("Current temp: \(weather.theTemp, specifier: "%.1f")°C") + Text("Max temp: \(weather.maxTemp, specifier: "%.1f")°C") + Text("Min temp: \(weather.minTemp, specifier: "%.1f")°C") + } + } + } + + Button( + action: { } + ) { + Image(systemName: "location.fill") + .foregroundColor(.white) + .frame(width: 60, height: 60) + } + .background(Color.black) + .clipShape(Circle()) + .padding() + } + + if !self.viewModel.isConnected { + HStack { + Image(systemName: "exclamationmark.octagon.fill") + + Text("Not connected to internet") + } + .foregroundColor(.white) + .padding() + .background(Color.red) + } + } + .navigationBarTitle("Weather") + } + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + return ContentView( + viewModel: AppViewModel( + weatherClient: { + var client = WeatherClient.happyPath + client.searchLocations = { _ in + Fail(error: NSError(domain: "", code: 1)) + .eraseToAnyPublisher() + } + return client + }() + ) + ) + } +} + +let dayOfWeekFormatter: DateFormatter = { + let formatter = DateFormatter() + formatter.dateFormat = "EEEE" + return formatter +}() diff --git a/0111-designing-dependencies-pt2/DesigningDependencies/WeatherFeature/Info.plist b/0111-designing-dependencies-pt2/DesigningDependencies/WeatherFeature/Info.plist new file mode 100644 index 00000000..9bcb2444 --- /dev/null +++ b/0111-designing-dependencies-pt2/DesigningDependencies/WeatherFeature/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + + diff --git a/0111-designing-dependencies-pt2/DesigningDependencies/WeatherFeature/WeatherFeature.h b/0111-designing-dependencies-pt2/DesigningDependencies/WeatherFeature/WeatherFeature.h new file mode 100644 index 00000000..7bfb1a65 --- /dev/null +++ b/0111-designing-dependencies-pt2/DesigningDependencies/WeatherFeature/WeatherFeature.h @@ -0,0 +1,19 @@ +// +// WeatherFeature.h +// WeatherFeature +// +// Created by Point-Free on 7/22/20. +// Copyright © 2020 Point-Free. All rights reserved. +// + +#import + +//! Project version number for WeatherFeature. +FOUNDATION_EXPORT double WeatherFeatureVersionNumber; + +//! Project version string for WeatherFeature. +FOUNDATION_EXPORT const unsigned char WeatherFeatureVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/0111-designing-dependencies-pt2/DesigningDependencies/WeatherFeatureTests/Info.plist b/0111-designing-dependencies-pt2/DesigningDependencies/WeatherFeatureTests/Info.plist new file mode 100644 index 00000000..64d65ca4 --- /dev/null +++ b/0111-designing-dependencies-pt2/DesigningDependencies/WeatherFeatureTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/0111-designing-dependencies-pt2/DesigningDependencies/WeatherFeatureTests/WeatherFeatureTests.swift b/0111-designing-dependencies-pt2/DesigningDependencies/WeatherFeatureTests/WeatherFeatureTests.swift new file mode 100644 index 00000000..3b8c58c2 --- /dev/null +++ b/0111-designing-dependencies-pt2/DesigningDependencies/WeatherFeatureTests/WeatherFeatureTests.swift @@ -0,0 +1,34 @@ +// +// WeatherFeatureTests.swift +// WeatherFeatureTests +// +// Created by Point-Free on 7/22/20. +// Copyright © 2020 Point-Free. All rights reserved. +// + +import XCTest +@testable import WeatherFeature + +class WeatherFeatureTests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() throws { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() throws { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/0111-designing-dependencies-pt2/README.md b/0111-designing-dependencies-pt2/README.md new file mode 100644 index 00000000..d878d6fb --- /dev/null +++ b/0111-designing-dependencies-pt2/README.md @@ -0,0 +1,5 @@ +## [Point-Free](https://www.pointfree.co) + +> #### This directory contains code from Point-Free Episode: [Designing Dependencies: Modularization](https://www.pointfree.co/episodes/ep111-designing-dependencies-modularization) +> +> Let’s the scrap the protocols for designing our dependencies and just use plain data types. Not only will we gain lots of new benefits that were previously impossible with protocols, but we’ll also be able to modularize our application to improve compile times. diff --git a/README.md b/README.md index 2b1a433b..5009b66b 100644 --- a/README.md +++ b/README.md @@ -113,3 +113,4 @@ This repository is the home of code written on episodes of 1. [Composable SwiftUI Bindings: Case Paths](0108-composable-bindings-pt2) 1. [Composable SwiftUI Bindings: The Point](0109-composable-bindings-pt3) 1. [Designing Dependencies: The Problem](0110-designing-dependencies-pt1) +1. [Designing Dependencies: Modularization](0111-designing-dependencies-pt2)