diff --git a/CodeBase.xcodeproj/project.pbxproj b/CodeBase.xcodeproj/project.pbxproj index 2ae0a77..4894c29 100644 --- a/CodeBase.xcodeproj/project.pbxproj +++ b/CodeBase.xcodeproj/project.pbxproj @@ -400,18 +400,18 @@ 861D1FE31F6F45AB006DEFA0 = { CreatedOnToolsVersion = 8.3.3; DevelopmentTeam = UTAKMP8X5D; - LastSwiftMigration = 0900; + LastSwiftMigration = 1200; ProvisioningStyle = Automatic; }; 861D1FF71F6F45AB006DEFA0 = { CreatedOnToolsVersion = 8.3.3; - LastSwiftMigration = 0900; + LastSwiftMigration = 1200; ProvisioningStyle = Automatic; TestTargetID = 861D1FE31F6F45AB006DEFA0; }; 861D20021F6F45AB006DEFA0 = { CreatedOnToolsVersion = 8.3.3; - LastSwiftMigration = 0900; + LastSwiftMigration = 1200; ProvisioningStyle = Automatic; TestTargetID = 861D1FE31F6F45AB006DEFA0; }; @@ -422,6 +422,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, Base, ); @@ -528,7 +529,7 @@ files = ( ); inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-CodeBase/Pods-CodeBase-frameworks.sh", + "${PODS_ROOT}/Target Support Files/Pods-CodeBase/Pods-CodeBase-frameworks.sh", "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework", "${BUILT_PRODUCTS_DIR}/Moya/Moya.framework", @@ -559,7 +560,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CodeBase/Pods-CodeBase-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CodeBase/Pods-CodeBase-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -751,7 +752,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.github.CodeBase; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -767,7 +768,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.github.CodeBase; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -782,7 +783,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.github.CodeBaseTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CodeBase.app/CodeBase"; }; name = Debug; @@ -798,7 +799,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.github.CodeBaseTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CodeBase.app/CodeBase"; }; name = Release; @@ -813,7 +814,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.github.CodeBaseUITests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TEST_TARGET_NAME = CodeBase; }; name = Debug; @@ -828,7 +829,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.github.CodeBaseUITests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TEST_TARGET_NAME = CodeBase; }; name = Release; diff --git a/CodeBase/AppDelegate.swift b/CodeBase/AppDelegate.swift index 81a5509..40e7b3b 100644 --- a/CodeBase/AppDelegate.swift +++ b/CodeBase/AppDelegate.swift @@ -18,7 +18,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { setupAppearance() // Log config @@ -35,14 +35,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate { UINavigationBar.appearance().barTintColor = UIColor.navbar UINavigationBar.appearance().tintColor = UIColor.white UINavigationBar.appearance().titleTextAttributes = [ - NSAttributedStringKey.foregroundColor : UIColor.white, - NSAttributedStringKey.font: UIFont.medium(size: 16) + NSAttributedString.Key.foregroundColor : UIColor.white, + NSAttributedString.Key.font: UIFont.medium(size: 16) ] UIBarButtonItem.appearance().setTitleTextAttributes([ - NSAttributedStringKey.foregroundColor : UIColor.white, - NSAttributedStringKey.font: UIFont.medium(size: 14) - ], for: UIControlState()) + NSAttributedString.Key.foregroundColor : UIColor.white, + NSAttributedString.Key.font: UIFont.medium(size: 14) + ], for: UIControl.State()) } diff --git a/CodeBase/DefaultsKey.swift b/CodeBase/DefaultsKey.swift index 312ea8c..51f0620 100644 --- a/CodeBase/DefaultsKey.swift +++ b/CodeBase/DefaultsKey.swift @@ -9,6 +9,6 @@ import SwiftyUserDefaults extension DefaultsKeys { - static let authToken = DefaultsKey("authToken") - static let username = DefaultsKey("username") + static let authToken = DefaultsKey.init("authToken") + static let username = DefaultsKey.init("username", defaultValue: "") } diff --git a/CodeBase/GithubAPIService.swift b/CodeBase/GithubAPIService.swift index de58626..bc2cb6a 100644 --- a/CodeBase/GithubAPIService.swift +++ b/CodeBase/GithubAPIService.swift @@ -21,10 +21,10 @@ let moyaProvider = MoyaProvider() enum GithubAPIService { case auth(username: String, password: String) - case getUsers() + case getUsers case getUser(username: String) case search(keyword: String, sortBy: String?, orderBy: String?) - case getRepositories() + case getRepositories } diff --git a/CodeBase/RepoView.swift b/CodeBase/RepoView.swift index 984012a..f185996 100644 --- a/CodeBase/RepoView.swift +++ b/CodeBase/RepoView.swift @@ -47,7 +47,7 @@ class RepoView: UIViewController { // setup tableview tableView.estimatedRowHeight = RepoListViewCell.rowHeight - tableView.rowHeight = UITableViewAutomaticDimension + tableView.rowHeight = UITableView.automaticDimension tableView.backgroundColor = .clear tableView.dataSource = self tableView.delegate = self diff --git a/CodeBase/RepositoryService.swift b/CodeBase/RepositoryService.swift index 7d3a1c4..7587554 100644 --- a/CodeBase/RepositoryService.swift +++ b/CodeBase/RepositoryService.swift @@ -15,7 +15,7 @@ class ReposityService { static func getData(callback:@escaping (Bool, [Repo]?, String?) -> Void) { moyaProvider.rx - .request(GithubAPIService.getRepositories()) + .request(GithubAPIService.getRepositories) .subscribe { event in switch event { diff --git a/CodeBase/UIColor.swift b/CodeBase/UIColor.swift index 87cb970..42d2915 100644 --- a/CodeBase/UIColor.swift +++ b/CodeBase/UIColor.swift @@ -20,7 +20,7 @@ extension UIColor { var int = UInt32() Scanner(string: hex).scanHexInt32(&int) let a, r, g, b: UInt32 - switch hex.characters.count { + switch hex.count { case 3: // RGB (12-bit) (a, r, g, b) = (255, (int >> 8) * 17, (int >> 4 & 0xF) * 17, (int & 0xF) * 17) case 6: // RGB (24-bit) diff --git a/CodeBase/UserService.swift b/CodeBase/UserService.swift index 485f414..bdb6454 100644 --- a/CodeBase/UserService.swift +++ b/CodeBase/UserService.swift @@ -15,7 +15,7 @@ class UserService { static func getUsers(callback:@escaping (Bool, [User]?, String?) -> Void) { moyaProvider.rx - .request(GithubAPIService.getUsers()) + .request(GithubAPIService.getUsers) .subscribe { event in switch event { diff --git a/Podfile.lock b/Podfile.lock index 387c21d..9026985 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,6 +1,6 @@ PODS: - - Alamofire (4.7.3) - - IQKeyboardManagerSwift (6.2.0) + - Alamofire (4.9.1) + - IQKeyboardManagerSwift (6.5.6) - Moya/Core (11.0.2): - Alamofire (~> 4.1) - Result (~> 3.0) @@ -10,16 +10,16 @@ PODS: - ObjcExceptionBridging (1.0.1): - ObjcExceptionBridging/ObjcExceptionBridging (= 1.0.1) - ObjcExceptionBridging/ObjcExceptionBridging (1.0.1) - - ObjectMapper (3.3.0) + - ObjectMapper (3.5.3) - Result (3.2.4) - - RxCocoa (4.3.1): - - RxSwift (~> 4.0) - - RxSwift (4.3.1) - - SDWebImage (4.4.2): - - SDWebImage/Core (= 4.4.2) - - SDWebImage/Core (4.4.2) - - SwiftyJSON (4.2.0) - - SwiftyUserDefaults (3.0.1) + - RxCocoa (4.5.0): + - RxSwift (>= 4.4.2, ~> 4.4) + - RxSwift (4.5.0) + - SDWebImage (5.12.0): + - SDWebImage/Core (= 5.12.0) + - SDWebImage/Core (5.12.0) + - SwiftyJSON (5.0.1) + - SwiftyUserDefaults (5.3.0) - XCGLogger (6.1.0): - XCGLogger/Core (= 6.1.0) - XCGLogger/Core (6.1.0): @@ -37,7 +37,7 @@ DEPENDENCIES: - XCGLogger (~> 6.1.0) SPEC REPOS: - https://github.com/cocoapods/specs.git: + trunk: - Alamofire - IQKeyboardManagerSwift - Moya @@ -52,19 +52,19 @@ SPEC REPOS: - XCGLogger SPEC CHECKSUMS: - Alamofire: c7287b6e5d7da964a70935e5db17046b7fde6568 - IQKeyboardManagerSwift: b07ccf9d8cafe993dcd6cb794eb4ba34611a0c4e + Alamofire: 85e8a02c69d6020a0d734f6054870d7ecb75cf18 + IQKeyboardManagerSwift: c7df9d2deb356c04522f5c4b7b6e4ce4d8ed94fe Moya: a725035953bc1c0eb1be505ab903984501d82440 ObjcExceptionBridging: c30e00eb3700467e695faeea30e26e18bd445001 - ObjectMapper: b612bf8c8e99c4dc0bb6013a51f7c27966ed5da9 + ObjectMapper: 97111c97e054a6ee25917662106689f0b4127b37 Result: d2d07204ce72856f1fd9130bbe42c35a7b0fea10 - RxCocoa: 78763c7b07d02455598d9fc3c1ad091a28b73635 - RxSwift: fe0fd770a43acdb7d0a53da411c9b892e69bb6e4 - SDWebImage: 624d6e296c69b244bcede364c72ae0430ac14681 - SwiftyJSON: c4bcba26dd9ec7a027fc8eade48e2c911f229e96 - SwiftyUserDefaults: 3d273b1739b68ada3145dc754a70ec775bc5c8be + RxCocoa: cbf70265dc65a981d4ac982e513c10cf23df24a0 + RxSwift: f172070dfd1a93d70a9ab97a5a01166206e1c575 + SDWebImage: 4ea20cca2986adc5aacde07aa686742fd4c67a37 + SwiftyJSON: 2f33a42c6fbc52764d96f13368585094bfd8aa5e + SwiftyUserDefaults: 63f80248cf5bfb3458825d9a78f2eb7e1293a040 XCGLogger: 7f7f43f15dfe3a305fa1342b7dc29af656289abd PODFILE CHECKSUM: d27ff6773787fba450a481164324599942fff50b -COCOAPODS: 1.5.3 +COCOAPODS: 1.10.1