From 379bb0e31b2d4c7bc84535ff482ab146234166c8 Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Tue, 23 Apr 2019 16:10:31 -0500 Subject: [PATCH 01/20] Commit recommended project changes to Xcode --- WordPressShared.xcodeproj/project.pbxproj | 6 +++++- .../xcshareddata/xcschemes/WordPressShared.xcscheme | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/WordPressShared.xcodeproj/project.pbxproj b/WordPressShared.xcodeproj/project.pbxproj index bcb660b..0e7128b 100644 --- a/WordPressShared.xcodeproj/project.pbxproj +++ b/WordPressShared.xcodeproj/project.pbxproj @@ -501,7 +501,7 @@ 829DD1351EC9EED200AB8C12 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0930; + LastUpgradeCheck = 1020; TargetAttributes = { 829DD13D1EC9EED200AB8C12 = { CreatedOnToolsVersion = 8.3; @@ -704,6 +704,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; @@ -800,6 +801,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; @@ -896,6 +898,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; @@ -957,6 +960,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; diff --git a/WordPressShared.xcodeproj/xcshareddata/xcschemes/WordPressShared.xcscheme b/WordPressShared.xcodeproj/xcshareddata/xcschemes/WordPressShared.xcscheme index ebeb9f6..fe00293 100644 --- a/WordPressShared.xcodeproj/xcshareddata/xcschemes/WordPressShared.xcscheme +++ b/WordPressShared.xcodeproj/xcshareddata/xcschemes/WordPressShared.xcscheme @@ -1,6 +1,6 @@ Date: Tue, 23 Apr 2019 16:12:22 -0500 Subject: [PATCH 02/20] Automatic Swift 5 conversion --- WordPressShared.xcodeproj/project.pbxproj | 20 +++++++++---------- .../Core/Logging/CocoaLumberjack.swift | 10 +++++----- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/WordPressShared.xcodeproj/project.pbxproj b/WordPressShared.xcodeproj/project.pbxproj index 0e7128b..349ed6b 100644 --- a/WordPressShared.xcodeproj/project.pbxproj +++ b/WordPressShared.xcodeproj/project.pbxproj @@ -505,12 +505,12 @@ TargetAttributes = { 829DD13D1EC9EED200AB8C12 = { CreatedOnToolsVersion = 8.3; - LastSwiftMigration = 0910; + LastSwiftMigration = 1020; ProvisioningStyle = Automatic; }; 829DD1461EC9EED200AB8C12 = { CreatedOnToolsVersion = 8.3; - LastSwiftMigration = 1000; + LastSwiftMigration = 1020; ProvisioningStyle = Automatic; }; }; @@ -777,7 +777,7 @@ PRODUCT_BUNDLE_IDENTIFIER = org.wordpress.WordPressShared; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = "Release-Internal"; }; @@ -793,7 +793,7 @@ PRODUCT_BUNDLE_IDENTIFIER = org.wordpress.WordPressSharedTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "WordPressSharedTests/WordPressSharedTests-Bridging-Header.h"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = "Release-Internal"; }; @@ -874,7 +874,7 @@ PRODUCT_BUNDLE_IDENTIFIER = org.wordpress.WordPressShared; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = "Release-Alpha"; }; @@ -890,7 +890,7 @@ PRODUCT_BUNDLE_IDENTIFIER = org.wordpress.WordPressSharedTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "WordPressSharedTests/WordPressSharedTests-Bridging-Header.h"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = "Release-Alpha"; }; @@ -1034,7 +1034,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -1058,7 +1058,7 @@ PRODUCT_BUNDLE_IDENTIFIER = org.wordpress.WordPressShared; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -1075,7 +1075,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "WordPressSharedTests/WordPressSharedTests-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -1091,7 +1091,7 @@ PRODUCT_BUNDLE_IDENTIFIER = org.wordpress.WordPressSharedTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "WordPressSharedTests/WordPressSharedTests-Bridging-Header.h"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/WordPressShared/Core/Logging/CocoaLumberjack.swift b/WordPressShared/Core/Logging/CocoaLumberjack.swift index 7ee1e9c..d11ce0a 100644 --- a/WordPressShared/Core/Logging/CocoaLumberjack.swift +++ b/WordPressShared/Core/Logging/CocoaLumberjack.swift @@ -68,23 +68,23 @@ public func _DDLogMessage(_ message: @autoclosure () -> String, level: DDLogLeve } public func DDLogDebug(_ message: @autoclosure () -> String, level: DDLogLevel = defaultDebugLevel, context: Int = 0, file: StaticString = #file, function: StaticString = #function, line: UInt = #line, tag: Any? = nil, asynchronous async: Bool = true, ddlog: DDLog = DDLog.sharedInstance) { - _DDLogMessage(message, level: level, flag: .debug, context: context, file: file, function: function, line: line, tag: tag, asynchronous: async, ddlog: ddlog) + _DDLogMessage(message(), level: level, flag: .debug, context: context, file: file, function: function, line: line, tag: tag, asynchronous: async, ddlog: ddlog) } public func DDLogInfo(_ message: @autoclosure () -> String, level: DDLogLevel = defaultDebugLevel, context: Int = 0, file: StaticString = #file, function: StaticString = #function, line: UInt = #line, tag: Any? = nil, asynchronous async: Bool = true, ddlog: DDLog = DDLog.sharedInstance) { - _DDLogMessage(message, level: level, flag: .info, context: context, file: file, function: function, line: line, tag: tag, asynchronous: async, ddlog: ddlog) + _DDLogMessage(message(), level: level, flag: .info, context: context, file: file, function: function, line: line, tag: tag, asynchronous: async, ddlog: ddlog) } public func DDLogWarn(_ message: @autoclosure () -> String, level: DDLogLevel = defaultDebugLevel, context: Int = 0, file: StaticString = #file, function: StaticString = #function, line: UInt = #line, tag: Any? = nil, asynchronous async: Bool = true, ddlog: DDLog = DDLog.sharedInstance) { - _DDLogMessage(message, level: level, flag: .warning, context: context, file: file, function: function, line: line, tag: tag, asynchronous: async, ddlog: ddlog) + _DDLogMessage(message(), level: level, flag: .warning, context: context, file: file, function: function, line: line, tag: tag, asynchronous: async, ddlog: ddlog) } public func DDLogVerbose(_ message: @autoclosure () -> String, level: DDLogLevel = defaultDebugLevel, context: Int = 0, file: StaticString = #file, function: StaticString = #function, line: UInt = #line, tag: Any? = nil, asynchronous async: Bool = true, ddlog: DDLog = DDLog.sharedInstance) { - _DDLogMessage(message, level: level, flag: .verbose, context: context, file: file, function: function, line: line, tag: tag, asynchronous: async, ddlog: ddlog) + _DDLogMessage(message(), level: level, flag: .verbose, context: context, file: file, function: function, line: line, tag: tag, asynchronous: async, ddlog: ddlog) } public func DDLogError(_ message: @autoclosure () -> String, level: DDLogLevel = defaultDebugLevel, context: Int = 0, file: StaticString = #file, function: StaticString = #function, line: UInt = #line, tag: Any? = nil, asynchronous async: Bool = false, ddlog: DDLog = DDLog.sharedInstance) { - _DDLogMessage(message, level: level, flag: .error, context: context, file: file, function: function, line: line, tag: tag, asynchronous: async, ddlog: ddlog) + _DDLogMessage(message(), level: level, flag: .error, context: context, file: file, function: function, line: line, tag: tag, asynchronous: async, ddlog: ddlog) } /// Returns a String of the current filename, without full path or extension. From 8853a98600f1a52f2412bbbbe2ce2ee3e7ed830e Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Tue, 23 Apr 2019 16:22:19 -0500 Subject: [PATCH 03/20] Update `OHHTTPStubs` pod version Version 8 of `OHHTTPStubs` is Swift 5 compatibility! yay! --- Podfile | 4 ++-- Podfile.lock | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Podfile b/Podfile index f0c8e44..16cb7ee 100644 --- a/Podfile +++ b/Podfile @@ -14,8 +14,8 @@ target 'WordPressShared' do target 'WordPressSharedTests' do inherit! :search_paths - pod 'OHHTTPStubs', '~> 7' - pod 'OHHTTPStubs/Swift', '~> 7' + pod 'OHHTTPStubs', '~> 8' + pod 'OHHTTPStubs/Swift', '~> 8' pod 'OCMock', '~> 3.4' pod 'Specta', '1.0.7' pod 'Expecta', '1.0.6' diff --git a/Podfile.lock b/Podfile.lock index 79df531..fad20a7 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -7,20 +7,20 @@ PODS: - FormatterKit/TimeIntervalFormatter (1.8.2): - FormatterKit/Resources - OCMock (3.4.3) - - OHHTTPStubs (7.0.0): - - OHHTTPStubs/Default (= 7.0.0) - - OHHTTPStubs/Core (7.0.0) - - OHHTTPStubs/Default (7.0.0): + - OHHTTPStubs (8.0.0): + - OHHTTPStubs/Default (= 8.0.0) + - OHHTTPStubs/Core (8.0.0) + - OHHTTPStubs/Default (8.0.0): - OHHTTPStubs/Core - OHHTTPStubs/JSON - OHHTTPStubs/NSURLSession - OHHTTPStubs/OHPathHelpers - - OHHTTPStubs/JSON (7.0.0): + - OHHTTPStubs/JSON (8.0.0): - OHHTTPStubs/Core - - OHHTTPStubs/NSURLSession (7.0.0): + - OHHTTPStubs/NSURLSession (8.0.0): - OHHTTPStubs/Core - - OHHTTPStubs/OHPathHelpers (7.0.0) - - OHHTTPStubs/Swift (7.0.0): + - OHHTTPStubs/OHPathHelpers (8.0.0) + - OHHTTPStubs/Swift (8.0.0): - OHHTTPStubs/Default - Specta (1.0.7) @@ -29,8 +29,8 @@ DEPENDENCIES: - Expecta (= 1.0.6) - FormatterKit/TimeIntervalFormatter (= 1.8.2) - OCMock (~> 3.4) - - OHHTTPStubs (~> 7) - - OHHTTPStubs/Swift (~> 7) + - OHHTTPStubs (~> 8) + - OHHTTPStubs/Swift (~> 8) - Specta (= 1.0.7) SPEC REPOS: @@ -47,9 +47,9 @@ SPEC CHECKSUMS: Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5 FormatterKit: 4b8f29acc9b872d5d12a63efb560661e8f2e1b98 OCMock: 43565190abc78977ad44a61c0d20d7f0784d35ab - OHHTTPStubs: ef33a2c353110d306bb98f695435ec56ff5a26c3 + OHHTTPStubs: 9cbce6364bec557cc3439aa6bb7514670d780881 Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66 -PODFILE CHECKSUM: 0c4fe02b6b773c52447b14c911bcd309285ccac9 +PODFILE CHECKSUM: 02e84657760f3db3da111ec3370647ddddd51456 COCOAPODS: 1.5.3 From f68daaf33333358e55ba38dc7f8dcc221b140ab0 Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Wed, 24 Apr 2019 08:16:20 -0500 Subject: [PATCH 04/20] Remove `public` declaration for each function when class declares `public` --- .../Core/Utility/String+Helpers.swift | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/WordPressShared/Core/Utility/String+Helpers.swift b/WordPressShared/Core/Utility/String+Helpers.swift index 3fde0f6..3fee326 100644 --- a/WordPressShared/Core/Utility/String+Helpers.swift +++ b/WordPressShared/Core/Utility/String+Helpers.swift @@ -54,7 +54,7 @@ public extension String { /// - Parameters: /// - prefix: A possible prefix to remove from this string. /// - public mutating func removePrefix(_ prefix: String) { + mutating func removePrefix(_ prefix: String) { if let prefixRange = range(of: prefix), prefixRange.lowerBound == startIndex { removeSubrange(prefixRange) } @@ -65,7 +65,7 @@ public extension String { /// - Parameters: /// - prefix: A possible prefix to remove from this string. /// - public func removingPrefix(_ prefix: String) -> String { + func removingPrefix(_ prefix: String) -> String { var copy = self copy.removePrefix(prefix) return copy @@ -81,7 +81,7 @@ public extension String { /// /// - Throws: an error if it the pattern is not a valid regular expression. /// - public mutating func removePrefix(pattern: String, options: NSRegularExpression.Options = []) throws { + mutating func removePrefix(pattern: String, options: NSRegularExpression.Options = []) throws { let regexp = try NSRegularExpression(pattern: "^\(pattern)", options: options) let fullRange = NSRange(location: 0, length: (self as NSString).length) if let match = regexp.firstMatch(in: self, options: [], range: fullRange) { @@ -98,7 +98,7 @@ public extension String { /// /// - Throws: an error if it the pattern is not a valid regular expression. /// - public func removingPrefix(pattern: String, options: NSRegularExpression.Options = []) throws -> String { + func removingPrefix(pattern: String, options: NSRegularExpression.Options = []) throws -> String { var copy = self try copy.removePrefix(pattern: pattern, options: options) return copy @@ -115,7 +115,7 @@ public extension String { /// - Parameters: /// - suffix: A possible suffix to remove from this string. /// - public mutating func removeSuffix(_ suffix: String) { + mutating func removeSuffix(_ suffix: String) { if let suffixRange = range(of: suffix, options: [.backwards]), suffixRange.upperBound == endIndex { removeSubrange(suffixRange) } @@ -126,7 +126,7 @@ public extension String { /// - Parameters: /// - suffix: A possible suffix to remove from this string. /// - public func removingSuffix(_ suffix: String) -> String { + func removingSuffix(_ suffix: String) -> String { var copy = self copy.removeSuffix(suffix) return copy @@ -142,7 +142,7 @@ public extension String { /// /// - Throws: an error if it the pattern is not a valid regular expression. /// - public mutating func removeSuffix(pattern: String, options: NSRegularExpression.Options = []) throws { + mutating func removeSuffix(pattern: String, options: NSRegularExpression.Options = []) throws { let regexp = try NSRegularExpression(pattern: "\(pattern)$", options: options) let fullRange = NSRange(location: 0, length: (self as NSString).length) if let match = regexp.firstMatch(in: self, options: [], range: fullRange) { @@ -159,7 +159,7 @@ public extension String { /// /// - Throws: an error if it the pattern is not a valid regular expression. /// - public func removingSuffix(pattern: String, options: NSRegularExpression.Options = []) throws -> String { + func removingSuffix(pattern: String, options: NSRegularExpression.Options = []) throws -> String { var copy = self try copy.removeSuffix(pattern: pattern, options: options) return copy From b37a3967042e781d0d9dd2b234fa72d7ac38c089 Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Wed, 24 Apr 2019 11:27:00 -0500 Subject: [PATCH 05/20] Update podspec version to 1.8.0-beta.1 and support Swift version 5. --- WordPressShared.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WordPressShared.podspec b/WordPressShared.podspec index 36f32b9..287f4af 100644 --- a/WordPressShared.podspec +++ b/WordPressShared.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "WordPressShared" - s.version = "1.7.4-beta.1" + s.version = "1.8.0-beta.1" s.summary = "Shared components used in building the WordPress iOS apps and other library components." s.description = <<-DESC @@ -13,7 +13,7 @@ Pod::Spec.new do |s| s.license = "GPLv2" s.author = { "WordPress" => "mobile@automattic.com" } s.platform = :ios, "10.0" - s.swift_version = '4.2' + s.swift_version = '5.0' s.source = { :git => "https://github.com/wordpress-mobile/WordPress-iOS-Shared.git", :tag => s.version.to_s } s.source_files = 'WordPressShared/**/*.{h,m,swift}' s.private_header_files = "WordPressShared/Private/*.h" From 577b9c64bc9d2c22450650e80f93ab72bf353246 Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Wed, 24 Apr 2019 11:34:21 -0500 Subject: [PATCH 06/20] Set targets to support Swift 5 --- WordPressShared.xcodeproj/project.pbxproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/WordPressShared.xcodeproj/project.pbxproj b/WordPressShared.xcodeproj/project.pbxproj index 349ed6b..d096d93 100644 --- a/WordPressShared.xcodeproj/project.pbxproj +++ b/WordPressShared.xcodeproj/project.pbxproj @@ -749,7 +749,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = ""; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -846,7 +846,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = ""; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -949,7 +949,7 @@ MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; - SWIFT_VERSION = ""; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -1005,7 +1005,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = ""; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; From 3a7707e23cd7520dcedb268471478bdda3ad440a Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Wed, 24 Apr 2019 13:01:13 -0500 Subject: [PATCH 07/20] Update pods (Cocoalumberjack now Swift 5 compatible) --- Podfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Podfile.lock b/Podfile.lock index fad20a7..6a1df7d 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,7 +1,7 @@ PODS: - - CocoaLumberjack (3.5.2): - - CocoaLumberjack/Core (= 3.5.2) - - CocoaLumberjack/Core (3.5.2) + - CocoaLumberjack (3.5.3): + - CocoaLumberjack/Core (= 3.5.3) + - CocoaLumberjack/Core (3.5.3) - Expecta (1.0.6) - FormatterKit/Resources (1.8.2) - FormatterKit/TimeIntervalFormatter (1.8.2): @@ -43,7 +43,7 @@ SPEC REPOS: - Specta SPEC CHECKSUMS: - CocoaLumberjack: 118bf4a820efc641f79fa487b75ed928dccfae23 + CocoaLumberjack: 2f44e60eb91c176d471fdba43b9e3eae6a721947 Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5 FormatterKit: 4b8f29acc9b872d5d12a63efb560661e8f2e1b98 OCMock: 43565190abc78977ad44a61c0d20d7f0784d35ab From 3043ea98e0c86a663655cc9e9afe23ab9959ce2f Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Wed, 24 Apr 2019 13:28:58 -0500 Subject: [PATCH 08/20] Configure Circle CI to build with Xcode 10.2 --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 624fbab..ffac593 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,9 +9,11 @@ workflows: jobs: - ios/test: name: Test + xcode-version: "10.2.0" workspace: WordPressShared.xcworkspace scheme: WordPressShared destination: "platform=iOS Simulator,name=iPhone XS,OS=latest" - ios/validate-podspec: name: Validate Podspec + xcode-version: "10.2.0" podspec-path: WordPressShared.podspec From 7fa19416b7eb94057a70b8739d3e5ae8f67badee Mon Sep 17 00:00:00 2001 From: Jeremy Massel Date: Wed, 24 Apr 2019 12:32:26 -0600 Subject: [PATCH 09/20] Update the CircleCI orb --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ffac593..3322668 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2.1 orbs: # This uses the iOS Orb located at https://github.com/wordpress-mobile/circleci-orbs - ios: wordpress-mobile/ios@0.0.13 + ios: wordpress-mobile/ios@0.0.25 workflows: test_and_validate: From 7dd5822dd4d112da46cb7dfc4930c31cb2791b22 Mon Sep 17 00:00:00 2001 From: Jeremy Massel Date: Wed, 24 Apr 2019 12:33:36 -0600 Subject: [PATCH 10/20] Update run destination keys --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3322668..0af04b0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,7 +12,8 @@ workflows: xcode-version: "10.2.0" workspace: WordPressShared.xcworkspace scheme: WordPressShared - destination: "platform=iOS Simulator,name=iPhone XS,OS=latest" + device: iPhone XS + ios-version: "12.2" - ios/validate-podspec: name: Validate Podspec xcode-version: "10.2.0" From 4033485ad4660e428bca3a5803182a02b2a2c052 Mon Sep 17 00:00:00 2001 From: Jeremy Massel Date: Wed, 24 Apr 2019 12:48:34 -0600 Subject: [PATCH 11/20] =?UTF-8?q?Don=E2=80=99t=20use=20the=20.swift-versio?= =?UTF-8?q?n=20file=20anymore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s deprecated, and we can specify the version in the podspec --- .swift-version | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .swift-version diff --git a/.swift-version b/.swift-version deleted file mode 100644 index bf77d54..0000000 --- a/.swift-version +++ /dev/null @@ -1 +0,0 @@ -4.2 From af46736541cc6d1567c5506f08628eec304839d9 Mon Sep 17 00:00:00 2001 From: Jeremy Massel Date: Wed, 24 Apr 2019 13:11:27 -0600 Subject: [PATCH 12/20] Update Cocoapods to 1.6.1 for Xcode 10.2 --- Gemfile | 2 +- Gemfile.lock | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Gemfile b/Gemfile index 192bc4a..995c11f 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ source 'https://rubygems.org' do - gem 'cocoapods', '1.5.3' + gem 'cocoapods', '~> 1.6.0' gem 'xcpretty' end diff --git a/Gemfile.lock b/Gemfile.lock index 87a7de0..0219f37 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,37 +2,37 @@ GEM remote: https://rubygems.org/ specs: CFPropertyList (3.0.0) - activesupport (4.2.11) + activesupport (4.2.11.1) i18n (~> 0.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) atomos (0.1.3) claide (1.0.2) - cocoapods (1.5.3) + cocoapods (1.6.1) activesupport (>= 4.0.2, < 5) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.5.3) + cocoapods-core (= 1.6.1) cocoapods-deintegrate (>= 1.0.2, < 2.0) - cocoapods-downloader (>= 1.2.0, < 2.0) + cocoapods-downloader (>= 1.2.2, < 2.0) cocoapods-plugins (>= 1.0.0, < 2.0) cocoapods-search (>= 1.0.0, < 2.0) cocoapods-stats (>= 1.0.0, < 2.0) - cocoapods-trunk (>= 1.3.0, < 2.0) + cocoapods-trunk (>= 1.3.1, < 2.0) cocoapods-try (>= 1.1.0, < 2.0) colored2 (~> 3.1) escape (~> 0.0.4) - fourflusher (~> 2.0.1) + fourflusher (>= 2.2.0, < 3.0) gh_inspector (~> 1.0) - molinillo (~> 0.6.5) + molinillo (~> 0.6.6) nap (~> 1.0) - ruby-macho (~> 1.1) - xcodeproj (>= 1.5.7, < 2.0) - cocoapods-core (1.5.3) + ruby-macho (~> 1.4) + xcodeproj (>= 1.8.1, < 2.0) + cocoapods-core (1.6.1) activesupport (>= 4.0.2, < 6) fuzzy_match (~> 2.0.4) nap (~> 1.0) - cocoapods-deintegrate (1.0.2) + cocoapods-deintegrate (1.0.4) cocoapods-downloader (1.2.2) cocoapods-plugins (1.0.0) nap @@ -43,9 +43,9 @@ GEM netrc (~> 0.11) cocoapods-try (1.1.0) colored2 (3.1.2) - concurrent-ruby (1.1.4) + concurrent-ruby (1.1.5) escape (0.0.4) - fourflusher (2.0.1) + fourflusher (2.2.0) fuzzy_match (2.0.4) gh_inspector (1.1.3) i18n (0.9.5) @@ -56,11 +56,11 @@ GEM nap (1.1.0) netrc (0.11.0) rouge (2.0.7) - ruby-macho (1.3.1) + ruby-macho (1.4.0) thread_safe (0.3.6) tzinfo (1.2.5) thread_safe (~> 0.1) - xcodeproj (1.8.0) + xcodeproj (1.8.2) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) @@ -73,7 +73,7 @@ PLATFORMS ruby DEPENDENCIES - cocoapods (= 1.5.3)! + cocoapods (~> 1.6.0)! xcpretty! BUNDLED WITH From 8a770728f87ca0dfffa7108d99db7b96c51300e7 Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Wed, 24 Apr 2019 14:35:11 -0500 Subject: [PATCH 13/20] Update CocoaLumberjack to 3.5.3 --- Podfile | 2 +- Podfile.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Podfile b/Podfile index 16cb7ee..7605190 100644 --- a/Podfile +++ b/Podfile @@ -8,7 +8,7 @@ platform :ios, '10.0' target 'WordPressShared' do project 'WordPressShared.xcodeproj' - pod 'CocoaLumberjack', '~> 3.4' + pod 'CocoaLumberjack', '~> 3.5' pod 'FormatterKit/TimeIntervalFormatter', '1.8.2' target 'WordPressSharedTests' do diff --git a/Podfile.lock b/Podfile.lock index 6a1df7d..98b0e25 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -25,7 +25,7 @@ PODS: - Specta (1.0.7) DEPENDENCIES: - - CocoaLumberjack (~> 3.4) + - CocoaLumberjack (~> 3.5) - Expecta (= 1.0.6) - FormatterKit/TimeIntervalFormatter (= 1.8.2) - OCMock (~> 3.4) @@ -50,6 +50,6 @@ SPEC CHECKSUMS: OHHTTPStubs: 9cbce6364bec557cc3439aa6bb7514670d780881 Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66 -PODFILE CHECKSUM: 02e84657760f3db3da111ec3370647ddddd51456 +PODFILE CHECKSUM: 4a9714c6a4581f79d6953dd2468deeef632f2b82 -COCOAPODS: 1.5.3 +COCOAPODS: 1.6.1 From f8d09c39768ea1e95dd482daf4b9f436e4124f74 Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Wed, 24 Apr 2019 14:36:32 -0500 Subject: [PATCH 14/20] Update to recommended pod settings for Xcode .proj --- WordPressShared.xcodeproj/project.pbxproj | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/WordPressShared.xcodeproj/project.pbxproj b/WordPressShared.xcodeproj/project.pbxproj index d096d93..a379203 100644 --- a/WordPressShared.xcodeproj/project.pbxproj +++ b/WordPressShared.xcodeproj/project.pbxproj @@ -602,13 +602,11 @@ files = ( ); inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-WordPressSharedTests/Pods-WordPressSharedTests-frameworks.sh", + "${PODS_ROOT}/Target Support Files/Pods-WordPressSharedTests/Pods-WordPressSharedTests-frameworks.sh", "${BUILT_PRODUCTS_DIR}/Expecta/Expecta.framework", "${BUILT_PRODUCTS_DIR}/OCMock/OCMock.framework", "${BUILT_PRODUCTS_DIR}/OHHTTPStubs/OHHTTPStubs.framework", "${BUILT_PRODUCTS_DIR}/Specta/Specta.framework", - "${BUILT_PRODUCTS_DIR}/CocoaLumberjack/CocoaLumberjack.framework", - "${BUILT_PRODUCTS_DIR}/FormatterKit/FormatterKit.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( @@ -616,12 +614,10 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OCMock.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OHHTTPStubs.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Specta.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CocoaLumberjack.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FormatterKit.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-WordPressSharedTests/Pods-WordPressSharedTests-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-WordPressSharedTests/Pods-WordPressSharedTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ From 0104bf07bbcbe5d8be29bd62e2d7133802bb8b30 Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Wed, 24 Apr 2019 14:35:11 -0500 Subject: [PATCH 15/20] Revert "Update CocoaLumberjack to 3.5.3" This reverts commit 8a770728f87ca0dfffa7108d99db7b96c51300e7. --- Podfile | 2 +- Podfile.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Podfile b/Podfile index 7605190..16cb7ee 100644 --- a/Podfile +++ b/Podfile @@ -8,7 +8,7 @@ platform :ios, '10.0' target 'WordPressShared' do project 'WordPressShared.xcodeproj' - pod 'CocoaLumberjack', '~> 3.5' + pod 'CocoaLumberjack', '~> 3.4' pod 'FormatterKit/TimeIntervalFormatter', '1.8.2' target 'WordPressSharedTests' do diff --git a/Podfile.lock b/Podfile.lock index 98b0e25..6a1df7d 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -25,7 +25,7 @@ PODS: - Specta (1.0.7) DEPENDENCIES: - - CocoaLumberjack (~> 3.5) + - CocoaLumberjack (~> 3.4) - Expecta (= 1.0.6) - FormatterKit/TimeIntervalFormatter (= 1.8.2) - OCMock (~> 3.4) @@ -50,6 +50,6 @@ SPEC CHECKSUMS: OHHTTPStubs: 9cbce6364bec557cc3439aa6bb7514670d780881 Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66 -PODFILE CHECKSUM: 4a9714c6a4581f79d6953dd2468deeef632f2b82 +PODFILE CHECKSUM: 02e84657760f3db3da111ec3370647ddddd51456 -COCOAPODS: 1.6.1 +COCOAPODS: 1.5.3 From 5a473d04881834f9f81da55496678c25c00e7297 Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Wed, 24 Apr 2019 15:50:13 -0500 Subject: [PATCH 16/20] Fix broken Cocoalumberjack --- Podfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Podfile.lock b/Podfile.lock index 6a1df7d..a2b151b 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -52,4 +52,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 02e84657760f3db3da111ec3370647ddddd51456 -COCOAPODS: 1.5.3 +COCOAPODS: 1.6.1 From 6da19bdfabb556442fdacd8e1d50a05dc3a5f42e Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Wed, 24 Apr 2019 14:36:32 -0500 Subject: [PATCH 17/20] Revert "Update to recommended pod settings for Xcode .proj" This reverts commit f8d09c39768ea1e95dd482daf4b9f436e4124f74. --- WordPressShared.xcodeproj/project.pbxproj | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/WordPressShared.xcodeproj/project.pbxproj b/WordPressShared.xcodeproj/project.pbxproj index a379203..d096d93 100644 --- a/WordPressShared.xcodeproj/project.pbxproj +++ b/WordPressShared.xcodeproj/project.pbxproj @@ -602,11 +602,13 @@ files = ( ); inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-WordPressSharedTests/Pods-WordPressSharedTests-frameworks.sh", + "${SRCROOT}/Pods/Target Support Files/Pods-WordPressSharedTests/Pods-WordPressSharedTests-frameworks.sh", "${BUILT_PRODUCTS_DIR}/Expecta/Expecta.framework", "${BUILT_PRODUCTS_DIR}/OCMock/OCMock.framework", "${BUILT_PRODUCTS_DIR}/OHHTTPStubs/OHHTTPStubs.framework", "${BUILT_PRODUCTS_DIR}/Specta/Specta.framework", + "${BUILT_PRODUCTS_DIR}/CocoaLumberjack/CocoaLumberjack.framework", + "${BUILT_PRODUCTS_DIR}/FormatterKit/FormatterKit.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( @@ -614,10 +616,12 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OCMock.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OHHTTPStubs.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Specta.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CocoaLumberjack.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FormatterKit.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-WordPressSharedTests/Pods-WordPressSharedTests-frameworks.sh\"\n"; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-WordPressSharedTests/Pods-WordPressSharedTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ From 911029262fc057c189279db502089c1413b49863 Mon Sep 17 00:00:00 2001 From: Jeremy Massel Date: Wed, 24 Apr 2019 21:53:01 -0600 Subject: [PATCH 18/20] Adjust tests for CocoaPods 1.6 --- Podfile | 6 ++---- Podfile.lock | 2 +- WordPressShared.xcodeproj/project.pbxproj | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Podfile b/Podfile index 16cb7ee..0a92e0a 100644 --- a/Podfile +++ b/Podfile @@ -10,14 +10,12 @@ target 'WordPressShared' do pod 'CocoaLumberjack', '~> 3.4' pod 'FormatterKit/TimeIntervalFormatter', '1.8.2' +end - target 'WordPressSharedTests' do - inherit! :search_paths - +target 'WordPressSharedTests' do pod 'OHHTTPStubs', '~> 8' pod 'OHHTTPStubs/Swift', '~> 8' pod 'OCMock', '~> 3.4' pod 'Specta', '1.0.7' pod 'Expecta', '1.0.6' end -end diff --git a/Podfile.lock b/Podfile.lock index a2b151b..6270db8 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -50,6 +50,6 @@ SPEC CHECKSUMS: OHHTTPStubs: 9cbce6364bec557cc3439aa6bb7514670d780881 Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66 -PODFILE CHECKSUM: 02e84657760f3db3da111ec3370647ddddd51456 +PODFILE CHECKSUM: fd75ac891057bad2f6f168a4aab44113b5170d91 COCOAPODS: 1.6.1 diff --git a/WordPressShared.xcodeproj/project.pbxproj b/WordPressShared.xcodeproj/project.pbxproj index d096d93..2c23d85 100644 --- a/WordPressShared.xcodeproj/project.pbxproj +++ b/WordPressShared.xcodeproj/project.pbxproj @@ -602,7 +602,7 @@ files = ( ); inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-WordPressSharedTests/Pods-WordPressSharedTests-frameworks.sh", + "${PODS_ROOT}/Target Support Files/Pods-WordPressSharedTests/Pods-WordPressSharedTests-frameworks.sh", "${BUILT_PRODUCTS_DIR}/Expecta/Expecta.framework", "${BUILT_PRODUCTS_DIR}/OCMock/OCMock.framework", "${BUILT_PRODUCTS_DIR}/OHHTTPStubs/OHHTTPStubs.framework", @@ -621,7 +621,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-WordPressSharedTests/Pods-WordPressSharedTests-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-WordPressSharedTests/Pods-WordPressSharedTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ From be5bf836156d2fc881363d581736f6223bcb0248 Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Thu, 25 Apr 2019 10:39:25 -0500 Subject: [PATCH 19/20] Fix merge issue --- Podfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Podfile.lock b/Podfile.lock index 6270db8..c6d8996 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -50,6 +50,6 @@ SPEC CHECKSUMS: OHHTTPStubs: 9cbce6364bec557cc3439aa6bb7514670d780881 Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66 -PODFILE CHECKSUM: fd75ac891057bad2f6f168a4aab44113b5170d91 +PODFILE CHECKSUM: 78ffa790590cc0b0c49546903906facf935d9ae5 COCOAPODS: 1.6.1 From dfdc49086d9bbb8d6791bbb994343691fc563f40 Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Thu, 25 Apr 2019 14:44:29 -0500 Subject: [PATCH 20/20] Update podspec to 1.7.5-beta.2 --- WordPressShared.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPressShared.podspec b/WordPressShared.podspec index 287f4af..18b7248 100644 --- a/WordPressShared.podspec +++ b/WordPressShared.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "WordPressShared" - s.version = "1.8.0-beta.1" + s.version = "1.7.5-beta.2" s.summary = "Shared components used in building the WordPress iOS apps and other library components." s.description = <<-DESC