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

Commit a084f94

Browse files
authored
Merge pull request #177 from wordpress-mobile/release/1.10.6
Release/1.10.6
2 parents bc67d6a + ff6130b commit a084f94

18 files changed

+138
-16
lines changed

Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def wordpress_authenticator_pods
1111
##
1212
pod 'Gridicons', '~> 0.15'
1313
pod 'WordPressUI', '~> 1.4-beta.1'
14-
pod 'WordPressKit', '~> 4.5.5'
14+
pod 'WordPressKit', '~> 4.5.6-beta.1'
1515
# pod 'WordPressKit', :git => 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', :branch => 'issue/apple_2fa_auth'
1616
pod 'WordPressShared', '~> 1.8'
1717

Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ PODS:
4444
- Specta (1.0.7)
4545
- SVProgressHUD (2.2.5)
4646
- UIDeviceIdentifier (1.4.0)
47-
- WordPressKit (4.5.5):
47+
- WordPressKit (4.5.6-beta.1):
4848
- Alamofire (~> 4.7.3)
4949
- CocoaLumberjack (~> 3.4)
5050
- NSObject-SafeExpectations (= 0.0.3)
@@ -71,7 +71,7 @@ DEPENDENCIES:
7171
- OHHTTPStubs/Swift (= 8.0.0)
7272
- Specta (= 1.0.7)
7373
- SVProgressHUD (= 2.2.5)
74-
- WordPressKit (~> 4.5.5)
74+
- WordPressKit (~> 4.5.6-beta.1)
7575
- WordPressShared (~> 1.8)
7676
- WordPressUI (~> 1.4-beta.1)
7777

@@ -117,11 +117,11 @@ SPEC CHECKSUMS:
117117
Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66
118118
SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6
119119
UIDeviceIdentifier: 44f805037d21b94394821828f4fcaba34b38c2d0
120-
WordPressKit: 8029cb93a89de79442254c346523da11c2706d7b
120+
WordPressKit: eb6742df639843f5e7b2da9450da39d222b22ab8
121121
WordPressShared: 09cf184caa614835f5811e8609227165201e6d3e
122122
WordPressUI: 35b144885c8e5817ba6874b68accc200bda61ee1
123123
wpxmlrpc: 6ba55c773cfa27083ae4a2173e69b19f46da98e2
124124

125-
PODFILE CHECKSUM: e4f5f036a95bf5e1df937bfa7d2d24b4ee5bbb18
125+
PODFILE CHECKSUM: 0efdfa2e4fbdc215152337ee314105a404d69957
126126

127127
COCOAPODS: 1.8.4

WordPressAuthenticator.podspec

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

66
s.description = <<-DESC
@@ -39,6 +39,6 @@ Pod::Spec.new do |s|
3939
s.dependency 'Gridicons', '~> 0.15'
4040
s.dependency 'GoogleSignIn', '~> 4.4'
4141
s.dependency 'WordPressUI', '~> 1.4-beta.1'
42-
s.dependency 'WordPressKit', '~> 4.5.5'
42+
s.dependency 'WordPressKit', '~> 4.5.6-beta.1'
4343
s.dependency 'WordPressShared', '~> 1.8'
4444
end

WordPressAuthenticator.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
020BE74A23B0BD2E007FE54C /* WordPressAuthenticatorDisplayImages.swift in Sources */ = {isa = PBXBuildFile; fileRef = 020BE74923B0BD2E007FE54C /* WordPressAuthenticatorDisplayImages.swift */; };
1011
1A21EE9822832BC300C940C6 /* WordPressComOAuthClientFacade+Swift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A21EE9722832BC200C940C6 /* WordPressComOAuthClientFacade+Swift.swift */; };
1112
1A4095182271AEFC009AA86D /* WPAuthenticator-Swift.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A4095152271AEFC009AA86D /* WPAuthenticator-Swift.h */; settings = {ATTRIBUTES = (Private, ); }; };
1213
7A7A9B9CD2D81959F9AB9AF6 /* Pods_WordPressAuthenticator.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C736FF243DE333FCAB1C2614 /* Pods_WordPressAuthenticator.framework */; };
@@ -142,6 +143,7 @@
142143
/* End PBXCopyFilesBuildPhase section */
143144

144145
/* Begin PBXFileReference section */
146+
020BE74923B0BD2E007FE54C /* WordPressAuthenticatorDisplayImages.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WordPressAuthenticatorDisplayImages.swift; sourceTree = "<group>"; };
145147
1A21EE9722832BC200C940C6 /* WordPressComOAuthClientFacade+Swift.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "WordPressComOAuthClientFacade+Swift.swift"; sourceTree = "<group>"; };
146148
1A4095152271AEFC009AA86D /* WPAuthenticator-Swift.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "WPAuthenticator-Swift.h"; sourceTree = "<group>"; };
147149
276354F054C34AD36CA32AB6 /* Pods-WordPressAuthenticator.release-alpha.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WordPressAuthenticator.release-alpha.xcconfig"; path = "Pods/Target Support Files/Pods-WordPressAuthenticator/Pods-WordPressAuthenticator.release-alpha.xcconfig"; sourceTree = "<group>"; };
@@ -433,6 +435,7 @@
433435
B56090F6208A533200399AE4 /* WordPressSupportSourceTag.swift */,
434436
CE1B18CF20EEC41600BECC3F /* WordPressAuthenticatorConfiguration.swift */,
435437
CE1B18D120EEC44400BECC3F /* WordPressAuthenticatorStyles.swift */,
438+
020BE74923B0BD2E007FE54C /* WordPressAuthenticatorDisplayImages.swift */,
436439
CE16177421B6D82200B82A47 /* WordPressAuthenticatorDisplayStrings.swift */,
437440
);
438441
path = Authenticator;
@@ -879,6 +882,7 @@
879882
B5609139208A563800399AE4 /* LoginEmailViewController.swift in Sources */,
880883
98C9195B2308E3DA00A90E12 /* AppleAuthenticator.swift in Sources */,
881884
B56090F9208A533200399AE4 /* WordPressAuthenticator+Events.swift in Sources */,
885+
020BE74A23B0BD2E007FE54C /* WordPressAuthenticatorDisplayImages.swift in Sources */,
882886
B560913A208A563800399AE4 /* LoginLinkRequestViewController.swift in Sources */,
883887
B560910C208A54F800399AE4 /* WordPressComOAuthClientFacade.m in Sources */,
884888
B55272C320B2FE4100E18BC5 /* WPAuthenticatorLoggingPrivate.m in Sources */,

WordPressAuthenticator/Authenticator/WordPressAuthenticator.swift

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ import AuthenticationServices
4040
///
4141
public let style: WordPressAuthenticatorStyle
4242

43+
/// Authenticator's Display Images.
44+
///
45+
public let displayImages: WordPressAuthenticatorDisplayImages
46+
4347
/// Authenticator's Display Texts.
4448
///
4549
public let displayStrings: WordPressAuthenticatorDisplayStrings
@@ -65,22 +69,28 @@ import AuthenticationServices
6569
///
6670
private init(configuration: WordPressAuthenticatorConfiguration,
6771
style: WordPressAuthenticatorStyle,
72+
displayImages: WordPressAuthenticatorDisplayImages,
6873
displayStrings: WordPressAuthenticatorDisplayStrings) {
6974
self.configuration = configuration
7075
self.style = style
76+
self.displayImages = displayImages
7177
self.displayStrings = displayStrings
7278
}
7379

7480
/// Initializes the WordPressAuthenticator with the specified Configuration.
7581
///
7682
public static func initialize(configuration: WordPressAuthenticatorConfiguration,
7783
style: WordPressAuthenticatorStyle,
84+
displayImages: WordPressAuthenticatorDisplayImages = .defaultImages,
7885
displayStrings: WordPressAuthenticatorDisplayStrings = .defaultStrings) {
7986
guard privateInstance == nil else {
8087
fatalError("WordPressAuthenticator is already initialized")
8188
}
8289

83-
privateInstance = WordPressAuthenticator(configuration: configuration, style: style, displayStrings: displayStrings)
90+
privateInstance = WordPressAuthenticator(configuration: configuration,
91+
style: style,
92+
displayImages: displayImages,
93+
displayStrings: displayStrings)
8494
}
8595

8696
// MARK: - Public Methods
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// MARK: - WordPress Authenticator Display Images
2+
//
3+
public struct WordPressAuthenticatorDisplayImages {
4+
public let magicLink: UIImage
5+
public let siteAddressModalPlaceholder: UIImage
6+
7+
/// Designated initializer.
8+
///
9+
public init(magicLink: UIImage, siteAddressModalPlaceholder: UIImage) {
10+
self.magicLink = magicLink
11+
self.siteAddressModalPlaceholder = siteAddressModalPlaceholder
12+
}
13+
}
14+
15+
public extension WordPressAuthenticatorDisplayImages {
16+
static var defaultImages: WordPressAuthenticatorDisplayImages {
17+
return WordPressAuthenticatorDisplayImages(
18+
magicLink: .magicLinkImage,
19+
siteAddressModalPlaceholder: .siteAddressModalPlaceholder
20+
)
21+
}
22+
}

WordPressAuthenticator/Authenticator/WordPressAuthenticatorDisplayStrings.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ public extension WordPressAuthenticatorDisplayStrings {
2525
static var defaultStrings: WordPressAuthenticatorDisplayStrings {
2626
return WordPressAuthenticatorDisplayStrings(emailLoginInstructions: NSLocalizedString("Log in to your WordPress.com account with your email address.", comment: "Instruction text on the login's email address screen."),
2727
jetpackLoginInstructions: NSLocalizedString("Log in to the WordPress.com account you used to connect Jetpack.", comment: "Instruction text on the login's email address screen."),
28-
siteLoginInstructions: NSLocalizedString("Enter the address of your WordPress site you'd like to connect.", comment: "Instruction text on the login's site addresss screen."))
28+
siteLoginInstructions: NSLocalizedString("Enter the address of the WordPress site you'd like to connect.", comment: "Instruction text on the login's site addresss screen."))
2929
}
3030
}

WordPressAuthenticator/Extensions/FancyAlertViewController+LoginError.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ extension FancyAlertViewController {
3434
}
3535
}
3636

37-
let image = UIImage.siteAddressModalPlaceholder
37+
let image = WordPressAuthenticator.shared.displayImages.siteAddressModalPlaceholder
3838

3939
let config = FancyAlertViewController.Config(titleText: Strings.titleText,
4040
bodyText: Strings.bodyText,

WordPressAuthenticator/Extensions/UIImage+Assets.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ import Foundation
44
// MARK: - Named Assets
55
//
66
extension UIImage {
7+
/// Returns the Link Image.
8+
///
9+
static var linkFieldImage: UIImage {
10+
return UIImage(named: "icon-url-field", in: bundle, compatibleWith: nil)!
11+
}
12+
13+
/// Returns the Default Magic Link Image.
14+
///
15+
static var magicLinkImage: UIImage {
16+
return UIImage(named: "login-magic-link", in: bundle, compatibleWith: nil)!
17+
}
718

819
/// Returns the Default Site Icon Placeholder Image.
920
///

WordPressAuthenticator/Extensions/WPStyleGuide+Login.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ extension WPStyleGuide {
4747
onePasswordButton.setImage(.onePasswordImage, for: .normal)
4848
onePasswordButton.sizeToFit()
4949

50+
onePasswordButton.accessibilityLabel =
51+
NSLocalizedString("Fill with password manager", comment: "The password manager button in login pages. The button opens a dialog showing which password manager to use (e.g. 1Password, LastPass). ")
52+
5053
textField.rightView = onePasswordButton
5154
textField.rightViewMode = .always
5255

0 commit comments

Comments
 (0)