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

Commit 86ed09e

Browse files
authored
Remove GoogleSignIn dependency (#777)
2 parents c497067 + 4623f95 commit 86ed09e

File tree

14 files changed

+15
-116
lines changed

14 files changed

+15
-116
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ _None._
5050

5151
## 7.0.0
5252

53+
### Breaking Changes
54+
55+
- Removed dependency GoogleSignIn SDK and flags to configure it [#777]
56+
5357
## 6.3.0
5458

5559
_Note: This should have been 6.2.1 because it contained only a bug fix. Unfortunately we currently don't have automation in place to enfore SemVer. Given a beta had already been released, we went with 6.3.0 stable._

Demo/AuthenticatorDemo/ViewController+WordPressAuthenticator.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import WordPressAuthenticator
44

55
extension ViewController {
66

7-
func initializeWordPressAuthenticator(withGoogleSDK: Bool) {
7+
func initializeWordPressAuthenticator() {
88
// In a proper app, we'd want to split this call to keep the code readable. Here, it's
99
// useful to keep it all in one block to show how insanely long it is.
1010
WordPressAuthenticator.initialize(
@@ -29,8 +29,7 @@ extension ViewController {
2929
enableUnifiedCarousel: true,
3030
// Notice that this is required as well as `enableSignupWithGoogle` to show the
3131
// option to login with Google.
32-
enableSocialLogin: true,
33-
googleLoginWithoutSDK: withGoogleSDK == false
32+
enableSocialLogin: true
3433
),
3534
style: WordPressAuthenticatorStyle(
3635
// Primary (normal and highlight) is the color of buttons such as "Log in or signup

Demo/AuthenticatorDemo/ViewController.swift

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,16 @@ class ViewController: UIViewController {
88

99
/// Add `CellConfiguration` items to add new actionable rows to the table view in `ViewController`.
1010
lazy var configuration: [CellConfiguration] = [
11-
CellConfiguration(text: "Show Login - With Google SDK") { [weak self] in
11+
CellConfiguration(text: "Show Login") { [weak self] in
1212
guard let self else { fatalError() }
1313

14-
self.initializeWordPressAuthenticator(withGoogleSDK: true)
14+
self.initializeWordPressAuthenticator()
1515
WordPressAuthenticator.showLoginFromPresenter(self, animated: true)
1616
},
17-
CellConfiguration(text: "Show Login - Without Google SDK") { [weak self] in
17+
CellConfiguration(text: "Get Google token only") { [weak self] in
1818
guard let self else { fatalError() }
1919

20-
self.initializeWordPressAuthenticator(withGoogleSDK: false)
21-
WordPressAuthenticator.showLoginFromPresenter(self, animated: true)
22-
},
23-
CellConfiguration(text: "Get Google token only - Standalone, Wihout SDK") { [weak self] in
24-
guard let self else { fatalError() }
25-
26-
self.initializeWordPressAuthenticator(withGoogleSDK: false)
20+
self.initializeWordPressAuthenticator()
2721
self.getAuthTokenFromGoogle()
2822
}
2923
]

Podfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ workspace 'WordPressAuthenticator.xcworkspace'
1717
## =====================
1818
##
1919
def third_party_pods
20-
pod 'GoogleSignIn', '6.0.1'
2120
pod 'NSURL+IDN', '0.4'
2221
pod 'SVProgressHUD', '2.2.5'
2322
end

Podfile.lock

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,15 @@
11
PODS:
22
- Alamofire (4.8.2)
3-
- AppAuth (1.4.0):
4-
- AppAuth/Core (= 1.4.0)
5-
- AppAuth/ExternalUserAgent (= 1.4.0)
6-
- AppAuth/Core (1.4.0)
7-
- AppAuth/ExternalUserAgent (1.4.0)
83
- Expecta (1.0.6)
9-
- GoogleSignIn (6.0.1):
10-
- AppAuth (~> 1.4)
11-
- GTMAppAuth (~> 1.0)
12-
- GTMSessionFetcher/Core (~> 1.1)
134
- Gridicons (1.0.1)
14-
- GTMAppAuth (1.2.2):
15-
- AppAuth/Core (~> 1.4)
16-
- GTMSessionFetcher/Core (~> 1.5)
17-
- GTMSessionFetcher/Core (1.6.1)
185
- NSObject-SafeExpectations (0.0.6)
196
- "NSURL+IDN (0.4)"
207
- OCMock (3.8.1)
218
- Specta (1.0.7)
229
- SVProgressHUD (2.2.5)
2310
- SwiftLint (0.49.1)
2411
- UIDeviceIdentifier (2.2.0)
25-
- WordPressAuthenticator (6.3.0):
26-
- GoogleSignIn (~> 6.0.1)
12+
- WordPressAuthenticator (7.0.0-beta.1):
2713
- Gridicons (~> 1.0)
2814
- "NSURL+IDN (= 0.4)"
2915
- SVProgressHUD (~> 2.2.5)
@@ -42,7 +28,6 @@ PODS:
4228

4329
DEPENDENCIES:
4430
- Expecta (= 1.0.6)
45-
- GoogleSignIn (= 6.0.1)
4631
- Gridicons (~> 1.0)
4732
- "NSURL+IDN (= 0.4)"
4833
- OCMock (~> 3.4)
@@ -57,12 +42,8 @@ DEPENDENCIES:
5742
SPEC REPOS:
5843
trunk:
5944
- Alamofire
60-
- AppAuth
6145
- Expecta
62-
- GoogleSignIn
6346
- Gridicons
64-
- GTMAppAuth
65-
- GTMSessionFetcher
6647
- NSObject-SafeExpectations
6748
- "NSURL+IDN"
6849
- OCMock
@@ -81,25 +62,21 @@ EXTERNAL SOURCES:
8162

8263
SPEC CHECKSUMS:
8364
Alamofire: ae5c501addb7afdbb13687d7f2f722c78734c2d3
84-
AppAuth: 31bcec809a638d7bd2f86ea8a52bd45f6e81e7c7
8565
Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5
86-
GoogleSignIn: 1b0c4ec33a6fe282f4fa35d8ac64263230ddaf36
8766
Gridicons: 8e19276b20bb15d1fda1d4d0db96d066d170135b
88-
GTMAppAuth: ad5c2b70b9a8689e1a04033c9369c4915bfcbe89
89-
GTMSessionFetcher: 36689134877faeb055b27dfa4ccc9ceaa42e029e
9067
NSObject-SafeExpectations: c01c8881cbd97efad6f668286b913cd0b7d62ab5
9168
"NSURL+IDN": afc873e639c18138a1589697c3add197fe8679ca
9269
OCMock: 29f6e52085b4e7d9b075cbf03ed7c3112f82f934
9370
Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66
9471
SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6
9572
SwiftLint: 32ee33ded0636d0905ef6911b2b67bbaeeedafa5
9673
UIDeviceIdentifier: f33af270ba9045ea18b31d9aab88e42a0082ea67
97-
WordPressAuthenticator: d77d347e638e0c80d5539b3d7bd12140ada16845
74+
WordPressAuthenticator: 31b2b358ec1b5c724998f3944b20c29be9be1c95
9875
WordPressKit: 8e1c5a64645a59493a7316f38468ac036de9c79b
9976
WordPressShared: 0aa459e5257a77184db87805a998f447443c9706
10077
WordPressUI: 1cf47a3b78154faf69caa18569ee7ece1e510fa0
10178
wpxmlrpc: 68db063041e85d186db21f674adf08d9c70627fd
10279

103-
PODFILE CHECKSUM: c9f023378cc56b2cc3b60aae45af6fea750fe085
80+
PODFILE CHECKSUM: 39d49f77667f2645b9a7575b7288487421a70c5d
10481

10582
COCOAPODS: 1.11.3

WordPressAuthenticator.podspec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ Pod::Spec.new do |s|
3636
s.dependency 'NSURL+IDN', '0.4'
3737
s.dependency 'SVProgressHUD', '~> 2.2.5'
3838
s.dependency 'Gridicons', '~> 1.0'
39-
s.dependency 'GoogleSignIn', '~> 6.0.1'
4039

4140
# Use a loose restriction that allows both production and beta versions, up to the next major version.
4241
# If you want to update which of these is used, specify it in the host app.

WordPressAuthenticator.xcodeproj/project.pbxproj

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,10 +1362,6 @@
13621362
inputPaths = (
13631363
"${PODS_ROOT}/Target Support Files/Pods-WordPressAuthenticatorTests/Pods-WordPressAuthenticatorTests-frameworks.sh",
13641364
"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
1365-
"${BUILT_PRODUCTS_DIR}/AppAuth/AppAuth.framework",
1366-
"${BUILT_PRODUCTS_DIR}/GTMAppAuth/GTMAppAuth.framework",
1367-
"${BUILT_PRODUCTS_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework",
1368-
"${BUILT_PRODUCTS_DIR}/GoogleSignIn/GoogleSignIn.framework",
13691365
"${BUILT_PRODUCTS_DIR}/Gridicons/Gridicons.framework",
13701366
"${BUILT_PRODUCTS_DIR}/NSObject-SafeExpectations/NSObject_SafeExpectations.framework",
13711367
"${BUILT_PRODUCTS_DIR}/NSURL+IDN/NSURL_IDN.framework",
@@ -1382,10 +1378,6 @@
13821378
name = "[CP] Embed Pods Frameworks";
13831379
outputPaths = (
13841380
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
1385-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AppAuth.framework",
1386-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GTMAppAuth.framework",
1387-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GTMSessionFetcher.framework",
1388-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleSignIn.framework",
13891381
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Gridicons.framework",
13901382
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/NSObject_SafeExpectations.framework",
13911383
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/NSURL_IDN.framework",

WordPressAuthenticator/Authenticator/WordPressAuthenticator.swift

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import AuthenticationServices
2-
import GoogleSignIn
32
import NSURL_IDN
43
import UIKit
54
import WordPressShared
@@ -129,12 +128,6 @@ import WordPressKit
129128
return url.absoluteString.hasPrefix(expectedPrefix)
130129
}
131130

132-
/// Attempts to process the specified URL as a Google Authentication Link. Returns *true* on success.
133-
///
134-
@objc public func handleGoogleAuthUrl(_ url: URL, sourceApplication: String?, annotation: Any?) -> Bool {
135-
return GIDSignIn.sharedInstance.handle(url)
136-
}
137-
138131
/// Attempts to process the specified URL as a WordPress Authentication Link. Returns *true* on success.
139132
///
140133
@objc public func handleWordPressAuthUrl(_ url: URL, rootViewController: UIViewController, automatedTesting: Bool = false) -> Bool {

WordPressAuthenticator/Authenticator/WordPressAuthenticatorConfiguration.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import GoogleSignIn
21
import WordPressKit
32

43
// MARK: - WordPressAuthenticator Configuration
@@ -55,8 +54,6 @@ public struct WordPressAuthenticatorConfiguration {
5554
return clientId
5655
}
5756

58-
let googleLoginWithoutSDK: Bool
59-
6057
/// UserAgent
6158
///
6259
let userAgent: String
@@ -209,8 +206,7 @@ public struct WordPressAuthenticatorConfiguration {
209206
enableManualSiteCredentialLogin: Bool = false,
210207
enableManualErrorHandlingForSiteCredentialLogin: Bool = false,
211208
useEnterEmailAddressAsStepValueForGetStartedVC: Bool = false,
212-
enableSiteAddressLoginOnlyInPrologue: Bool = false,
213-
googleLoginWithoutSDK: Bool = false
209+
enableSiteAddressLoginOnlyInPrologue: Bool = false
214210
) {
215211

216212
self.wpcomClientId = wpcomClientId
@@ -223,7 +219,6 @@ public struct WordPressAuthenticatorConfiguration {
223219
self.googleLoginClientId = googleLoginClientId
224220
self.googleLoginServerClientId = googleLoginServerClientId
225221
self.googleLoginScheme = googleLoginScheme
226-
self.googleLoginWithoutSDK = googleLoginWithoutSDK
227222
self.userAgent = userAgent
228223
self.showLoginOptions = showLoginOptions
229224
self.enableSignUp = enableSignUp

WordPressAuthenticator/Model/LoginFields.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import Foundation
2-
import GoogleSignIn
32
import WordPressKit
43

54
/// LoginFields is a state container for user textfield input on the login screens

0 commit comments

Comments
 (0)