From ae37b4eaa9a69f14bde7e06476a5ce862e719129 Mon Sep 17 00:00:00 2001 From: Jorge Leandro Perez Date: Wed, 11 Jul 2018 18:11:22 -0300 Subject: [PATCH 1/4] Podfile: Updating WordPressAuthenticator's reference --- Podfile | 2 +- Podfile.lock | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Podfile b/Podfile index fff402db99f..4658838d4de 100644 --- a/Podfile +++ b/Podfile @@ -18,7 +18,7 @@ target 'WooCommerce' do # pod 'Automattic-Tracks-iOS', :git => 'https://github.com/Automattic/Automattic-Tracks-iOS.git', :tag => '0.2.3' pod 'Gridicons', '0.15' - pod 'WordPressAuthenticator', '~> 1.0' + pod 'WordPressAuthenticator', :git => 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', :commit => 'be1e635' # External Libraries diff --git a/Podfile.lock b/Podfile.lock index 7c0d958ebf6..3087fac7681 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -72,7 +72,7 @@ DEPENDENCIES: - Crashlytics (~> 3.10) - Gridicons (= 0.15) - KeychainAccess (~> 3.1) - - WordPressAuthenticator (~> 1.0) + - WordPressAuthenticator (from `https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git`, commit `be1e635`) SPEC REPOS: https://github.com/cocoapods/specs.git: @@ -92,7 +92,6 @@ SPEC REPOS: - Reachability - SVProgressHUD - UIDeviceIdentifier - - WordPressAuthenticator - WordPressKit - WordPressShared - WordPressUI @@ -102,11 +101,17 @@ EXTERNAL SOURCES: Automattic-Tracks-iOS: :git: https://github.com/Automattic/Automattic-Tracks-iOS.git :tag: 0.2.3 + WordPressAuthenticator: + :commit: be1e635 + :git: https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git CHECKOUT OPTIONS: Automattic-Tracks-iOS: :git: https://github.com/Automattic/Automattic-Tracks-iOS.git :tag: 0.2.3 + WordPressAuthenticator: + :commit: be1e635 + :git: https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git SPEC CHECKSUMS: 1PasswordExtension: 0e95bdea64ec8ff2f4f693be5467a09fac42a83d @@ -132,6 +137,6 @@ SPEC CHECKSUMS: WordPressUI: af141587ec444f9af753a00605bd0d3f14d8d8a3 wpxmlrpc: bfc572f62ce7ee897f6f38b098d2ba08732ecef4 -PODFILE CHECKSUM: 60104ed4eaf82cee487f83818dceb80f392ce97f +PODFILE CHECKSUM: dcf63b9c5ec68cb5a7afce466f664006bb5105f0 COCOAPODS: 1.5.3 From 94ae62a5409f10fafc0aad28d74554140c0a7a61 Mon Sep 17 00:00:00 2001 From: Jorge Leandro Perez Date: Wed, 11 Jul 2018 18:11:36 -0300 Subject: [PATCH 2/4] AuthenticationManager: Wiring the new WordPressAuthenticatorDelegate API --- .../Classes/Authentication/AuthenticationManager.swift | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/WooCommerce/Classes/Authentication/AuthenticationManager.swift b/WooCommerce/Classes/Authentication/AuthenticationManager.swift index ca8f6a7a703..dcf5658398b 100644 --- a/WooCommerce/Classes/Authentication/AuthenticationManager.swift +++ b/WooCommerce/Classes/Authentication/AuthenticationManager.swift @@ -167,14 +167,19 @@ extension AuthenticationManager: WordPressAuthenticatorDelegate { /// Synchronizes the specified WordPress Account. /// - func sync(credentials: WordPressCredentials, onCompletion: @escaping (Error?) -> Void) { + func sync(credentials: WordPressCredentials, onCompletion: @escaping () -> Void) { guard case let .wpcom(username, authToken, _, _) = credentials else { fatalError("Self Hosted sites are not supported. Please review the Authenticator settings!") } + // TODO: This is *temporary*. Already gone in a branch!! + let onCompletionWrapper = { (_ error: Error?) in + onCompletion() + } + StoresManager.shared .authenticate(credentials: .init(username: username, authToken: authToken)) - .synchronizeEntities(onCompletion: onCompletion) + .synchronizeEntities(onCompletion: onCompletionWrapper) } /// Tracks a given Analytics Event. From 12f084b529587425c35b3ebe85f293a4d4db9b4a Mon Sep 17 00:00:00 2001 From: Jorge Leandro Perez Date: Thu, 12 Jul 2018 11:32:42 -0300 Subject: [PATCH 3/4] Podfile: Updating WordPressAuthenticator to Mark 1.0.2 --- Podfile | 2 +- Podfile.lock | 15 +++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/Podfile b/Podfile index 4658838d4de..fff402db99f 100644 --- a/Podfile +++ b/Podfile @@ -18,7 +18,7 @@ target 'WooCommerce' do # pod 'Automattic-Tracks-iOS', :git => 'https://github.com/Automattic/Automattic-Tracks-iOS.git', :tag => '0.2.3' pod 'Gridicons', '0.15' - pod 'WordPressAuthenticator', :git => 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', :commit => 'be1e635' + pod 'WordPressAuthenticator', '~> 1.0' # External Libraries diff --git a/Podfile.lock b/Podfile.lock index 3087fac7681..1484796a5f0 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -38,7 +38,7 @@ PODS: - Reachability (3.2) - SVProgressHUD (2.2.5) - UIDeviceIdentifier (0.5.0) - - WordPressAuthenticator (1.0.1): + - WordPressAuthenticator (1.0.2): - 1PasswordExtension (= 1.8.5) - Alamofire (= 4.7.2) - CocoaLumberjack (= 3.4.2) @@ -72,7 +72,7 @@ DEPENDENCIES: - Crashlytics (~> 3.10) - Gridicons (= 0.15) - KeychainAccess (~> 3.1) - - WordPressAuthenticator (from `https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git`, commit `be1e635`) + - WordPressAuthenticator (~> 1.0) SPEC REPOS: https://github.com/cocoapods/specs.git: @@ -92,6 +92,7 @@ SPEC REPOS: - Reachability - SVProgressHUD - UIDeviceIdentifier + - WordPressAuthenticator - WordPressKit - WordPressShared - WordPressUI @@ -101,17 +102,11 @@ EXTERNAL SOURCES: Automattic-Tracks-iOS: :git: https://github.com/Automattic/Automattic-Tracks-iOS.git :tag: 0.2.3 - WordPressAuthenticator: - :commit: be1e635 - :git: https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git CHECKOUT OPTIONS: Automattic-Tracks-iOS: :git: https://github.com/Automattic/Automattic-Tracks-iOS.git :tag: 0.2.3 - WordPressAuthenticator: - :commit: be1e635 - :git: https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git SPEC CHECKSUMS: 1PasswordExtension: 0e95bdea64ec8ff2f4f693be5467a09fac42a83d @@ -131,12 +126,12 @@ SPEC CHECKSUMS: Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6 UIDeviceIdentifier: a959a6d4f51036b4180dd31fb26483a820f1cc46 - WordPressAuthenticator: 60c07bcfb6f1578afaf17621ae4393d688c2ede9 + WordPressAuthenticator: 20e8eb9cb61bef82370658037bdf9ca24a54570a WordPressKit: a24baaa783c3a221f2d9a51c19318cbb27333373 WordPressShared: 063e1e8b1a7aaf635abf17f091a2d235a068abdc WordPressUI: af141587ec444f9af753a00605bd0d3f14d8d8a3 wpxmlrpc: bfc572f62ce7ee897f6f38b098d2ba08732ecef4 -PODFILE CHECKSUM: dcf63b9c5ec68cb5a7afce466f664006bb5105f0 +PODFILE CHECKSUM: 60104ed4eaf82cee487f83818dceb80f392ce97f COCOAPODS: 1.5.3 From 9cd67455a6c66013be20c7201fd11b0b8ea0fbd6 Mon Sep 17 00:00:00 2001 From: Jorge Leandro Perez Date: Thu, 12 Jul 2018 12:31:47 -0300 Subject: [PATCH 4/4] Updating Authenticator to Mark 1.0.2 --- Podfile | 2 +- Podfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Podfile b/Podfile index fff402db99f..d019ad2ccc7 100644 --- a/Podfile +++ b/Podfile @@ -18,7 +18,7 @@ target 'WooCommerce' do # pod 'Automattic-Tracks-iOS', :git => 'https://github.com/Automattic/Automattic-Tracks-iOS.git', :tag => '0.2.3' pod 'Gridicons', '0.15' - pod 'WordPressAuthenticator', '~> 1.0' + pod 'WordPressAuthenticator', '1.0.2' # External Libraries diff --git a/Podfile.lock b/Podfile.lock index 1484796a5f0..2173c0c34c8 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -72,7 +72,7 @@ DEPENDENCIES: - Crashlytics (~> 3.10) - Gridicons (= 0.15) - KeychainAccess (~> 3.1) - - WordPressAuthenticator (~> 1.0) + - WordPressAuthenticator (= 1.0.2) SPEC REPOS: https://github.com/cocoapods/specs.git: @@ -132,6 +132,6 @@ SPEC CHECKSUMS: WordPressUI: af141587ec444f9af753a00605bd0d3f14d8d8a3 wpxmlrpc: bfc572f62ce7ee897f6f38b098d2ba08732ecef4 -PODFILE CHECKSUM: 60104ed4eaf82cee487f83818dceb80f392ce97f +PODFILE CHECKSUM: cf5b7216652672de11a865ab3265c7b0c38117e2 COCOAPODS: 1.5.3