diff --git a/.swift-version b/.swift-version index 8012ebb..6e63660 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -4.2 \ No newline at end of file +5.0 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 28ef13b..be57273 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,10 @@ os: - osx language: generic -osx_image: xcode10 +osx_image: xcode10.2 script: # - xcrun instruments -t 'Blank' -l 10 -w "iPhone 6s (10.3)" - - xcodebuild -scheme Example -configuration Debug -sdk iphonesimulator12.0 -destination "OS=12.0,name=iPhone 6s" build - - xcodebuild -scheme TABResourceLoader -configuration Debug -sdk iphonesimulator12.0 -destination "OS=12.0,name=iPhone 6s" test -enableCodeCoverage YES + - xcodebuild -scheme Example -configuration Debug -sdk iphonesimulator12.2 -destination "OS=12.2,name=iPhone Xs" build + - xcodebuild -scheme TABResourceLoader -configuration Debug -sdk iphonesimulator12.2 -destination "OS=12.2,name=iPhone Xs" test -enableCodeCoverage YES after_success: - bash <(curl -s https://codecov.io/bash) \ No newline at end of file diff --git a/Sources/TABResourceLoader/Extensions/CharacterSet+Additions.swift b/Sources/TABResourceLoader/Extensions/CharacterSet+Additions.swift index c86c8d2..a523f1e 100644 --- a/Sources/TABResourceLoader/Extensions/CharacterSet+Additions.swift +++ b/Sources/TABResourceLoader/Extensions/CharacterSet+Additions.swift @@ -29,7 +29,7 @@ import Foundation public extension CharacterSet { - public static var improvedUrlQueryAllowed: CharacterSet { + static var improvedUrlQueryAllowed: CharacterSet { var characterSet = CharacterSet.urlQueryAllowed characterSet.remove("&") characterSet.remove("=") diff --git a/Sources/TABResourceLoader/Protocols/Resource types/NetworkResourceType.swift b/Sources/TABResourceLoader/Protocols/Resource types/NetworkResourceType.swift index 61aceef..ac0c95a 100644 --- a/Sources/TABResourceLoader/Protocols/Resource types/NetworkResourceType.swift +++ b/Sources/TABResourceLoader/Protocols/Resource types/NetworkResourceType.swift @@ -79,16 +79,16 @@ public extension NetworkResourceType { // MARK: Public properties - public var httpRequestMethod: HTTPMethod { return .get } - public var httpHeaderFields: [String: String]? { return [:] } - public var jsonBody: Any? { return nil } - public var queryItems: [URLQueryItem]? { return nil } - public var requestTimeoutInterval: TimeInterval? { return nil } - public var urlQueryAllowedCharacterSet: CharacterSet { return .improvedUrlQueryAllowed } + var httpRequestMethod: HTTPMethod { return .get } + var httpHeaderFields: [String: String]? { return [:] } + var jsonBody: Any? { return nil } + var queryItems: [URLQueryItem]? { return nil } + var requestTimeoutInterval: TimeInterval? { return nil } + var urlQueryAllowedCharacterSet: CharacterSet { return .improvedUrlQueryAllowed } // MARK: Public functions - public func urlRequest() -> URLRequest? { + func urlRequest() -> URLRequest? { guard let urlComponents = createURLComponents(), let urlFromComponents = urlComponents.url else { return nil } diff --git a/TABResourceLoader.podspec b/TABResourceLoader.podspec index bd2e9d5..94dcefa 100644 --- a/TABResourceLoader.podspec +++ b/TABResourceLoader.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |spec| spec.name = 'TABResourceLoader' spec.homepage = 'https://github.com/theappbusiness/TABResourceLoader' - spec.version = '8.1.0' + spec.version = '8.2.0' spec.license = { :type => 'MIT' } spec.authors = { 'Luciano Marisi' => 'luciano@techbrewers.com' } spec.summary = 'Framework for loading resources from a network service' @@ -11,5 +11,5 @@ Pod::Spec.new do |spec| } spec.source_files = 'Sources/**/*.swift' spec.ios.deployment_target = '8.0' - spec.swift_version = '4.2' + spec.swift_version = '5.0' end diff --git a/TABResourceLoader.xcodeproj/project.pbxproj b/TABResourceLoader.xcodeproj/project.pbxproj index 84adeb7..3b469da 100644 --- a/TABResourceLoader.xcodeproj/project.pbxproj +++ b/TABResourceLoader.xcodeproj/project.pbxproj @@ -606,16 +606,16 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 0900; + LastUpgradeCheck = 1020; ORGANIZATIONNAME = "Luciano Marisi"; TargetAttributes = { 4F079CCE1D84559100D08DA0 = { CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 0900; + LastSwiftMigration = 1020; }; 4F079CD81D84559200D08DA0 = { CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = ""; + LastSwiftMigration = 1020; }; 4F8D1FB91D8DFFD30099DD9A = { CreatedOnToolsVersion = 8.0; @@ -628,6 +628,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, Base, ); @@ -828,12 +829,14 @@ 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_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; @@ -866,6 +869,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -885,12 +889,14 @@ 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_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; @@ -916,6 +922,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -937,9 +944,8 @@ PRODUCT_BUNDLE_IDENTIFIER = com.lucianomarisi.TABResourceLoader; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_TREAT_WARNINGS_AS_ERRORS = YES; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -957,9 +963,8 @@ PRODUCT_BUNDLE_IDENTIFIER = com.lucianomarisi.TABResourceLoader; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_TREAT_WARNINGS_AS_ERRORS = YES; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -970,8 +975,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.lucianomarisi.TABResourceLoaderTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -982,8 +986,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.lucianomarisi.TABResourceLoaderTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -1000,7 +1003,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.lucianomarisi.Example; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -1016,7 +1019,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.lucianomarisi.Example; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/TABResourceLoader.xcodeproj/xcshareddata/xcschemes/Example.xcscheme b/TABResourceLoader.xcodeproj/xcshareddata/xcschemes/Example.xcscheme index 1213079..fb8f2a0 100644 --- a/TABResourceLoader.xcodeproj/xcshareddata/xcschemes/Example.xcscheme +++ b/TABResourceLoader.xcodeproj/xcshareddata/xcschemes/Example.xcscheme @@ -1,6 +1,6 @@ @@ -46,7 +45,6 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/TABResourceLoader.xcodeproj/xcshareddata/xcschemes/TABResourceLoader.xcscheme b/TABResourceLoader.xcodeproj/xcshareddata/xcschemes/TABResourceLoader.xcscheme index 1e4ce6f..ee5bad9 100644 --- a/TABResourceLoader.xcodeproj/xcshareddata/xcschemes/TABResourceLoader.xcscheme +++ b/TABResourceLoader.xcodeproj/xcshareddata/xcschemes/TABResourceLoader.xcscheme @@ -1,6 +1,6 @@ + codeCoverageEnabled = "YES" + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -57,7 +56,6 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO"