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

Commit e5f5971

Browse files
committed
Merge branch 'trunk' into fix/circular-gravatar
# Conflicts: # WordPressAuthenticator.podspec # WordPressAuthenticator/Unified Auth/View Related/Reusable Views/GravatarEmailTableViewCell.xib
2 parents 19e2cde + d70e113 commit e5f5971

40 files changed

+104
-665
lines changed

.buildkite/pipeline.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Nodes with values to reuse in the pipeline.
22
common_params:
33
plugins: &common_plugins
4-
- &bash_cache automattic/bash-cache#v1.5.0: ~
4+
- &bash_cache automattic/bash-cache#2.0.0: ~
55
env: &common_env
6-
IMAGE_ID: xcode-12.5.1
6+
IMAGE_ID: xcode-13
77

88
# This is the default pipeline – it will build and test the pod
99
steps:
@@ -12,7 +12,10 @@ steps:
1212
#################
1313
- label: "🧪 Build and Test"
1414
key: "test"
15-
command: "build_and_test_pod"
15+
command: |
16+
# See https://github.com/Automattic/bash-cache-buildkite-plugin/issues/16
17+
gem install bundler:2.3.4
18+
build_and_test_pod
1619
env: *common_env
1720
plugins: *common_plugins
1821

@@ -21,7 +24,10 @@ steps:
2124
#################
2225
- label: "🔬 Validate Podspec"
2326
key: "validate"
24-
command: "validate_podspec"
27+
command: |
28+
# See https://github.com/Automattic/bash-cache-buildkite-plugin/issues/16
29+
gem install bundler:2.3.4
30+
validate_podspec
2531
env: *common_env
2632
plugins: *common_plugins
2733

@@ -30,7 +36,10 @@ steps:
3036
#################
3137
- label: "🧹 Lint"
3238
key: "lint"
33-
command: "lint_pod"
39+
command: |
40+
# See https://github.com/Automattic/bash-cache-buildkite-plugin/issues/16
41+
gem install bundler:2.3.4
42+
lint_pod
3443
env: *common_env
3544
plugins: *common_plugins
3645

.buildkite/publish-pod.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ SPECS_REPO="[email protected]:wordpress-mobile/cocoapods-specs.git"
55
SLACK_WEBHOOK=$PODS_SLACK_WEBHOOK
66

77
echo "--- :rubygems: Setting up Gems"
8+
# See https://github.com/Automattic/bash-cache-buildkite-plugin/issues/16
9+
gem install bundler:2.3.4
10+
811
install_gems
912

1013
echo "--- :cocoapods: Publishing Pod to CocoaPods CDN"

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.6.4
1+
2.7.4

Podfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ platform :ios, ios_deployment_target
1313
## =====================
1414
##
1515
def third_party_pods
16-
pod '1PasswordExtension', '1.8.6'
1716
pod 'Alamofire', '4.8'
1817
pod 'CocoaLumberjack', '3.5.2'
1918
pod 'GoogleSignIn', '6.0.1'

Podfile.lock

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
PODS:
2-
- 1PasswordExtension (1.8.6)
32
- Alamofire (4.8.0)
43
- AppAuth (1.4.0):
54
- AppAuth/Core (= 1.4.0)
@@ -43,7 +42,6 @@ PODS:
4342
- wpxmlrpc (0.9.0)
4443

4544
DEPENDENCIES:
46-
- 1PasswordExtension (= 1.8.6)
4745
- Alamofire (= 4.8)
4846
- CocoaLumberjack (= 3.5.2)
4947
- Expecta (= 1.0.6)
@@ -60,7 +58,6 @@ DEPENDENCIES:
6058

6159
SPEC REPOS:
6260
trunk:
63-
- 1PasswordExtension
6461
- Alamofire
6562
- AppAuth
6663
- CocoaLumberjack
@@ -83,7 +80,6 @@ SPEC REPOS:
8380
- wpxmlrpc
8481

8582
SPEC CHECKSUMS:
86-
1PasswordExtension: f97cc80ae58053c331b2b6dc8843ba7103b33794
8783
Alamofire: 3ec537f71edc9804815215393ae2b1a8ea33a844
8884
AppAuth: 31bcec809a638d7bd2f86ea8a52bd45f6e81e7c7
8985
CocoaLumberjack: 118bf4a820efc641f79fa487b75ed928dccfae23
@@ -105,6 +101,6 @@ SPEC CHECKSUMS:
105101
WordPressUI: 1cf47a3b78154faf69caa18569ee7ece1e510fa0
106102
wpxmlrpc: bf55a43a7e710bd2a4fb8c02dfe83b1246f14f13
107103

108-
PODFILE CHECKSUM: 7cf50800dab5ef3d524c968936a1fc8242ea023c
104+
PODFILE CHECKSUM: d9073c8eaf970df5ce640ddb8620640ada3e775e
109105

110106
COCOAPODS: 1.10.2

WordPressAuthenticator.podspec

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Pod::Spec.new do |s|
44
s.name = 'WordPressAuthenticator'
5-
s.version = '1.42.2-beta.1'
5+
s.version = '1.43.1-beta.1'
66

77
s.summary = 'WordPressAuthenticator implements an easy and elegant way to authenticate your WordPress Apps.'
88
s.description = <<-DESC
@@ -33,7 +33,6 @@ Pod::Spec.new do |s|
3333
}
3434
s.header_dir = 'WordPressAuthenticator'
3535

36-
s.dependency '1PasswordExtension', '~> 1.8.6'
3736
s.dependency 'Alamofire', '~> 4.8'
3837
s.dependency 'CocoaLumberjack', '~> 3.5'
3938
s.dependency 'lottie-ios', '~> 3.1.6'

WordPressAuthenticator.xcodeproj/project.pbxproj

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@
7878
B560910D208A54F800399AE4 /* WordPressXMLRPCAPIFacade.m in Sources */ = {isa = PBXBuildFile; fileRef = B5609102208A54F800399AE4 /* WordPressXMLRPCAPIFacade.m */; };
7979
B560910E208A54F800399AE4 /* LoginFacade.h in Headers */ = {isa = PBXBuildFile; fileRef = B5609103208A54F800399AE4 /* LoginFacade.h */; settings = {ATTRIBUTES = (Public, ); }; };
8080
B560910F208A54F800399AE4 /* SafariCredentialsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5609104208A54F800399AE4 /* SafariCredentialsService.swift */; };
81-
B5609110208A54F800399AE4 /* OnePasswordFacade.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5609105208A54F800399AE4 /* OnePasswordFacade.swift */; };
8281
B5609111208A54F800399AE4 /* WordPressXMLRPCAPIFacade.h in Headers */ = {isa = PBXBuildFile; fileRef = B5609106208A54F800399AE4 /* WordPressXMLRPCAPIFacade.h */; settings = {ATTRIBUTES = (Public, ); }; };
8382
B5609116208A555600399AE4 /* LoginTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5609112208A555500399AE4 /* LoginTextField.swift */; };
8483
B5609117208A555600399AE4 /* SearchTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5609113208A555500399AE4 /* SearchTableViewCell.swift */; };
@@ -122,8 +121,6 @@
122121
BA53D64824DFDF97001F1ABF /* WordPressSourceTagTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA53D64724DFDF97001F1ABF /* WordPressSourceTagTests.swift */; };
123122
BA53D64B24DFE07D001F1ABF /* WordpressAuthenticatorProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA53D64A24DFE07D001F1ABF /* WordpressAuthenticatorProvider.swift */; };
124123
BA53D64D24DFE4E6001F1ABF /* ModalViewControllerPresentingSpy.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA53D64C24DFE4E6001F1ABF /* ModalViewControllerPresentingSpy.swift */; };
125-
BA53D64F24DFE981001F1ABF /* MockOnePasswordFacade.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA53D64E24DFE981001F1ABF /* MockOnePasswordFacade.swift */; };
126-
BA53D65324DFEA58001F1ABF /* OnePasswordResultsFetcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA53D65224DFEA58001F1ABF /* OnePasswordResultsFetcher.swift */; };
127124
BA70352424F70C9F00B3AA1C /* ModalViewControllerPresenting.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA70352324F70C9F00B3AA1C /* ModalViewControllerPresenting.swift */; };
128125
CE16177521B6D82200B82A47 /* WordPressAuthenticatorDisplayStrings.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE16177421B6D82200B82A47 /* WordPressAuthenticatorDisplayStrings.swift */; };
129126
CE16177821B70C1A00B82A47 /* WordPressAuthenticatorDisplayTextTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE16177721B70C1A00B82A47 /* WordPressAuthenticatorDisplayTextTests.swift */; };
@@ -287,7 +284,6 @@
287284
B5609102208A54F800399AE4 /* WordPressXMLRPCAPIFacade.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WordPressXMLRPCAPIFacade.m; sourceTree = "<group>"; };
288285
B5609103208A54F800399AE4 /* LoginFacade.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginFacade.h; sourceTree = "<group>"; };
289286
B5609104208A54F800399AE4 /* SafariCredentialsService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SafariCredentialsService.swift; sourceTree = "<group>"; };
290-
B5609105208A54F800399AE4 /* OnePasswordFacade.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OnePasswordFacade.swift; sourceTree = "<group>"; };
291287
B5609106208A54F800399AE4 /* WordPressXMLRPCAPIFacade.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WordPressXMLRPCAPIFacade.h; sourceTree = "<group>"; };
292288
B5609112208A555500399AE4 /* LoginTextField.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginTextField.swift; sourceTree = "<group>"; };
293289
B5609113208A555500399AE4 /* SearchTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchTableViewCell.swift; sourceTree = "<group>"; };
@@ -337,8 +333,6 @@
337333
BA53D64724DFDF97001F1ABF /* WordPressSourceTagTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WordPressSourceTagTests.swift; sourceTree = "<group>"; };
338334
BA53D64A24DFE07D001F1ABF /* WordpressAuthenticatorProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WordpressAuthenticatorProvider.swift; sourceTree = "<group>"; };
339335
BA53D64C24DFE4E6001F1ABF /* ModalViewControllerPresentingSpy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ModalViewControllerPresentingSpy.swift; sourceTree = "<group>"; };
340-
BA53D64E24DFE981001F1ABF /* MockOnePasswordFacade.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockOnePasswordFacade.swift; sourceTree = "<group>"; };
341-
BA53D65224DFEA58001F1ABF /* OnePasswordResultsFetcher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OnePasswordResultsFetcher.swift; sourceTree = "<group>"; };
342336
BA70352324F70C9F00B3AA1C /* ModalViewControllerPresenting.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModalViewControllerPresenting.swift; sourceTree = "<group>"; };
343337
C736FF243DE333FCAB1C2614 /* Pods_WordPressAuthenticator.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_WordPressAuthenticator.framework; sourceTree = BUILT_PRODUCTS_DIR; };
344338
CE16177421B6D82200B82A47 /* WordPressAuthenticatorDisplayStrings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WordPressAuthenticatorDisplayStrings.swift; sourceTree = "<group>"; };
@@ -666,8 +660,6 @@
666660
B5609103208A54F800399AE4 /* LoginFacade.h */,
667661
B5609100208A54F800399AE4 /* LoginFacade.m */,
668662
F1AF1BEE24E4A80F00BA453E /* LoginFacade.swift */,
669-
B5609105208A54F800399AE4 /* OnePasswordFacade.swift */,
670-
BA53D65224DFEA58001F1ABF /* OnePasswordResultsFetcher.swift */,
671663
B5609104208A54F800399AE4 /* SafariCredentialsService.swift */,
672664
B56090FE208A54F700399AE4 /* SignupService.swift */,
673665
CE1B18C820EEC2C200BECC3F /* SocialService.swift */,
@@ -821,7 +813,6 @@
821813
BA53D64924DFE06C001F1ABF /* Mocks */ = {
822814
isa = PBXGroup;
823815
children = (
824-
BA53D64E24DFE981001F1ABF /* MockOnePasswordFacade.swift */,
825816
BA53D64C24DFE4E6001F1ABF /* ModalViewControllerPresentingSpy.swift */,
826817
BA53D64A24DFE07D001F1ABF /* WordpressAuthenticatorProvider.swift */,
827818
D85C36EB256E10EA00D56E34 /* MockNavigationController.swift */,
@@ -1138,7 +1129,6 @@
11381129
);
11391130
inputPaths = (
11401131
"${PODS_ROOT}/Target Support Files/Pods-WordPressAuthenticatorTests/Pods-WordPressAuthenticatorTests-frameworks.sh",
1141-
"${BUILT_PRODUCTS_DIR}/1PasswordExtension/OnePasswordExtension.framework",
11421132
"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
11431133
"${BUILT_PRODUCTS_DIR}/AppAuth/AppAuth.framework",
11441134
"${BUILT_PRODUCTS_DIR}/CocoaLumberjack/CocoaLumberjack.framework",
@@ -1162,7 +1152,6 @@
11621152
);
11631153
name = "[CP] Embed Pods Frameworks";
11641154
outputPaths = (
1165-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OnePasswordExtension.framework",
11661155
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
11671156
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AppAuth.framework",
11681157
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CocoaLumberjack.framework",
@@ -1236,7 +1225,6 @@
12361225
B560913E208A563800399AE4 /* SigninEditingState.swift in Sources */,
12371226
CE2D03E024E5DD4500D18942 /* UnifiedSignupViewController.swift in Sources */,
12381227
98CF18F7248725370047B66C /* GoogleSignupConfirmationViewController.swift in Sources */,
1239-
BA53D65324DFEA58001F1ABF /* OnePasswordResultsFetcher.swift in Sources */,
12401228
1A21EE9822832BC300C940C6 /* WordPressComOAuthClientFacade+Swift.swift in Sources */,
12411229
D87F120B2586DA26005675C5 /* SpacerTableViewCell.swift in Sources */,
12421230
CEC77C6624854F2E00FB9050 /* SiteAddressViewController.swift in Sources */,
@@ -1265,7 +1253,6 @@
12651253
CE6BCD3824A3CB5E001BCDC5 /* TextLinkButtonTableViewCell.swift in Sources */,
12661254
CE16177521B6D82200B82A47 /* WordPressAuthenticatorDisplayStrings.swift in Sources */,
12671255
CE1B18CE20EEC3CB00BECC3F /* WordPressAuthenticatorDelegateProtocol.swift in Sources */,
1268-
B5609110208A54F800399AE4 /* OnePasswordFacade.swift in Sources */,
12691256
F180B82424F59263000A01F5 /* StoredCredentialsPicker.swift in Sources */,
12701257
D881A311256B5B4700FE5605 /* NavigateToEnterSite.swift in Sources */,
12711258
B5609109208A54F800399AE4 /* SignupService.swift in Sources */,
@@ -1322,7 +1309,6 @@
13221309
BA53D64D24DFE4E6001F1ABF /* ModalViewControllerPresentingSpy.swift in Sources */,
13231310
BA53D64624DFDE1D001F1ABF /* CredentialsTests.swift in Sources */,
13241311
D85C36EC256E10EA00D56E34 /* MockNavigationController.swift in Sources */,
1325-
BA53D64F24DFE981001F1ABF /* MockOnePasswordFacade.swift in Sources */,
13261312
3F550D4E23DA429B007E5897 /* AppSelectorTests.swift in Sources */,
13271313
BA53D64B24DFE07D001F1ABF /* WordpressAuthenticatorProvider.swift in Sources */,
13281314
CE16177821B70C1A00B82A47 /* WordPressAuthenticatorDisplayTextTests.swift in Sources */,

WordPressAuthenticator/Authenticator/WordPressAuthenticator.swift

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -465,45 +465,8 @@ import WordPressKit
465465
// Otherwise, the default bundle is used for resources
466466
return defaultBundle
467467
}
468-
469-
// MARK: - 1Password Helper
470-
471-
/// Request credentails from 1Password (if supported)
472-
///
473-
/// - Parameter sender: A UIView. Typically the button the user tapped on.
474-
///
475-
class func fetchOnePasswordCredentials(_ controller: UIViewController,
476-
sourceView: UIView,
477-
loginFields: LoginFields,
478-
allowUsernameChange: Bool = true,
479-
onePasswordFetcher: OnePasswordResultsFetcher = OnePasswordFacade(),
480-
success: @escaping ((_ loginFields: LoginFields) -> Void)) {
481-
482-
let loginURL = loginFields.meta.userIsDotCom ? OnePasswordDefaults.dotcomURL : loginFields.siteAddress
483-
484-
onePasswordFetcher.findLogin(for: loginURL, viewController: controller, sender: sourceView, success: { (username, password, otp) in
485-
if allowUsernameChange {
486-
loginFields.username = username
487-
}
488-
489-
loginFields.password = password
490-
loginFields.multifactorCode = otp ?? String()
491-
492-
WordPressAuthenticator.track(.onePasswordLogin)
493-
success(loginFields)
494-
495-
}, failure: { error in
496-
guard error != .cancelledByUser else {
497-
return
498-
}
499-
500-
DDLogError("OnePassword Error: \(error.localizedDescription)")
501-
WordPressAuthenticator.track(.onePasswordFailed)
502-
})
503-
}
504468
}
505469

506-
@available(iOS 13.0, *)
507470
public extension WordPressAuthenticator {
508471

509472
func getAppleIDCredentialState(for userID: String, completion: @escaping (ASAuthorizationAppleIDProvider.CredentialState, Error?) -> Void) {

WordPressAuthenticator/Extensions/UIImage+Assets.swift

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@ extension UIImage {
2222
return UIImage(named: "site-address", in: bundle, compatibleWith: nil) ?? UIImage()
2323
}
2424

25-
/// Returns the Default Gravatar Placeholder Image.
26-
///
27-
@objc
28-
public static var onePasswordImage: UIImage {
29-
return UIImage(named: "onepassword-button", in: bundle, compatibleWith: nil) ?? UIImage()
30-
}
31-
3225
/// Returns the Link Image.
3326
///
3427
@objc

WordPressAuthenticator/Extensions/WPStyleGuide+Login.swift

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -40,74 +40,6 @@ extension WPStyleGuide {
4040
view.backgroundColor = wordPressBlue()
4141
}
4242

43-
/// Adds a 1password button to a WPWalkthroughTextField, if available
44-
/// - Note: this is for the old UI.
45-
///
46-
class func configureOnePasswordButtonForTextfield(_ textField: WPWalkthroughTextField, target: NSObject, selector: Selector) {
47-
guard OnePasswordFacade.isOnePasswordEnabled else {
48-
return
49-
}
50-
51-
let onePasswordButton = UIButton(type: .custom)
52-
onePasswordButton.setImage(.onePasswordImage, for: .normal)
53-
textField.tintColor = WordPressAuthenticator.shared.style.secondaryNormalBorderColor
54-
onePasswordButton.sizeToFit()
55-
56-
onePasswordButton.accessibilityLabel =
57-
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). ")
58-
59-
textField.rightView = onePasswordButton
60-
textField.rightViewMode = .always
61-
62-
onePasswordButton.addTarget(target, action: selector, for: .touchUpInside)
63-
}
64-
65-
/// Adds a 1password button to a stack view, if available
66-
/// - Note: this is for the old UI.
67-
///
68-
class func configureOnePasswordButtonForStackView(_ stack: UIStackView, target: NSObject, selector: Selector) {
69-
guard OnePasswordFacade.isOnePasswordEnabled else {
70-
return
71-
}
72-
73-
let onePasswordButton = UIButton(type: .custom)
74-
onePasswordButton.setImage(.onePasswordImage, for: .normal)
75-
onePasswordButton.tintColor = WordPressAuthenticator.shared.style.secondaryNormalBorderColor
76-
onePasswordButton.sizeToFit()
77-
onePasswordButton.setContentHuggingPriority(.required, for: .horizontal)
78-
onePasswordButton.setContentCompressionResistancePriority(.required, for: .horizontal)
79-
80-
onePasswordButton.accessibilityTraits = .button
81-
onePasswordButton.accessibilityLabel = NSLocalizedString("One Password button", comment: "Accessibility label for 1 password button")
82-
onePasswordButton.accessibilityHint = NSLocalizedString("Opens One Password manager", comment: "Accessibility hint for 1 password button")
83-
84-
stack.addArrangedSubview(onePasswordButton)
85-
86-
onePasswordButton.addTarget(target, action: selector, for: .touchUpInside)
87-
}
88-
89-
/// Adds a 1password button to a UITextField, if available
90-
/// - Note: this is for the Unified styles.
91-
///
92-
class func configureOnePasswordButtonForTextfield(_ textField: UITextField?, tintColor: UIColor?, target: NSObject, selector: Selector) {
93-
guard OnePasswordFacade.isOnePasswordEnabled else {
94-
return
95-
}
96-
97-
let onePasswordButton = UIButton(type: .custom)
98-
onePasswordButton.setImage(.onePasswordImage, for: .normal)
99-
onePasswordButton.tintColor = tintColor
100-
onePasswordButton.sizeToFit()
101-
102-
onePasswordButton.accessibilityLabel =
103-
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). ")
104-
105-
textField?.rightView = onePasswordButton
106-
textField?.rightViewMode = .always
107-
108-
onePasswordButton.addTarget(target, action: selector, for: .touchUpInside)
109-
}
110-
11143
/// Configures a plain text button with default styles.
11244
///
11345
class func configureTextButton(_ button: UIButton) {

0 commit comments

Comments
 (0)