diff --git a/.gitignore b/.gitignore index be82548..432d722 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,12 @@ Carthage/Build # `pod install` in .travis.yml # Pods/ + +# Swift Package +/.build +/Packages +xcuserdata/ +DerivedData/ +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc diff --git a/.swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/.swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/.swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/CleanArchKit.podspec b/CleanArchKit.podspec index 0b77ae2..6ec263c 100644 --- a/CleanArchKit.podspec +++ b/CleanArchKit.podspec @@ -1,8 +1,8 @@ Pod::Spec.new do |s| s.name = 'CleanArchKit' - s.version = '0.1.3' - s.swift_version = "5.0" + s.version = '0.1.4' + s.swift_version = "5.4" s.summary = 'An iOS library to create a project with the Clean Architecture using Router and MVVM pattern.' s.description = <<-DESC @@ -15,10 +15,10 @@ DESC s.source = { :git => 'https://github.com/k-angama/iOS-CleanArchKit.git', :tag => s.version.to_s } s.social_media_url = 'https://twitter.com/k_angama' - s.ios.deployment_target = '11.0' + s.ios.deployment_target = '12.0' - s.source_files = 'CleanArchKit/**/*.{swift}' - s.exclude_files = 'CleanArchKit/CleanArchKitTests/**/*.{swift}' + s.source_files = 'Sources/CleanArchKit/**/*.{swift}' + s.exclude_files = 'Tests/CleanArchKit/CleanArchKitTests/**/*.{swift}' s.frameworks = 'UIKit' diff --git a/CleanArchKit/CleanArchKit.xcodeproj/project.pbxproj b/CleanArchKit/CleanArchKit.xcodeproj/project.pbxproj index 0fe0a38..ce688ee 100644 --- a/CleanArchKit/CleanArchKit.xcodeproj/project.pbxproj +++ b/CleanArchKit/CleanArchKit.xcodeproj/project.pbxproj @@ -8,18 +8,18 @@ /* Begin PBXBuildFile section */ 2525942529F19DDF0007F0D1 /* CleanArchKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 256205FC29E5A2CB00896F1C /* CleanArchKit.framework */; }; - 2525942E29F27DE30007F0D1 /* MockMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2525942D29F27DE30007F0D1 /* MockMapper.swift */; }; - 2562060A29E5A2CB00896F1C /* CleanArchKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2562060929E5A2CB00896F1C /* CleanArchKitTests.swift */; }; - 2562060B29E5A2CB00896F1C /* CleanArchKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 256205FF29E5A2CB00896F1C /* CleanArchKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2562063729E5A55D00896F1C /* ViewModelProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2562063629E5A55D00896F1C /* ViewModelProtocol.swift */; }; - 2562063929E5A58A00896F1C /* BaseViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2562063829E5A58A00896F1C /* BaseViewModel.swift */; }; - 2562063B29E5A5D000896F1C /* ViewControllerProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2562063A29E5A5D000896F1C /* ViewControllerProtocol.swift */; }; - 2562063D29E5A5E100896F1C /* DIProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2562063C29E5A5E100896F1C /* DIProtocol.swift */; }; - 2562063F29E5A5F300896F1C /* BaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2562063E29E5A5F300896F1C /* BaseViewController.swift */; }; - 2562064129E5A61800896F1C /* Router.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2562064029E5A61800896F1C /* Router.swift */; }; - 2562064329E5A64700896F1C /* BaseRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2562064229E5A64700896F1C /* BaseRouter.swift */; }; - 25C293D729E6A0830062AE27 /* BaseUseCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25C293D629E6A0830062AE27 /* BaseUseCase.swift */; }; - 25C293D929E6A0BD0062AE27 /* BaseMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25C293D829E6A0BD0062AE27 /* BaseMapper.swift */; }; + 280F996D2B629F7700F905B6 /* CleanArchKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 280F996B2B629F7700F905B6 /* CleanArchKitTests.swift */; }; + 280F99712B62A0A100F905B6 /* MockMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 280F99702B62A0A100F905B6 /* MockMapper.swift */; }; + 280F997E2B62A0D700F905B6 /* ViewControllerProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 280F99732B62A0D700F905B6 /* ViewControllerProtocol.swift */; }; + 280F997F2B62A0D700F905B6 /* ViewModelProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 280F99742B62A0D700F905B6 /* ViewModelProtocol.swift */; }; + 280F99802B62A0D700F905B6 /* Router.swift in Sources */ = {isa = PBXBuildFile; fileRef = 280F99752B62A0D700F905B6 /* Router.swift */; }; + 280F99812B62A0D700F905B6 /* DIProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 280F99762B62A0D700F905B6 /* DIProtocol.swift */; }; + 280F99822B62A0D700F905B6 /* BaseUseCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 280F99782B62A0D700F905B6 /* BaseUseCase.swift */; }; + 280F99832B62A0D700F905B6 /* BaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 280F99792B62A0D700F905B6 /* BaseViewController.swift */; }; + 280F99842B62A0D700F905B6 /* BaseViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 280F997A2B62A0D700F905B6 /* BaseViewModel.swift */; }; + 280F99852B62A0D700F905B6 /* BaseRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 280F997B2B62A0D700F905B6 /* BaseRouter.swift */; }; + 280F99862B62A0D700F905B6 /* BaseMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 280F997C2B62A0D700F905B6 /* BaseMapper.swift */; }; + 280F99872B62A0D700F905B6 /* CleanArchKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 280F997D2B62A0D700F905B6 /* CleanArchKit.h */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -34,20 +34,20 @@ /* Begin PBXFileReference section */ 2525941929F18B290007F0D1 /* RxSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = RxSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 2525942D29F27DE30007F0D1 /* MockMapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockMapper.swift; sourceTree = ""; }; 256205FC29E5A2CB00896F1C /* CleanArchKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CleanArchKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 256205FF29E5A2CB00896F1C /* CleanArchKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CleanArchKit.h; sourceTree = ""; }; 2562060429E5A2CB00896F1C /* CleanArchKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CleanArchKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 2562060929E5A2CB00896F1C /* CleanArchKitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CleanArchKitTests.swift; sourceTree = ""; }; - 2562063629E5A55D00896F1C /* ViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewModelProtocol.swift; sourceTree = ""; }; - 2562063829E5A58A00896F1C /* BaseViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseViewModel.swift; sourceTree = ""; }; - 2562063A29E5A5D000896F1C /* ViewControllerProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewControllerProtocol.swift; sourceTree = ""; }; - 2562063C29E5A5E100896F1C /* DIProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DIProtocol.swift; sourceTree = ""; }; - 2562063E29E5A5F300896F1C /* BaseViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseViewController.swift; sourceTree = ""; }; - 2562064029E5A61800896F1C /* Router.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Router.swift; sourceTree = ""; }; - 2562064229E5A64700896F1C /* BaseRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseRouter.swift; sourceTree = ""; }; - 25C293D629E6A0830062AE27 /* BaseUseCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseUseCase.swift; sourceTree = ""; }; - 25C293D829E6A0BD0062AE27 /* BaseMapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseMapper.swift; sourceTree = ""; }; + 280F996B2B629F7700F905B6 /* CleanArchKitTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CleanArchKitTests.swift; path = ../../Tests/CleanArchKitTests/CleanArchKitTests.swift; sourceTree = ""; }; + 280F99702B62A0A100F905B6 /* MockMapper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockMapper.swift; sourceTree = ""; }; + 280F99732B62A0D700F905B6 /* ViewControllerProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewControllerProtocol.swift; sourceTree = ""; }; + 280F99742B62A0D700F905B6 /* ViewModelProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewModelProtocol.swift; sourceTree = ""; }; + 280F99752B62A0D700F905B6 /* Router.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Router.swift; sourceTree = ""; }; + 280F99762B62A0D700F905B6 /* DIProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DIProtocol.swift; sourceTree = ""; }; + 280F99782B62A0D700F905B6 /* BaseUseCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseUseCase.swift; sourceTree = ""; }; + 280F99792B62A0D700F905B6 /* BaseViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseViewController.swift; sourceTree = ""; }; + 280F997A2B62A0D700F905B6 /* BaseViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseViewModel.swift; sourceTree = ""; }; + 280F997B2B62A0D700F905B6 /* BaseRouter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseRouter.swift; sourceTree = ""; }; + 280F997C2B62A0D700F905B6 /* BaseMapper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseMapper.swift; sourceTree = ""; }; + 280F997D2B62A0D700F905B6 /* CleanArchKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CleanArchKit.h; path = ../../Sources/CleanArchKit/CleanArchKit.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -69,14 +69,6 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 2525942C29F27DCC0007F0D1 /* Mock */ = { - isa = PBXGroup; - children = ( - 2525942D29F27DE30007F0D1 /* MockMapper.swift */, - ); - path = Mock; - sourceTree = ""; - }; 256205F229E5A2CB00896F1C = { isa = PBXGroup; children = ( @@ -99,9 +91,9 @@ 256205FE29E5A2CB00896F1C /* CleanArchKit */ = { isa = PBXGroup; children = ( - 256205FF29E5A2CB00896F1C /* CleanArchKit.h */, - 2562063429E5A4E400896F1C /* Protocol */, - 2562063529E5A4F400896F1C /* Base */, + 280F99772B62A0D700F905B6 /* Base */, + 280F997D2B62A0D700F905B6 /* CleanArchKit.h */, + 280F99722B62A0D700F905B6 /* Protocol */, ); path = CleanArchKit; sourceTree = ""; @@ -109,41 +101,52 @@ 2562060829E5A2CB00896F1C /* CleanArchKitTests */ = { isa = PBXGroup; children = ( - 2525942C29F27DCC0007F0D1 /* Mock */, - 2562060929E5A2CB00896F1C /* CleanArchKitTests.swift */, + 280F996B2B629F7700F905B6 /* CleanArchKitTests.swift */, + 280F996F2B62A09200F905B6 /* Mocks */, ); path = CleanArchKitTests; sourceTree = ""; }; - 2562063429E5A4E400896F1C /* Protocol */ = { + 2562064429E5A6B100896F1C /* Frameworks */ = { isa = PBXGroup; children = ( - 2562063629E5A55D00896F1C /* ViewModelProtocol.swift */, - 2562063A29E5A5D000896F1C /* ViewControllerProtocol.swift */, - 2562063C29E5A5E100896F1C /* DIProtocol.swift */, - 2562064029E5A61800896F1C /* Router.swift */, + 2525941929F18B290007F0D1 /* RxSwift.framework */, ); - path = Protocol; + name = Frameworks; sourceTree = ""; }; - 2562063529E5A4F400896F1C /* Base */ = { + 280F996F2B62A09200F905B6 /* Mocks */ = { isa = PBXGroup; children = ( - 2562063829E5A58A00896F1C /* BaseViewModel.swift */, - 2562063E29E5A5F300896F1C /* BaseViewController.swift */, - 2562064229E5A64700896F1C /* BaseRouter.swift */, - 25C293D629E6A0830062AE27 /* BaseUseCase.swift */, - 25C293D829E6A0BD0062AE27 /* BaseMapper.swift */, + 280F99702B62A0A100F905B6 /* MockMapper.swift */, ); - path = Base; + name = Mocks; + path = ../../Tests/CleanArchKitTests/Mocks; sourceTree = ""; }; - 2562064429E5A6B100896F1C /* Frameworks */ = { + 280F99722B62A0D700F905B6 /* Protocol */ = { isa = PBXGroup; children = ( - 2525941929F18B290007F0D1 /* RxSwift.framework */, + 280F99732B62A0D700F905B6 /* ViewControllerProtocol.swift */, + 280F99742B62A0D700F905B6 /* ViewModelProtocol.swift */, + 280F99752B62A0D700F905B6 /* Router.swift */, + 280F99762B62A0D700F905B6 /* DIProtocol.swift */, ); - name = Frameworks; + name = Protocol; + path = ../../Sources/CleanArchKit/Protocol; + sourceTree = ""; + }; + 280F99772B62A0D700F905B6 /* Base */ = { + isa = PBXGroup; + children = ( + 280F99782B62A0D700F905B6 /* BaseUseCase.swift */, + 280F99792B62A0D700F905B6 /* BaseViewController.swift */, + 280F997A2B62A0D700F905B6 /* BaseViewModel.swift */, + 280F997B2B62A0D700F905B6 /* BaseRouter.swift */, + 280F997C2B62A0D700F905B6 /* BaseMapper.swift */, + ); + name = Base; + path = ../../Sources/CleanArchKit/Base; sourceTree = ""; }; /* End PBXGroup section */ @@ -153,7 +156,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 2562060B29E5A2CB00896F1C /* CleanArchKit.h in Headers */, + 280F99872B62A0D700F905B6 /* CleanArchKit.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -212,6 +215,7 @@ }; 2562060329E5A2CB00896F1C = { CreatedOnToolsVersion = 14.2; + LastSwiftMigration = 1520; }; }; }; @@ -256,15 +260,15 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 25C293D729E6A0830062AE27 /* BaseUseCase.swift in Sources */, - 2562063F29E5A5F300896F1C /* BaseViewController.swift in Sources */, - 2562063B29E5A5D000896F1C /* ViewControllerProtocol.swift in Sources */, - 2562064329E5A64700896F1C /* BaseRouter.swift in Sources */, - 2562063729E5A55D00896F1C /* ViewModelProtocol.swift in Sources */, - 2562063D29E5A5E100896F1C /* DIProtocol.swift in Sources */, - 25C293D929E6A0BD0062AE27 /* BaseMapper.swift in Sources */, - 2562064129E5A61800896F1C /* Router.swift in Sources */, - 2562063929E5A58A00896F1C /* BaseViewModel.swift in Sources */, + 280F997F2B62A0D700F905B6 /* ViewModelProtocol.swift in Sources */, + 280F99802B62A0D700F905B6 /* Router.swift in Sources */, + 280F99812B62A0D700F905B6 /* DIProtocol.swift in Sources */, + 280F99842B62A0D700F905B6 /* BaseViewModel.swift in Sources */, + 280F99822B62A0D700F905B6 /* BaseUseCase.swift in Sources */, + 280F997E2B62A0D700F905B6 /* ViewControllerProtocol.swift in Sources */, + 280F99862B62A0D700F905B6 /* BaseMapper.swift in Sources */, + 280F99832B62A0D700F905B6 /* BaseViewController.swift in Sources */, + 280F99852B62A0D700F905B6 /* BaseRouter.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -272,8 +276,8 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2525942E29F27DE30007F0D1 /* MockMapper.swift in Sources */, - 2562060A29E5A2CB00896F1C /* CleanArchKitTests.swift in Sources */, + 280F99712B62A0A100F905B6 /* MockMapper.swift in Sources */, + 280F996D2B629F7700F905B6 /* CleanArchKitTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -339,7 +343,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 16.2; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -396,7 +400,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 16.2; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; @@ -424,7 +428,7 @@ HEADER_SEARCH_PATHS = ""; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = com.kangama.CleanArchKit; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; @@ -452,7 +456,7 @@ GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = com.kangama.CleanArchKit; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; @@ -469,17 +473,19 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = FEV8Q8DHKC; FRAMEWORK_SEARCH_PATHS = ""; GENERATE_INFOPLIST_FILE = YES; HEADER_SEARCH_PATHS = ""; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = com.kangama.CleanArchKitTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; @@ -489,13 +495,14 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = FEV8Q8DHKC; FRAMEWORK_SEARCH_PATHS = ""; GENERATE_INFOPLIST_FILE = YES; HEADER_SEARCH_PATHS = ""; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = com.kangama.CleanArchKitTests; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/CleanArchKitWorkspace.xcworkspace/contents.xcworkspacedata b/CleanArchKitWorkspace.xcworkspace/contents.xcworkspacedata index 0f19bf4..78b2790 100644 --- a/CleanArchKitWorkspace.xcworkspace/contents.xcworkspacedata +++ b/CleanArchKitWorkspace.xcworkspace/contents.xcworkspacedata @@ -20,6 +20,9 @@ + + diff --git a/Example/CleanArchKitExample.xcodeproj/project.pbxproj b/Example/CleanArchKitExample.xcodeproj/project.pbxproj index 7603306..c4b3de0 100644 --- a/Example/CleanArchKitExample.xcodeproj/project.pbxproj +++ b/Example/CleanArchKitExample.xcodeproj/project.pbxproj @@ -634,7 +634,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 16.2; + IPHONEOS_DEPLOYMENT_TARGET = 16.4; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -688,7 +688,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 16.2; + IPHONEOS_DEPLOYMENT_TARGET = 16.4; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; @@ -714,6 +714,7 @@ INFOPLIST_KEY_UIMainStoryboardFile = Main; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 16.4; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -743,6 +744,7 @@ INFOPLIST_KEY_UIMainStoryboardFile = Main; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 16.4; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..1b08fc3 --- /dev/null +++ b/Package.swift @@ -0,0 +1,23 @@ +// swift-tools-version: 5.4 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "CleanArchKit", + platforms: [ + .iOS(.v12) + ], + products: [ + .library( + name: "CleanArchKit", + targets: ["CleanArchKit"]), + ], + targets: [ + .target( + name: "CleanArchKit"), + .testTarget( + name: "CleanArchKitTests", + dependencies: ["CleanArchKit"]), + ] +) diff --git a/Podfile.lock b/Podfile.lock index f539b8b..858e5a3 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -28,4 +28,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 0379424d1a27e9a926255062c7d08b9ce3a023f8 -COCOAPODS: 1.12.1 +COCOAPODS: 1.14.3 diff --git a/README.md b/README.md index 3e9fd34..ba5b3b4 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,14 @@ CleanArchKit is an iOS framework developed in Swift that implements Clean Archit CleanArchKit requires the following: * Xcode 11.0 or later -* Swift 5.0 or later -* iOS 11.0 or later +* Swift 5.4 or later +* iOS 12.0 or later ## Installation +### CocoaPods + To install this framework using [CocoaPods](https://cocoapods.org), add the following line to your Podfile: ```ruby @@ -22,6 +24,12 @@ pod 'CleanArchKit' Then run `pod install` in your terminal. +### Swift Package Manager + +1. In Xcode, navigate in menu: File > Add Package Dependencies +2. Add `https://github.com/k-angama/iOS-CleanArchKit.git` +3. Click Add Package. + ## Usage diff --git a/CleanArchKit/CleanArchKit/Base/BaseMapper.swift b/Sources/CleanArchKit/Base/BaseMapper.swift similarity index 100% rename from CleanArchKit/CleanArchKit/Base/BaseMapper.swift rename to Sources/CleanArchKit/Base/BaseMapper.swift diff --git a/CleanArchKit/CleanArchKit/Base/BaseRouter.swift b/Sources/CleanArchKit/Base/BaseRouter.swift similarity index 100% rename from CleanArchKit/CleanArchKit/Base/BaseRouter.swift rename to Sources/CleanArchKit/Base/BaseRouter.swift diff --git a/CleanArchKit/CleanArchKit/Base/BaseUseCase.swift b/Sources/CleanArchKit/Base/BaseUseCase.swift similarity index 100% rename from CleanArchKit/CleanArchKit/Base/BaseUseCase.swift rename to Sources/CleanArchKit/Base/BaseUseCase.swift diff --git a/CleanArchKit/CleanArchKit/Base/BaseViewController.swift b/Sources/CleanArchKit/Base/BaseViewController.swift similarity index 100% rename from CleanArchKit/CleanArchKit/Base/BaseViewController.swift rename to Sources/CleanArchKit/Base/BaseViewController.swift diff --git a/CleanArchKit/CleanArchKit/Base/BaseViewModel.swift b/Sources/CleanArchKit/Base/BaseViewModel.swift similarity index 100% rename from CleanArchKit/CleanArchKit/Base/BaseViewModel.swift rename to Sources/CleanArchKit/Base/BaseViewModel.swift diff --git a/CleanArchKit/CleanArchKit/CleanArchKit.h b/Sources/CleanArchKit/CleanArchKit.h similarity index 100% rename from CleanArchKit/CleanArchKit/CleanArchKit.h rename to Sources/CleanArchKit/CleanArchKit.h diff --git a/CleanArchKit/CleanArchKit/Protocol/DIProtocol.swift b/Sources/CleanArchKit/Protocol/DIProtocol.swift similarity index 100% rename from CleanArchKit/CleanArchKit/Protocol/DIProtocol.swift rename to Sources/CleanArchKit/Protocol/DIProtocol.swift diff --git a/CleanArchKit/CleanArchKit/Protocol/Router.swift b/Sources/CleanArchKit/Protocol/Router.swift similarity index 100% rename from CleanArchKit/CleanArchKit/Protocol/Router.swift rename to Sources/CleanArchKit/Protocol/Router.swift diff --git a/CleanArchKit/CleanArchKit/Protocol/ViewControllerProtocol.swift b/Sources/CleanArchKit/Protocol/ViewControllerProtocol.swift similarity index 100% rename from CleanArchKit/CleanArchKit/Protocol/ViewControllerProtocol.swift rename to Sources/CleanArchKit/Protocol/ViewControllerProtocol.swift diff --git a/CleanArchKit/CleanArchKit/Protocol/ViewModelProtocol.swift b/Sources/CleanArchKit/Protocol/ViewModelProtocol.swift similarity index 100% rename from CleanArchKit/CleanArchKit/Protocol/ViewModelProtocol.swift rename to Sources/CleanArchKit/Protocol/ViewModelProtocol.swift diff --git a/Tests/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/Tests/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Tests/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/CleanArchKit/CleanArchKitTests/CleanArchKitTests.swift b/Tests/CleanArchKitTests/CleanArchKitTests.swift similarity index 100% rename from CleanArchKit/CleanArchKitTests/CleanArchKitTests.swift rename to Tests/CleanArchKitTests/CleanArchKitTests.swift diff --git a/CleanArchKit/CleanArchKitTests/Mock/MockMapper.swift b/Tests/CleanArchKitTests/Mocks/MockMapper.swift similarity index 100% rename from CleanArchKit/CleanArchKitTests/Mock/MockMapper.swift rename to Tests/CleanArchKitTests/Mocks/MockMapper.swift diff --git a/Tests/Package.swift b/Tests/Package.swift new file mode 100644 index 0000000..71fb4ca --- /dev/null +++ b/Tests/Package.swift @@ -0,0 +1,23 @@ +// swift-tools-version: 5.9 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "CleanArchKit", + products: [ + // Products define the executables and libraries a package produces, making them visible to other packages. + .library( + name: "CleanArchKit", + targets: ["CleanArchKit"]), + ], + targets: [ + // Targets are the basic building blocks of a package, defining a module or a test suite. + // Targets can depend on other targets in this package and products from dependencies. + .target( + name: "CleanArchKit"), + .testTarget( + name: "CleanArchKitTests", + dependencies: ["CleanArchKit"]), + ] +) diff --git a/Tests/Sources/CleanArchKit/CleanArchKit.swift b/Tests/Sources/CleanArchKit/CleanArchKit.swift new file mode 100644 index 0000000..08b22b8 --- /dev/null +++ b/Tests/Sources/CleanArchKit/CleanArchKit.swift @@ -0,0 +1,2 @@ +// The Swift Programming Language +// https://docs.swift.org/swift-book