Skip to content

Commit a6877f9

Browse files
authored
Delete more unused WordPress- Authenticator and Kit sources (#15142)
2 parents 00d8a10 + d2d5488 commit a6877f9

File tree

143 files changed

+0
-9462
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+0
-9462
lines changed

WooCommerce/Classes/Tools/Zendesk/ZendeskManager.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import Foundation
2-
import WordPressAuthenticator
32
#if !targetEnvironment(macCatalyst)
43
import SupportSDK
54
import ZendeskCoreSDK

WooCommerce/Classes/ViewRelated/CardPresentPayments/CardPresentPaymentsModalViewController.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import UIKit
22
import SwiftUI
3-
import WordPressAuthenticator
43
import SafariServices
54

6-
75
/// UI containing modals presented in the Card Present Payments flows.
86
final class CardPresentPaymentsModalViewController: UIViewController, CardReaderModalFlowViewControllerProtocol {
97
/// The view model providing configuration for this view controller

WooCommerce/Classes/ViewRelated/Coupons/Add and Edit Coupons/CouponExpiryDateView.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import SwiftUI
2-
import WordPressAuthenticator
32

43
/// View for selecting a date in SwiftUI.
54
///

WooCommerce/WooCommerce.xcodeproj/project.pbxproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6316,9 +6316,6 @@
63166316
WordPressKit/Services/PostServiceRemoteXMLRPC.h,
63176317
WordPressKit/Services/ServiceRemoteWordPressXMLRPC.h,
63186318
WordPressKit/Services/SiteServiceRemoteWordPressComREST.h,
6319-
WordPressKit/Services/TaxonomyServiceRemote.h,
6320-
WordPressKit/Services/TaxonomyServiceRemoteREST.h,
6321-
WordPressKit/Services/TaxonomyServiceRemoteXMLRPC.h,
63226319
WordPressKit/Services/WordPressComServiceRemote.h,
63236320
"WordPressKit/Utility/NSString+MD5.h",
63246321
);

WooCommerce/WordPressAuthenticator/Authenticator/WordPressAuthenticator.swift

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,6 @@ import WordPressUI
9191
displayStrings: displayStrings)
9292
}
9393

94-
// MARK: - Testing Support
95-
96-
class func isInitialized() -> Bool {
97-
return privateInstance != nil
98-
}
99-
10094
// MARK: - Public Methods
10195

10296
/// Indicates if the received URL is a WordPress.com Authentication Callback.
@@ -114,23 +108,6 @@ import WordPressUI
114108

115109
// MARK: - Helpers for presenting the login flow
116110

117-
/// Shows login UI from the given presenter view controller.
118-
///
119-
/// - Parameters:
120-
/// - presenter: The view controller that presents the login UI.
121-
/// - animated: Whether the login UI is presented with animation.
122-
/// - showCancel: Whether a cancel CTA is shown on the login prologue screen.
123-
/// - restrictToWPCom: Whether only WordPress.com login is enabled.
124-
/// - onLoginButtonTapped: Called when the login button on the prologue screen is tapped.
125-
/// - onCompletion: Called when the login UI presentation completes.
126-
public class func showLogin(from presenter: UIViewController, animated: Bool, showCancel: Bool = false, restrictToWPCom: Bool = false, onLoginButtonTapped: (() -> Void)? = nil, onCompletion: (() -> Void)? = nil) {
127-
guard let loginViewController = loginUI(showCancel: showCancel, restrictToWPCom: restrictToWPCom, onLoginButtonTapped: onLoginButtonTapped) else {
128-
return
129-
}
130-
presenter.present(loginViewController, animated: animated, completion: onCompletion)
131-
trackOpenedLogin()
132-
}
133-
134111
/// Returns the view controller for the login flow.
135112
/// The caller is responsible for tracking `.openedLogin` event when displaying the view controller as in `showLogin`.
136113
///
@@ -278,34 +255,6 @@ import WordPressUI
278255
presenter.present(navController, animated: true, completion: nil)
279256
}
280257

281-
/// Used to present the new self-hosted login flow from BlogListViewController
282-
@objc public class func showLoginForSelfHostedSite(_ presenter: UIViewController) {
283-
defer {
284-
trackOpenedLogin()
285-
}
286-
287-
AuthenticatorAnalyticsTracker.shared.set(source: .selfHosted)
288-
289-
guard let controller = signinForWPOrg() else {
290-
WPAuthenticatorLogError("WordPressAuthenticator: Failed to instantiate Site Address view controller.")
291-
return
292-
}
293-
294-
let navController = LoginNavigationController(rootViewController: controller)
295-
navController.modalPresentationStyle = .fullScreen
296-
presenter.present(navController, animated: true, completion: nil)
297-
}
298-
299-
/// Returns a Site Address view controller: allows the user to log into a WordPress.org website.
300-
///
301-
@objc public class func signinForWPOrg() -> UIViewController? {
302-
guard WordPressAuthenticator.shared.configuration.enableUnifiedAuth else {
303-
return LoginSiteAddressViewController.instantiate(from: .login)
304-
}
305-
306-
return SiteAddressViewController.instantiate(from: .siteAddress)
307-
}
308-
309258
/// Returns a Site Address view controller and triggers the protocol method `troubleshootSite` after fetching the site info.
310259
///
311260
@objc public class func siteDiscoveryUI() -> UIViewController? {

WooCommerce/WordPressAuthenticator/Services/WordPressComBlogService.swift

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,6 @@ class WordPressComBlogService {
1212
return WordPressComRestApi(oAuthToken: nil, userAgent: userAgent, baseURL: baseUrl)
1313
}
1414

15-
/// Retrieves the WordPressComSiteInfo instance associated to a WordPress.com Site Address.
16-
///
17-
func fetchSiteInfo(for address: String, success: @escaping (WordPressComSiteInfo) -> Void, failure: @escaping (Error) -> Void) {
18-
let remote = BlogServiceRemoteREST(wordPressComRestApi: anonymousAPI, siteID: 0)
19-
20-
remote.fetchSiteInfo(forAddress: address, success: { response in
21-
guard let response = response else {
22-
failure(WordPressComBlogServiceError.unknown)
23-
return
24-
}
25-
26-
let site = WordPressComSiteInfo(remote: response)
27-
success(site)
28-
29-
}, failure: { error in
30-
let result = error ?? WordPressComBlogServiceError.unknown
31-
failure(result)
32-
})
33-
}
3415

3516
func fetchUnauthenticatedSiteInfoForAddress(for address: String, success: @escaping (WordPressComSiteInfo) -> Void, failure: @escaping (Error) -> Void) {
3617
let remote = BlogServiceRemoteREST(wordPressComRestApi: anonymousAPI, siteID: 0)

WooCommerce/WordPressAuthenticator/WordPressAuthenticator.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,5 @@ FOUNDATION_EXPORT const unsigned char WordPressAuthenticatorVersionString[];
4747
#import <WordPressAuthenticator/PostServiceRemoteOptions.h>
4848
#import <WordPressAuthenticator/SiteServiceRemoteWordPressComREST.h>
4949
#import <WordPressAuthenticator/ServiceRemoteWordPressXMLRPC.h>
50-
// Used in the tests
51-
#import <WordPressAuthenticator/TaxonomyServiceRemote.h>
5250
// Used _somewhere_ which I haven't followed up yet
5351
#import <WordPressAuthenticator/BlogServiceRemoteXMLRPC.h>
54-
#import <WordPressAuthenticator/TaxonomyServiceRemoteREST.h>
55-
#import <WordPressAuthenticator/TaxonomyServiceRemoteXMLRPC.h>

WooCommerce/WordPressAuthenticator/WordPressKit/Models/AccountSettings.swift

Lines changed: 0 additions & 95 deletions
This file was deleted.

0 commit comments

Comments
 (0)