Skip to content

Commit 8ed3a61

Browse files
Merge pull request #148 from woocommerce/issue/updating-authenticator-api
WordPressAuthenticator: Wiring the latest Delegate's API
2 parents 816f916 + 9cd6745 commit 8ed3a61

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ target 'WooCommerce' do
1818
#
1919
pod 'Automattic-Tracks-iOS', :git => 'https://github.com/Automattic/Automattic-Tracks-iOS.git', :tag => '0.2.3'
2020
pod 'Gridicons', '0.15'
21-
pod 'WordPressAuthenticator', '~> 1.0'
21+
pod 'WordPressAuthenticator', '1.0.2'
2222

2323

2424
# External Libraries

Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PODS:
3838
- Reachability (3.2)
3939
- SVProgressHUD (2.2.5)
4040
- UIDeviceIdentifier (0.5.0)
41-
- WordPressAuthenticator (1.0.1):
41+
- WordPressAuthenticator (1.0.2):
4242
- 1PasswordExtension (= 1.8.5)
4343
- Alamofire (= 4.7.2)
4444
- CocoaLumberjack (= 3.4.2)
@@ -72,7 +72,7 @@ DEPENDENCIES:
7272
- Crashlytics (~> 3.10)
7373
- Gridicons (= 0.15)
7474
- KeychainAccess (~> 3.1)
75-
- WordPressAuthenticator (~> 1.0)
75+
- WordPressAuthenticator (= 1.0.2)
7676

7777
SPEC REPOS:
7878
https://github.com/cocoapods/specs.git:
@@ -126,12 +126,12 @@ SPEC CHECKSUMS:
126126
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
127127
SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6
128128
UIDeviceIdentifier: a959a6d4f51036b4180dd31fb26483a820f1cc46
129-
WordPressAuthenticator: 60c07bcfb6f1578afaf17621ae4393d688c2ede9
129+
WordPressAuthenticator: 20e8eb9cb61bef82370658037bdf9ca24a54570a
130130
WordPressKit: a24baaa783c3a221f2d9a51c19318cbb27333373
131131
WordPressShared: 063e1e8b1a7aaf635abf17f091a2d235a068abdc
132132
WordPressUI: af141587ec444f9af753a00605bd0d3f14d8d8a3
133133
wpxmlrpc: bfc572f62ce7ee897f6f38b098d2ba08732ecef4
134134

135-
PODFILE CHECKSUM: 60104ed4eaf82cee487f83818dceb80f392ce97f
135+
PODFILE CHECKSUM: cf5b7216652672de11a865ab3265c7b0c38117e2
136136

137137
COCOAPODS: 1.5.3

WooCommerce/Classes/Authentication/AuthenticationManager.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,14 +167,19 @@ extension AuthenticationManager: WordPressAuthenticatorDelegate {
167167

168168
/// Synchronizes the specified WordPress Account.
169169
///
170-
func sync(credentials: WordPressCredentials, onCompletion: @escaping (Error?) -> Void) {
170+
func sync(credentials: WordPressCredentials, onCompletion: @escaping () -> Void) {
171171
guard case let .wpcom(username, authToken, _, _) = credentials else {
172172
fatalError("Self Hosted sites are not supported. Please review the Authenticator settings!")
173173
}
174174

175+
// TODO: This is *temporary*. Already gone in a branch!!
176+
let onCompletionWrapper = { (_ error: Error?) in
177+
onCompletion()
178+
}
179+
175180
StoresManager.shared
176181
.authenticate(credentials: .init(username: username, authToken: authToken))
177-
.synchronizeEntities(onCompletion: onCompletion)
182+
.synchronizeEntities(onCompletion: onCompletionWrapper)
178183
}
179184

180185
/// Tracks a given Analytics Event.

0 commit comments

Comments
 (0)