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

Commit 31a0fa7

Browse files
authored
Merge pull request #215 from wordpress-mobile/release/1.11.0
Release/1.11.0
2 parents 30fb877 + d7e8380 commit 31a0fa7

32 files changed

+434
-266
lines changed

Podfile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,22 @@ def wordpress_authenticator_pods
99
## Automattic libraries
1010
## ====================
1111
##
12-
pod 'Gridicons', '~> 0.15'
13-
pod 'WordPressUI', '~> 1.4-beta.1'
14-
pod 'WordPressKit', '~> 4.5.9-beta'
15-
# pod 'WordPressKit', :git => 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', :branch => 'issue/apple_2fa_auth'
16-
pod 'WordPressShared', '~> 1.8.13'
12+
pod 'Gridicons', '~> 1.0'
13+
pod 'WordPressUI', '~> 1.5.2'
14+
pod 'WordPressKit', '~> 4.6.0'
15+
#pod 'WordPressKit', :git => 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', :branch => ''
16+
#pod 'WordPressKit', :git => 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', :commit => ''
17+
pod 'WordPressShared', '~> 1.8.16'
1718

1819
## Third party libraries
1920
## =====================
2021
##
21-
pod '1PasswordExtension', '1.8.5'
22+
pod '1PasswordExtension', '1.8.6'
2223
pod 'Alamofire', '4.8'
2324
pod 'CocoaLumberjack', '3.5.2'
2425
pod 'GoogleSignIn', '4.4.0'
25-
pod 'lottie-ios', '2.5.2'
26-
pod 'NSURL+IDN', '0.3'
26+
pod 'lottie-ios', '3.1.6'
27+
pod 'NSURL+IDN', '0.4'
2728
pod 'SVProgressHUD', '2.2.5'
2829
end
2930

Podfile.lock

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PODS:
2-
- 1PasswordExtension (1.8.5)
2+
- 1PasswordExtension (1.8.6)
33
- Alamofire (4.8.0)
44
- CocoaLumberjack (3.5.2):
55
- CocoaLumberjack/Core (= 3.5.2)
@@ -12,20 +12,20 @@ PODS:
1212
- "GoogleToolboxForMac/NSDictionary+URLArguments (~> 2.1)"
1313
- "GoogleToolboxForMac/NSString+URLArguments (~> 2.1)"
1414
- GTMSessionFetcher/Core (~> 1.1)
15-
- GoogleToolboxForMac/DebugUtils (2.2.1):
16-
- GoogleToolboxForMac/Defines (= 2.2.1)
17-
- GoogleToolboxForMac/Defines (2.2.1)
18-
- "GoogleToolboxForMac/NSDictionary+URLArguments (2.2.1)":
19-
- GoogleToolboxForMac/DebugUtils (= 2.2.1)
20-
- GoogleToolboxForMac/Defines (= 2.2.1)
21-
- "GoogleToolboxForMac/NSString+URLArguments (= 2.2.1)"
22-
- "GoogleToolboxForMac/NSString+URLArguments (2.2.1)"
23-
- Gridicons (0.19)
24-
- GTMSessionFetcher/Core (1.2.2)
25-
- lottie-ios (2.5.2)
26-
- NSObject-SafeExpectations (0.0.3)
27-
- "NSURL+IDN (0.3)"
28-
- OCMock (3.4.3)
15+
- GoogleToolboxForMac/DebugUtils (2.2.2):
16+
- GoogleToolboxForMac/Defines (= 2.2.2)
17+
- GoogleToolboxForMac/Defines (2.2.2)
18+
- "GoogleToolboxForMac/NSDictionary+URLArguments (2.2.2)":
19+
- GoogleToolboxForMac/DebugUtils (= 2.2.2)
20+
- GoogleToolboxForMac/Defines (= 2.2.2)
21+
- "GoogleToolboxForMac/NSString+URLArguments (= 2.2.2)"
22+
- "GoogleToolboxForMac/NSString+URLArguments (2.2.2)"
23+
- Gridicons (1.0)
24+
- GTMSessionFetcher/Core (1.3.1)
25+
- lottie-ios (3.1.6)
26+
- NSObject-SafeExpectations (0.0.4)
27+
- "NSURL+IDN (0.4)"
28+
- OCMock (3.6)
2929
- OHHTTPStubs (8.0.0):
3030
- OHHTTPStubs/Default (= 8.0.0)
3131
- OHHTTPStubs/Core (8.0.0)
@@ -44,36 +44,36 @@ PODS:
4444
- Specta (1.0.7)
4545
- SVProgressHUD (2.2.5)
4646
- UIDeviceIdentifier (1.4.0)
47-
- WordPressKit (4.5.9-beta.2):
47+
- WordPressKit (4.6.0):
4848
- Alamofire (~> 4.8.0)
4949
- CocoaLumberjack (~> 3.4)
50-
- NSObject-SafeExpectations (= 0.0.3)
50+
- NSObject-SafeExpectations (= 0.0.4)
5151
- UIDeviceIdentifier (~> 1)
52-
- WordPressShared (~> 1.8.13-beta)
53-
- wpxmlrpc (= 0.8.4)
54-
- WordPressShared (1.8.13):
52+
- WordPressShared (~> 1.8.16)
53+
- wpxmlrpc (= 0.8.5)
54+
- WordPressShared (1.8.16):
5555
- CocoaLumberjack (~> 3.4)
5656
- FormatterKit/TimeIntervalFormatter (= 1.8.2)
57-
- WordPressUI (1.4-beta.1)
58-
- wpxmlrpc (0.8.4)
57+
- WordPressUI (1.5.2)
58+
- wpxmlrpc (0.8.5)
5959

6060
DEPENDENCIES:
61-
- 1PasswordExtension (= 1.8.5)
61+
- 1PasswordExtension (= 1.8.6)
6262
- Alamofire (= 4.8)
6363
- CocoaLumberjack (= 3.5.2)
6464
- Expecta (= 1.0.6)
6565
- GoogleSignIn (= 4.4.0)
66-
- Gridicons (~> 0.15)
67-
- lottie-ios (= 2.5.2)
68-
- "NSURL+IDN (= 0.3)"
66+
- Gridicons (~> 1.0)
67+
- lottie-ios (= 3.1.6)
68+
- "NSURL+IDN (= 0.4)"
6969
- OCMock (~> 3.4)
7070
- OHHTTPStubs (= 8.0.0)
7171
- OHHTTPStubs/Swift (= 8.0.0)
7272
- Specta (= 1.0.7)
7373
- SVProgressHUD (= 2.2.5)
74-
- WordPressKit (~> 4.5.9-beta)
75-
- WordPressShared (~> 1.8.13)
76-
- WordPressUI (~> 1.4-beta.1)
74+
- WordPressKit (~> 4.6.0)
75+
- WordPressShared (~> 1.8.16)
76+
- WordPressUI (~> 1.5.2)
7777

7878
SPEC REPOS:
7979
trunk:
@@ -100,28 +100,28 @@ SPEC REPOS:
100100
- wpxmlrpc
101101

102102
SPEC CHECKSUMS:
103-
1PasswordExtension: 0e95bdea64ec8ff2f4f693be5467a09fac42a83d
103+
1PasswordExtension: f97cc80ae58053c331b2b6dc8843ba7103b33794
104104
Alamofire: 3ec537f71edc9804815215393ae2b1a8ea33a844
105105
CocoaLumberjack: 118bf4a820efc641f79fa487b75ed928dccfae23
106106
Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5
107107
FormatterKit: 4b8f29acc9b872d5d12a63efb560661e8f2e1b98
108108
GoogleSignIn: 7ff245e1a7b26d379099d3243a562f5747e23d39
109-
GoogleToolboxForMac: b3553629623a3b1bff17f555e736cd5a6d95ad55
110-
Gridicons: dc92efbe5fd60111d2e8ea051d84a60cca552abc
111-
GTMSessionFetcher: 61bb0f61a4cb560030f1222021178008a5727a23
112-
lottie-ios: 3fef45d3fabe63e3c7c2eb603dd64ddfffc73062
113-
NSObject-SafeExpectations: b989b68a8a9b7b9f2b264a8b52ba9d7aab8f3129
114-
"NSURL+IDN": 82355a0afd532fe1de08f6417c134b49b1a1c4b3
115-
OCMock: 43565190abc78977ad44a61c0d20d7f0784d35ab
109+
GoogleToolboxForMac: 800648f8b3127618c1b59c7f97684427630c5ea3
110+
Gridicons: f032dbc3350f8648e0fabe3e531b72cf97d428a9
111+
GTMSessionFetcher: cea130bbfe5a7edc8d06d3f0d17288c32ffe9925
112+
lottie-ios: 85ce835dd8c53e02509f20729fc7d6a4e6645a0a
113+
NSObject-SafeExpectations: ab8fe623d36b25aa1f150affa324e40a2f3c0374
114+
"NSURL+IDN": afc873e639c18138a1589697c3add197fe8679ca
115+
OCMock: 5ea90566be239f179ba766fd9fbae5885040b992
116116
OHHTTPStubs: 9cbce6364bec557cc3439aa6bb7514670d780881
117117
Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66
118118
SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6
119119
UIDeviceIdentifier: 44f805037d21b94394821828f4fcaba34b38c2d0
120-
WordPressKit: 54b1c041c59b871e91a331f24a2fb5d347e070b0
121-
WordPressShared: fde9523bd00696fc1dfa45ed5299e16de111ebcc
122-
WordPressUI: 35b144885c8e5817ba6874b68accc200bda61ee1
123-
wpxmlrpc: 6ba55c773cfa27083ae4a2173e69b19f46da98e2
120+
WordPressKit: 767cc17ae08894f73f08c852fe124c865a62fb3d
121+
WordPressShared: 1bc316ed162f42af4e0fa2869437e9e28b532b01
122+
WordPressUI: 70cc58a253c352330b23cd8fa6dd6a2021570e18
123+
wpxmlrpc: 6a9bdd6ab9d1b159b384b0df0f3f39de9af4fecf
124124

125-
PODFILE CHECKSUM: c8429d9d1b129c0d3f037b246b2a63567bf0f654
125+
PODFILE CHECKSUM: 0c5d1d0787a9afe633ecb5f3e47cde5666a6d0c7
126126

127127
COCOAPODS: 1.8.4

WordPressAuthenticator.podspec

Lines changed: 8 additions & 8 deletions
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.10.9"
3+
s.version = "1.11.0"
44
s.summary = "WordPressAuthenticator implements an easy and elegant way to authenticate your WordPress Apps."
55

66
s.description = <<-DESC
@@ -30,16 +30,16 @@ Pod::Spec.new do |s|
3030
s.static_framework = true # This is needed because GoogleSignIn vendors a static framework
3131
s.header_dir = 'WordPressAuthenticator'
3232

33-
s.dependency '1PasswordExtension', '1.8.5'
33+
s.dependency '1PasswordExtension', '1.8.6'
3434
s.dependency 'Alamofire', '4.8'
3535
s.dependency 'CocoaLumberjack', '~> 3.5'
36-
s.dependency 'lottie-ios', '2.5.2'
37-
s.dependency 'NSURL+IDN', '0.3'
36+
s.dependency 'lottie-ios', '3.1.6'
37+
s.dependency 'NSURL+IDN', '0.4'
3838
s.dependency 'SVProgressHUD', '2.2.5'
3939

40-
s.dependency 'Gridicons', '~> 0.15'
40+
s.dependency 'Gridicons', '~> 1.0'
4141
s.dependency 'GoogleSignIn', '~> 4.4'
42-
s.dependency 'WordPressUI', '~> 1.4-beta.1'
43-
s.dependency 'WordPressKit', '~> 4.5.9-beta'
44-
s.dependency 'WordPressShared', '~> 1.8.13-beta'
42+
s.dependency 'WordPressUI', '~> 1.5.2'
43+
s.dependency 'WordPressKit', '~> 4.6.0'
44+
s.dependency 'WordPressShared', '~> 1.8.16'
4545
end

WordPressAuthenticator.xcodeproj/project.pbxproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@
116116
CE30A2A722579F4100DF3CDA /* LoginUsernamePasswordViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE30A2A622579F4100DF3CDA /* LoginUsernamePasswordViewController.swift */; };
117117
CE30A2A92257C60500DF3CDA /* WordPressOrgCredentials.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE30A2A82257C60500DF3CDA /* WordPressOrgCredentials.swift */; };
118118
CE30A2AD2257CECC00DF3CDA /* AuthenticatorCredentials.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE30A2AC2257CECC00DF3CDA /* AuthenticatorCredentials.swift */; };
119+
CEDE0D93242011E000CB3345 /* NSObject+Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEDE0D92242011E000CB3345 /* NSObject+Helpers.swift */; };
120+
CEDE0D952420121D00CB3345 /* UIStoryboard+Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEDE0D942420121D00CB3345 /* UIStoryboard+Helpers.swift */; };
121+
CEDE0D972420126900CB3345 /* UIViewController+Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEDE0D962420126900CB3345 /* UIViewController+Helpers.swift */; };
119122
E8AF6B9EF50902F2117DFAF9 /* Pods_WordPressAuthenticatorTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A441EC80D2B8D2209C2E228 /* Pods_WordPressAuthenticatorTests.framework */; };
120123
FF629D9622393500004C4106 /* WordPressAuthenticator.podspec in Resources */ = {isa = PBXBuildFile; fileRef = FF629D9522393500004C4106 /* WordPressAuthenticator.podspec */; };
121124
/* End PBXBuildFile section */
@@ -270,6 +273,9 @@
270273
CE30A2A622579F4100DF3CDA /* LoginUsernamePasswordViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginUsernamePasswordViewController.swift; sourceTree = "<group>"; };
271274
CE30A2A82257C60500DF3CDA /* WordPressOrgCredentials.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WordPressOrgCredentials.swift; sourceTree = "<group>"; };
272275
CE30A2AC2257CECC00DF3CDA /* AuthenticatorCredentials.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthenticatorCredentials.swift; sourceTree = "<group>"; };
276+
CEDE0D92242011E000CB3345 /* NSObject+Helpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSObject+Helpers.swift"; sourceTree = "<group>"; };
277+
CEDE0D942420121D00CB3345 /* UIStoryboard+Helpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIStoryboard+Helpers.swift"; sourceTree = "<group>"; };
278+
CEDE0D962420126900CB3345 /* UIViewController+Helpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+Helpers.swift"; sourceTree = "<group>"; };
273279
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>"; };
274280
FF475C5056EB60A277696BA9 /* Pods-WordPressAuthenticatorTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WordPressAuthenticatorTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-WordPressAuthenticatorTests/Pods-WordPressAuthenticatorTests.release.xcconfig"; sourceTree = "<group>"; };
275281
FF629D9522393500004C4106 /* WordPressAuthenticator.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WordPressAuthenticator.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
@@ -511,6 +517,9 @@
511517
B56090EE208A527000399AE4 /* String+Underline.swift */,
512518
B56090EC208A527000399AE4 /* WPStyleGuide+Login.swift */,
513519
B5CDBED320B4714500BC1EF2 /* UIImage+Assets.swift */,
520+
CEDE0D92242011E000CB3345 /* NSObject+Helpers.swift */,
521+
CEDE0D942420121D00CB3345 /* UIStoryboard+Helpers.swift */,
522+
CEDE0D962420126900CB3345 /* UIViewController+Helpers.swift */,
514523
);
515524
path = Extensions;
516525
sourceTree = "<group>";
@@ -918,10 +927,12 @@
918927
B56090E2208A4F9D00399AE4 /* WPNUXSecondaryButton.m in Sources */,
919928
B56090E6208A4F9D00399AE4 /* WPNUXPrimaryButton.m in Sources */,
920929
B5609135208A563800399AE4 /* LoginWPComViewController.swift in Sources */,
930+
CEDE0D972420126900CB3345 /* UIViewController+Helpers.swift in Sources */,
921931
B5609119208A555600399AE4 /* SiteInfoHeaderView.swift in Sources */,
922932
B560913E208A563800399AE4 /* SigninEditingState.swift in Sources */,
923933
B56090CF208A4F5400399AE4 /* NUXCollectionViewController.swift in Sources */,
924934
1A21EE9822832BC300C940C6 /* WordPressComOAuthClientFacade+Swift.swift in Sources */,
935+
CEDE0D952420121D00CB3345 /* UIStoryboard+Helpers.swift in Sources */,
925936
B5ED7920207E993E00A8FD8C /* WPAuthenticatorLogging.m in Sources */,
926937
B5609138208A563800399AE4 /* LoginSiteAddressViewController.swift in Sources */,
927938
B560910B208A54F800399AE4 /* LoginFacade.m in Sources */,
@@ -931,6 +942,7 @@
931942
3F550D5323DA4AC6007E5897 /* URLHandler.swift in Sources */,
932943
98C9195B2308E3DA00A90E12 /* AppleAuthenticator.swift in Sources */,
933944
B56090F9208A533200399AE4 /* WordPressAuthenticator+Events.swift in Sources */,
945+
CEDE0D93242011E000CB3345 /* NSObject+Helpers.swift in Sources */,
934946
020BE74A23B0BD2E007FE54C /* WordPressAuthenticatorDisplayImages.swift in Sources */,
935947
B560913A208A563800399AE4 /* LoginLinkRequestViewController.swift in Sources */,
936948
B560910C208A54F800399AE4 /* WordPressComOAuthClientFacade.m in Sources */,

WordPressAuthenticator.xcodeproj/xcshareddata/xcschemes/WordPressAuthenticator.xcscheme

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1010"
3+
LastUpgradeVersion = "1130"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -27,6 +27,15 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<MacroExpansion>
31+
<BuildableReference
32+
BuildableIdentifier = "primary"
33+
BlueprintIdentifier = "B5ED78F3207E976500A8FD8C"
34+
BuildableName = "WordPressAuthenticator.framework"
35+
BlueprintName = "WordPressAuthenticator"
36+
ReferencedContainer = "container:WordPressAuthenticator.xcodeproj">
37+
</BuildableReference>
38+
</MacroExpansion>
3039
<Testables>
3140
<TestableReference
3241
skipped = "NO">
@@ -39,17 +48,6 @@
3948
</BuildableReference>
4049
</TestableReference>
4150
</Testables>
42-
<MacroExpansion>
43-
<BuildableReference
44-
BuildableIdentifier = "primary"
45-
BlueprintIdentifier = "B5ED78F3207E976500A8FD8C"
46-
BuildableName = "WordPressAuthenticator.framework"
47-
BlueprintName = "WordPressAuthenticator"
48-
ReferencedContainer = "container:WordPressAuthenticator.xcodeproj">
49-
</BuildableReference>
50-
</MacroExpansion>
51-
<AdditionalOptions>
52-
</AdditionalOptions>
5351
</TestAction>
5452
<LaunchAction
5553
buildConfiguration = "Debug"
@@ -70,8 +68,6 @@
7068
ReferencedContainer = "container:WordPressAuthenticator.xcodeproj">
7169
</BuildableReference>
7270
</MacroExpansion>
73-
<AdditionalOptions>
74-
</AdditionalOptions>
7571
</LaunchAction>
7672
<ProfileAction
7773
buildConfiguration = "Release"

WordPressAuthenticator/Authenticator/WordPressAuthenticator.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ import AuthenticationServices
147147
trackOpenedLogin()
148148
}
149149

150-
let storyboard = UIStoryboard(name: "Login", bundle: bundle)
150+
let storyboard = Storyboard.login.instance
151151
if let controller = storyboard.instantiateInitialViewController() {
152152
if let childController = controller.children.first as? LoginPrologueViewController {
153153
childController.loginFields.restrictToWPCom = restrictToWPCom
@@ -164,8 +164,7 @@ import AuthenticationServices
164164
trackOpenedLogin()
165165
}
166166

167-
let storyboard = UIStoryboard(name: "Login", bundle: bundle)
168-
guard let controller = storyboard.instantiateViewController(withIdentifier: "emailEntry") as? LoginEmailViewController else {
167+
guard let controller = LoginEmailViewController.instantiate(from: .login) else {
169168
return
170169
}
171170

@@ -231,8 +230,7 @@ import AuthenticationServices
231230
/// This allows the host app to configure the controller's features.
232231
///
233232
public class func signinForWPCom() -> LoginEmailViewController {
234-
let storyboard = UIStoryboard(name: "Login", bundle: bundle)
235-
guard let controller = storyboard.instantiateViewController(withIdentifier: "emailEntry") as? LoginEmailViewController else {
233+
guard let controller = LoginEmailViewController.instantiate(from: .login) else {
236234
fatalError()
237235
}
238236

WordPressAuthenticator/Authenticator/WordPressAuthenticatorStyles.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ public struct WordPressAuthenticatorStyle {
5959

6060
public let textFieldBackgroundColor: UIColor
6161

62+
// If not specified, falls back to viewControllerBackgroundColor.
63+
public let buttonViewBackgroundColor: UIColor
64+
6265
/// Style: nav bar
6366
///
6467
public let navBarImage: UIImage
@@ -79,7 +82,7 @@ public struct WordPressAuthenticatorStyle {
7982

8083
/// Designated initializer
8184
///
82-
public init(primaryNormalBackgroundColor: UIColor, primaryNormalBorderColor: UIColor?, primaryHighlightBackgroundColor: UIColor, primaryHighlightBorderColor: UIColor?, secondaryNormalBackgroundColor: UIColor, secondaryNormalBorderColor: UIColor, secondaryHighlightBackgroundColor: UIColor, secondaryHighlightBorderColor: UIColor, disabledBackgroundColor: UIColor, disabledBorderColor: UIColor, primaryTitleColor: UIColor, secondaryTitleColor: UIColor, disabledTitleColor: UIColor, textButtonColor: UIColor, textButtonHighlightColor: UIColor, instructionColor: UIColor, subheadlineColor: UIColor, placeholderColor: UIColor, viewControllerBackgroundColor: UIColor, textFieldBackgroundColor: UIColor, navBarImage: UIImage, navBarBadgeColor: UIColor, prologueBackgroundColor: UIColor = WPStyleGuide.wordPressBlue(), prologueTitleColor: UIColor = .white, statusBarStyle: UIStatusBarStyle = .lightContent) {
85+
public init(primaryNormalBackgroundColor: UIColor, primaryNormalBorderColor: UIColor?, primaryHighlightBackgroundColor: UIColor, primaryHighlightBorderColor: UIColor?, secondaryNormalBackgroundColor: UIColor, secondaryNormalBorderColor: UIColor, secondaryHighlightBackgroundColor: UIColor, secondaryHighlightBorderColor: UIColor, disabledBackgroundColor: UIColor, disabledBorderColor: UIColor, primaryTitleColor: UIColor, secondaryTitleColor: UIColor, disabledTitleColor: UIColor, textButtonColor: UIColor, textButtonHighlightColor: UIColor, instructionColor: UIColor, subheadlineColor: UIColor, placeholderColor: UIColor, viewControllerBackgroundColor: UIColor, textFieldBackgroundColor: UIColor, buttonViewBackgroundColor: UIColor? = nil, navBarImage: UIImage, navBarBadgeColor: UIColor, prologueBackgroundColor: UIColor = WPStyleGuide.wordPressBlue(), prologueTitleColor: UIColor = .white, statusBarStyle: UIStatusBarStyle = .lightContent) {
8386
self.primaryNormalBackgroundColor = primaryNormalBackgroundColor
8487
self.primaryNormalBorderColor = primaryNormalBorderColor
8588
self.primaryHighlightBackgroundColor = primaryHighlightBackgroundColor
@@ -100,6 +103,7 @@ public struct WordPressAuthenticatorStyle {
100103
self.placeholderColor = placeholderColor
101104
self.viewControllerBackgroundColor = viewControllerBackgroundColor
102105
self.textFieldBackgroundColor = textFieldBackgroundColor
106+
self.buttonViewBackgroundColor = buttonViewBackgroundColor ?? viewControllerBackgroundColor
103107
self.navBarImage = navBarImage
104108
self.navBarBadgeColor = navBarBadgeColor
105109
self.prologueBackgroundColor = prologueBackgroundColor
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
import Foundation
3+
4+
5+
// MARK - NSObject Helper Methods
6+
//
7+
extension NSObject {
8+
9+
/// Returns the receiver's classname as a string, not including the namespace.
10+
///
11+
class var classNameWithoutNamespaces: String {
12+
return String(describing: self)
13+
}
14+
}

0 commit comments

Comments
 (0)