Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Commit 6e60b06

Browse files
authored
Merge pull request #528 from wordpress-mobile/merge/1.30.0-into-trunk
Merge 1.30.0 into trunk
2 parents 6cbc6a6 + 13e663d commit 6e60b06

18 files changed

+347
-39
lines changed

WordPressAuthenticator.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "WordPressAuthenticator"
3-
s.version = "1.29.0"
3+
s.version = "1.30.0"
44
s.summary = "WordPressAuthenticator implements an easy and elegant way to authenticate your WordPress Apps."
55

66
s.description = <<-DESC

WordPressAuthenticator.xcodeproj/project.pbxproj

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,14 @@
154154
CEDE0D93242011E000CB3345 /* NSObject+Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEDE0D92242011E000CB3345 /* NSObject+Helpers.swift */; };
155155
CEDE0D952420121D00CB3345 /* UIStoryboard+Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEDE0D942420121D00CB3345 /* UIStoryboard+Helpers.swift */; };
156156
CEDE0D972420126900CB3345 /* UIViewController+Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEDE0D962420126900CB3345 /* UIViewController+Helpers.swift */; };
157+
D85C3653256DEDA900D56E34 /* WordPressAuthenticatorResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = D85C3652256DEDA900D56E34 /* WordPressAuthenticatorResult.swift */; };
158+
D85C36E6256E0DDE00D56E34 /* NavigationToEnterSiteTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D85C36E5256E0DDE00D56E34 /* NavigationToEnterSiteTests.swift */; };
159+
D85C36EC256E10EA00D56E34 /* MockNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D85C36EB256E10EA00D56E34 /* MockNavigationController.swift */; };
160+
D85C36F0256E118D00D56E34 /* NavigationToEnterAccountTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D85C36EF256E118D00D56E34 /* NavigationToEnterAccountTests.swift */; };
161+
D881A30D256B5A7900FE5605 /* NavigationCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = D881A30C256B5A7900FE5605 /* NavigationCommand.swift */; };
162+
D881A311256B5B4700FE5605 /* NavigateToEnterSite.swift in Sources */ = {isa = PBXBuildFile; fileRef = D881A310256B5B4700FE5605 /* NavigateToEnterSite.swift */; };
163+
D881A315256B5B5800FE5605 /* NavigateToEnterAccount.swift in Sources */ = {isa = PBXBuildFile; fileRef = D881A314256B5B5800FE5605 /* NavigateToEnterAccount.swift */; };
164+
D85C3882256E3FEC00D56E34 /* WordPressComSiteInfoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D85C3881256E3FEC00D56E34 /* WordPressComSiteInfoTests.swift */; };
157165
E8AF6B9EF50902F2117DFAF9 /* Pods_WordPressAuthenticatorTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A441EC80D2B8D2209C2E228 /* Pods_WordPressAuthenticatorTests.framework */; };
158166
F12F9FB424D8A68E00771BCE /* AuthenticatorAnalyticsTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = F12F9FB324D8A68E00771BCE /* AuthenticatorAnalyticsTracker.swift */; };
159167
F12F9FB824D8A7FC00771BCE /* AnalyticsTrackerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F12F9FB724D8A7FC00771BCE /* AnalyticsTrackerTests.swift */; };
@@ -353,6 +361,14 @@
353361
CEDE0D92242011E000CB3345 /* NSObject+Helpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSObject+Helpers.swift"; sourceTree = "<group>"; };
354362
CEDE0D942420121D00CB3345 /* UIStoryboard+Helpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIStoryboard+Helpers.swift"; sourceTree = "<group>"; };
355363
CEDE0D962420126900CB3345 /* UIViewController+Helpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+Helpers.swift"; sourceTree = "<group>"; };
364+
D85C3652256DEDA900D56E34 /* WordPressAuthenticatorResult.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WordPressAuthenticatorResult.swift; sourceTree = "<group>"; };
365+
D85C36E5256E0DDE00D56E34 /* NavigationToEnterSiteTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationToEnterSiteTests.swift; sourceTree = "<group>"; };
366+
D85C36EB256E10EA00D56E34 /* MockNavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockNavigationController.swift; sourceTree = "<group>"; };
367+
D85C36EF256E118D00D56E34 /* NavigationToEnterAccountTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationToEnterAccountTests.swift; sourceTree = "<group>"; };
368+
D881A30C256B5A7900FE5605 /* NavigationCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationCommand.swift; sourceTree = "<group>"; };
369+
D881A310256B5B4700FE5605 /* NavigateToEnterSite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigateToEnterSite.swift; sourceTree = "<group>"; };
370+
D881A314256B5B5800FE5605 /* NavigateToEnterAccount.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigateToEnterAccount.swift; sourceTree = "<group>"; };
371+
D85C3881256E3FEC00D56E34 /* WordPressComSiteInfoTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WordPressComSiteInfoTests.swift; sourceTree = "<group>"; };
356372
E9414A95E29F3297555AC92B /* Pods-WordPressAuthenticator.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WordPressAuthenticator.debug.xcconfig"; path = "Pods/Target Support Files/Pods-WordPressAuthenticator/Pods-WordPressAuthenticator.debug.xcconfig"; sourceTree = "<group>"; };
357373
F12F9FB324D8A68E00771BCE /* AuthenticatorAnalyticsTracker.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AuthenticatorAnalyticsTracker.swift; sourceTree = "<group>"; };
358374
F12F9FB724D8A7FC00771BCE /* AnalyticsTrackerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticsTrackerTests.swift; sourceTree = "<group>"; };
@@ -495,6 +511,7 @@
495511
isa = PBXGroup;
496512
children = (
497513
B501C03C208FC52400D1E58F /* LoginFieldsValidationTests.swift */,
514+
D85C3881256E3FEC00D56E34 /* WordPressComSiteInfoTests.swift */,
498515
);
499516
path = Model;
500517
sourceTree = "<group>";
@@ -619,6 +636,7 @@
619636
CE1B18D120EEC44400BECC3F /* WordPressAuthenticatorStyles.swift */,
620637
020BE74923B0BD2E007FE54C /* WordPressAuthenticatorDisplayImages.swift */,
621638
CE16177421B6D82200B82A47 /* WordPressAuthenticatorDisplayStrings.swift */,
639+
D85C3652256DEDA900D56E34 /* WordPressAuthenticatorResult.swift */,
622640
);
623641
path = Authenticator;
624642
sourceTree = "<group>";
@@ -707,6 +725,7 @@
707725
B5ED78F6207E976500A8FD8C /* WordPressAuthenticator */ = {
708726
isa = PBXGroup;
709727
children = (
728+
D881A307256B5A6900FE5605 /* Navigation */,
710729
F12F9FB624D8A7E800771BCE /* Analytics */,
711730
CE1B18CA20EEC31000BECC3F /* Credentials */,
712731
B5609099208A4EAF00399AE4 /* Authenticator */,
@@ -731,6 +750,7 @@
731750
B5ED7901207E976500A8FD8C /* WordPressAuthenticatorTests */ = {
732751
isa = PBXGroup;
733752
children = (
753+
D85C36E4256E0DAF00D56E34 /* Navigation */,
734754
F18DF0E32525009200D83AFE /* SupportingFiles */,
735755
BA53D64924DFE06C001F1ABF /* Mocks */,
736756
BA53D64424DFDE0B001F1ABF /* Credentials */,
@@ -783,6 +803,7 @@
783803
BA53D64E24DFE981001F1ABF /* MockOnePasswordFacade.swift */,
784804
BA53D64C24DFE4E6001F1ABF /* ModalViewControllerPresentingSpy.swift */,
785805
BA53D64A24DFE07D001F1ABF /* WordpressAuthenticatorProvider.swift */,
806+
D85C36EB256E10EA00D56E34 /* MockNavigationController.swift */,
786807
);
787808
path = Mocks;
788809
sourceTree = "<group>";
@@ -858,6 +879,25 @@
858879
path = "Site Address";
859880
sourceTree = "<group>";
860881
};
882+
D85C36E4256E0DAF00D56E34 /* Navigation */ = {
883+
isa = PBXGroup;
884+
children = (
885+
D85C36E5256E0DDE00D56E34 /* NavigationToEnterSiteTests.swift */,
886+
D85C36EF256E118D00D56E34 /* NavigationToEnterAccountTests.swift */,
887+
);
888+
path = Navigation;
889+
sourceTree = "<group>";
890+
};
891+
D881A307256B5A6900FE5605 /* Navigation */ = {
892+
isa = PBXGroup;
893+
children = (
894+
D881A30C256B5A7900FE5605 /* NavigationCommand.swift */,
895+
D881A310256B5B4700FE5605 /* NavigateToEnterSite.swift */,
896+
D881A314256B5B5800FE5605 /* NavigateToEnterAccount.swift */,
897+
);
898+
path = Navigation;
899+
sourceTree = "<group>";
900+
};
861901
F12F9FB524D8A7DB00771BCE /* Analytics */ = {
862902
isa = PBXGroup;
863903
children = (
@@ -1190,6 +1230,7 @@
11901230
B560910F208A54F800399AE4 /* SafariCredentialsService.swift in Sources */,
11911231
B5CDBED420B4714500BC1EF2 /* UIImage+Assets.swift in Sources */,
11921232
B5609116208A555600399AE4 /* LoginTextField.swift in Sources */,
1233+
D85C3653256DEDA900D56E34 /* WordPressAuthenticatorResult.swift in Sources */,
11931234
F1C96669250BF53400EB529D /* UIViewController+Dismissal.swift in Sources */,
11941235
CE811D6724EDC0FB00F4CCD6 /* LoginMagicLinkViewController.swift in Sources */,
11951236
B56090E2208A4F9D00399AE4 /* WPNUXSecondaryButton.m in Sources */,
@@ -1231,6 +1272,7 @@
12311272
CE1B18CE20EEC3CB00BECC3F /* WordPressAuthenticatorDelegateProtocol.swift in Sources */,
12321273
B5609110208A54F800399AE4 /* OnePasswordFacade.swift in Sources */,
12331274
F180B82424F59263000A01F5 /* StoredCredentialsPicker.swift in Sources */,
1275+
D881A311256B5B4700FE5605 /* NavigateToEnterSite.swift in Sources */,
12341276
B5609109208A54F800399AE4 /* SignupService.swift in Sources */,
12351277
B560913D208A563800399AE4 /* LoginProloguePageViewController.swift in Sources */,
12361278
B5609117208A555600399AE4 /* SearchTableViewCell.swift in Sources */,
@@ -1239,6 +1281,7 @@
12391281
B56090F1208A527000399AE4 /* String+Underline.swift in Sources */,
12401282
B56052A42090B2ED001B91FD /* CircularImageView.swift in Sources */,
12411283
B5609141208A563800399AE4 /* LoginPrologueViewController.swift in Sources */,
1284+
D881A315256B5B5800FE5605 /* NavigateToEnterAccount.swift in Sources */,
12421285
B56090EB208A51D000399AE4 /* LoginFields.swift in Sources */,
12431286
B56090FB208A533200399AE4 /* WordPressSupportSourceTag.swift in Sources */,
12441287
F1AF1BEF24E4A80F00BA453E /* LoginFacade.swift in Sources */,
@@ -1255,6 +1298,7 @@
12551298
B56090CB208A4F5400399AE4 /* NUXNavigationController.swift in Sources */,
12561299
B560911F208A555E00399AE4 /* SignupGoogleViewController.swift in Sources */,
12571300
B5609142208A563800399AE4 /* LoginNavigationController.swift in Sources */,
1301+
D881A30D256B5A7900FE5605 /* NavigationCommand.swift in Sources */,
12581302
CE9C5B4E24E31E03005A8BCF /* SignupMagicLinkViewController.swift in Sources */,
12591303
B56090E4208A4F9D00399AE4 /* WPNUXMainButton.m in Sources */,
12601304
3FFF2FC323D7F53200D38C77 /* AppSelector.swift in Sources */,
@@ -1281,11 +1325,15 @@
12811325
BA53D64824DFDF97001F1ABF /* WordPressSourceTagTests.swift in Sources */,
12821326
BA53D64D24DFE4E6001F1ABF /* ModalViewControllerPresentingSpy.swift in Sources */,
12831327
BA53D64624DFDE1D001F1ABF /* CredentialsTests.swift in Sources */,
1328+
D85C36EC256E10EA00D56E34 /* MockNavigationController.swift in Sources */,
12841329
BA53D64F24DFE981001F1ABF /* MockOnePasswordFacade.swift in Sources */,
12851330
3F550D4E23DA429B007E5897 /* AppSelectorTests.swift in Sources */,
12861331
BA53D64B24DFE07D001F1ABF /* WordpressAuthenticatorProvider.swift in Sources */,
12871332
CE16177821B70C1A00B82A47 /* WordPressAuthenticatorDisplayTextTests.swift in Sources */,
12881333
B501C048208FC79C00D1E58F /* LoginFacadeTests.m in Sources */,
1334+
D85C36F0256E118D00D56E34 /* NavigationToEnterAccountTests.swift in Sources */,
1335+
D85C36E6256E0DDE00D56E34 /* NavigationToEnterSiteTests.swift in Sources */,
1336+
D85C3882256E3FEC00D56E34 /* WordPressComSiteInfoTests.swift in Sources */,
12891337
F12F9FB824D8A7FC00771BCE /* AnalyticsTrackerTests.swift in Sources */,
12901338
B501C046208FC6A700D1E58F /* WordPressAuthenticatorTests.swift in Sources */,
12911339
);

WordPressAuthenticator/Authenticator/WordPressAuthenticatorConfiguration.swift

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ public struct WordPressAuthenticatorConfiguration {
8282
/// If disabled, displays the old carousel.
8383
/// If enabled, displays the new carousel.
8484
let enableUnifiedCarousel: Bool
85+
86+
/// Flag for the unified login/signup flows.
87+
/// If disabled, the "Continue With WordPress" button in the login prologue is shown first.
88+
/// If enabled, the "Enter your site Address" button in the login prologue is shown first.
89+
/// Default value is disabled
90+
let continueWithSiteAddressFirst: Bool
8591

8692
/// Designated Initializer
8793
///
@@ -101,7 +107,8 @@ public struct WordPressAuthenticatorConfiguration {
101107
enableSignupWithGoogle: Bool = false,
102108
enableUnifiedAuth: Bool = false,
103109
enableUnifiedCarousel: Bool = false,
104-
displayHintButtons: Bool = true) {
110+
displayHintButtons: Bool = true,
111+
continueWithSiteAddressFirst: Bool = false) {
105112

106113
self.wpcomClientId = wpcomClientId
107114
self.wpcomSecret = wpcomSecret
@@ -120,5 +127,6 @@ public struct WordPressAuthenticatorConfiguration {
120127
self.enableUnifiedCarousel = enableUnifiedCarousel
121128
self.displayHintButtons = displayHintButtons
122129
self.enableSignupWithGoogle = enableSignupWithGoogle
130+
self.continueWithSiteAddressFirst = continueWithSiteAddressFirst
123131
}
124132
}

WordPressAuthenticator/Authenticator/WordPressAuthenticatorDelegateProtocol.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public protocol WordPressAuthenticatorDelegate: class {
4848
/// - site: passes in the site information to the delegate method.
4949
/// - onCompletion: Closure to be executed on completion.
5050
///
51-
func shouldPresentUsernamePasswordController(for siteInfo: WordPressComSiteInfo?, onCompletion: @escaping (Error?, Bool) -> Void)
51+
func shouldPresentUsernamePasswordController(for siteInfo: WordPressComSiteInfo?, onCompletion: @escaping (WordPressAuthenticatorResult) -> Void)
5252

5353
/// Presents the Login Epilogue, in the specified NavigationController.
5454
///

WordPressAuthenticator/Authenticator/WordPressAuthenticatorDisplayStrings.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ public struct WordPressAuthenticatorDisplayStrings {
2727
public let magicLinkButtonTitle: String
2828
public let openMailButtonTitle: String
2929
public let createAccountButtonTitle: String
30+
public let continueWithWPButtonTitle: String
31+
public let enterYourSiteAddressButtonTitle: String
3032

3133
/// Large titles displayed in unified auth flows.
3234
///
@@ -72,6 +74,8 @@ public struct WordPressAuthenticatorDisplayStrings {
7274
magicLinkButtonTitle: String = defaultStrings.magicLinkButtonTitle,
7375
openMailButtonTitle: String = defaultStrings.openMailButtonTitle,
7476
createAccountButtonTitle: String = defaultStrings.createAccountButtonTitle,
77+
continueWithWPButtonTitle: String = defaultStrings.continueWithWPButtonTitle,
78+
enterYourSiteAddressButtonTitle: String = defaultStrings.enterYourSiteAddressButtonTitle,
7579
findSiteButtonTitle: String = defaultStrings.findSiteButtonTitle,
7680
resetPasswordButtonTitle: String = defaultStrings.resetPasswordButtonTitle,
7781
getLoginLinkButtonTitle: String = defaultStrings.getLoginLinkButtonTitle,
@@ -105,6 +109,8 @@ public struct WordPressAuthenticatorDisplayStrings {
105109
self.magicLinkButtonTitle = magicLinkButtonTitle
106110
self.openMailButtonTitle = openMailButtonTitle
107111
self.createAccountButtonTitle = createAccountButtonTitle
112+
self.continueWithWPButtonTitle = continueWithWPButtonTitle
113+
self.enterYourSiteAddressButtonTitle = enterYourSiteAddressButtonTitle
108114
self.findSiteButtonTitle = findSiteButtonTitle
109115
self.resetPasswordButtonTitle = resetPasswordButtonTitle
110116
self.getLoginLinkButtonTitle = getLoginLinkButtonTitle
@@ -160,6 +166,10 @@ public extension WordPressAuthenticatorDisplayStrings {
160166
comment: "The button title text for opening the user's preferred email app."),
161167
createAccountButtonTitle: NSLocalizedString("Create Account",
162168
comment: "The button title text for creating a new account."),
169+
continueWithWPButtonTitle: NSLocalizedString("Continue with WordPress.com",
170+
comment: "Button title. Takes the user to the login by email flow."),
171+
enterYourSiteAddressButtonTitle: NSLocalizedString("Enter your site address",
172+
comment: "Button title. Takes the user to the login by site address flow."),
163173
findSiteButtonTitle: NSLocalizedString("Find your site address",
164174
comment: "The hint button's title text to help users find their site address."),
165175
resetPasswordButtonTitle: NSLocalizedString("Reset your password",
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import Foundation
2+
3+
4+
/// Provides options for clients of WordPressAuthenticator
5+
/// to signal what they expect WPAuthenticator to do in response to
6+
/// `shouldPresentUsernamePasswordController`
7+
///
8+
/// @see WordPressAuthenticatorDelegate.shouldPresentUsernamePasswordController
9+
public enum WordPressAuthenticatorResult {
10+
11+
/// An error
12+
///
13+
case error(value: Error)
14+
15+
/// Boolean flag to indicate if UI providing entry for username and passsword
16+
/// should be presented
17+
///
18+
case presentPasswordController(value: Bool)
19+
20+
/// A view controller to be inserted into the navigation stack
21+
///
22+
case injectViewController(value: UIViewController)
23+
}

WordPressAuthenticator/Authenticator/WordPressAuthenticatorStyles.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,9 @@ public struct WordPressAuthenticatorUnifiedStyle {
192192
/// Style: Auth view background colors
193193
///
194194
public let viewControllerBackgroundColor: UIColor
195+
196+
/// Style: Auth Prologue buttons background color
197+
public let prologueButtonsBackgroundColor: UIColor
195198

196199
/// Style: Status bar style. Defaults to `default`.
197200
///
@@ -212,6 +215,7 @@ public struct WordPressAuthenticatorUnifiedStyle {
212215
textButtonColor: UIColor,
213216
textButtonHighlightColor: UIColor,
214217
viewControllerBackgroundColor: UIColor,
218+
prologueButtonsBackgroundColor: UIColor = .clear,
215219
statusBarStyle: UIStatusBarStyle = .default,
216220
navBarBackgroundColor: UIColor,
217221
navButtonTextColor: UIColor,
@@ -223,6 +227,7 @@ public struct WordPressAuthenticatorUnifiedStyle {
223227
self.textButtonColor = textButtonColor
224228
self.textButtonHighlightColor = textButtonHighlightColor
225229
self.viewControllerBackgroundColor = viewControllerBackgroundColor
230+
self.prologueButtonsBackgroundColor = prologueButtonsBackgroundColor
226231
self.statusBarStyle = statusBarStyle
227232
self.navBarBackgroundColor = navBarBackgroundColor
228233
self.navButtonTextColor = navButtonTextColor

WordPressAuthenticator/Model/WordPressComSiteInfo.swift

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ public class WordPressComSiteInfo {
2121
///
2222
public let hasJetpack: Bool
2323

24+
/// Indicates if Jetpack is active, or not.
25+
///
26+
public let isJetpackActive: Bool
27+
28+
/// Indicates if Jetpack is connected, or not.
29+
///
30+
public let isJetpackConnected: Bool
31+
2432
/// URL of the Site's Blavatar.
2533
///
2634
public let icon: String
@@ -29,17 +37,28 @@ public class WordPressComSiteInfo {
2937
///
3038
public let isWPCom: Bool
3139

40+
/// Inidcates wheter the site is WordPress, or not.
41+
///
42+
public let isWP: Bool
43+
44+
/// Inidcates whether the site exists, or not.
45+
///
46+
public let exists: Bool
47+
3248

3349

3450
/// Initializes the current SiteInfo instance with a raw dictionary.
3551
///
3652
public init(remote: [AnyHashable: Any]) {
37-
name = remote["name"] as? String ?? ""
38-
tagline = remote["description"] as? String ?? ""
39-
url = remote["URL"] as? String ?? ""
40-
hasJetpack = remote["hasJetpack"] as? Bool ?? false
41-
icon = remote["icon.img"] as? String ?? ""
42-
isWPCom = remote["isWordPressDotCom"] as? Bool ?? false
43-
53+
name = remote["name"] as? String ?? ""
54+
tagline = remote["description"] as? String ?? ""
55+
url = remote["urlAfterRedirects"] as? String ?? ""
56+
hasJetpack = remote["hasJetpack"] as? Bool ?? false
57+
isJetpackActive = remote["isJetpackActive"] as? Bool ?? false
58+
isJetpackConnected = remote["isJetpackConnected"] as? Bool ?? false
59+
icon = remote["icon.img"] as? String ?? ""
60+
isWPCom = remote["isWordPressDotCom"] as? Bool ?? false
61+
isWP = remote["isWordPress"] as? Bool ?? false
62+
exists = remote["exists"] as? Bool ?? false
4463
}
4564
}

0 commit comments

Comments
 (0)