Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ PODS:
- Gridicons (~> 1.0)
- "NSURL+IDN (= 0.4)"
- SVProgressHUD (~> 2.2.5)
- WordPressKit (~> 13.0)
- WordPressKit (~> 13.1)
- WordPressShared (~> 2.1-beta)
- WordPressUI (~> 1.7-beta)
- WordPressKit (13.0.0):
- WordPressKit (13.1.0):
- Alamofire (~> 4.8.0)
- NSObject-SafeExpectations (~> 0.0.4)
- UIDeviceIdentifier (~> 2.0)
Expand All @@ -40,8 +40,6 @@ DEPENDENCIES:
- WordPressUI (~> 1.7-beta)

SPEC REPOS:
https://github.com/wordpress-mobile/cocoapods-specs.git:
- WordPressKit
trunk:
- Alamofire
- Expecta
Expand All @@ -53,6 +51,7 @@ SPEC REPOS:
- SVProgressHUD
- SwiftLint
- UIDeviceIdentifier
- WordPressKit
- WordPressShared
- WordPressUI
- wpxmlrpc
Expand All @@ -72,8 +71,8 @@ SPEC CHECKSUMS:
SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6
SwiftLint: c1de071d9d08c8aba837545f6254315bc900e211
UIDeviceIdentifier: 442b65b4ff1832d4ca9c2a157815cb29ad981b17
WordPressAuthenticator: ba69878bfa1368636e92d29fcfb5bd1e0a11a3ef
WordPressKit: 5eb7d27d27f84e875266a72281d0a4b80c825b74
WordPressAuthenticator: 415b7a0957826ebde01f944f540fd502913b8a35
WordPressKit: c1ba7b4f531693a0914f676423808fdffd820d81
WordPressShared: 87f3ee89b0a3e83106106f13a8b71605fb8eb6d2
WordPressUI: a491454affda3b0fb812812e637dc5e8f8f6bd06
wpxmlrpc: 68db063041e85d186db21f674adf08d9c70627fd
Expand Down
2 changes: 1 addition & 1 deletion WordPressAuthenticator.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ Pod::Spec.new do |s|
# Use a loose restriction that allows both production and beta versions, up to the next major version.
# If you want to update which of these is used, specify it in the host app.
s.dependency 'WordPressUI', '~> 1.7-beta'
s.dependency 'WordPressKit', '~> 13.0'
s.dependency 'WordPressKit', '~> 13.1'
s.dependency 'WordPressShared', '~> 2.1-beta'
end
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ import WordPressKit
self.unifiedStyle = unifiedStyle
self.displayImages = displayImages
self.displayStrings = displayStrings

WordPressOrgXMLRPCApi.useURLSession = configuration.useURLSession
WordPressComRestApi.useURLSession = configuration.useURLSession
}

/// Initializes the WordPressAuthenticator with the specified Configuration.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,11 @@ public struct WordPressAuthenticatorConfiguration {
///
let enableSiteAddressLoginOnlyInPrologue: Bool

/// Whether to use `URLSession` or Alamofire for certain requests.
///
/// Defaults to `false` but will soon become `true` as we are actively working to remove Alamofire.
let useURLSession: Bool

/// Designated Initializer
///
public init (wpcomClientId: String,
Expand Down Expand Up @@ -210,7 +215,8 @@ public struct WordPressAuthenticatorConfiguration {
enableManualSiteCredentialLogin: Bool = false,
enableManualErrorHandlingForSiteCredentialLogin: Bool = false,
useEnterEmailAddressAsStepValueForGetStartedVC: Bool = false,
enableSiteAddressLoginOnlyInPrologue: Bool = false
enableSiteAddressLoginOnlyInPrologue: Bool = false,
useURLSession: Bool = false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The useURLSession configuration is a global configuration, using it in an initialiser feels weird to me...

Also, we'll soon (maybe in a couple of weeks) deprecate useURLSession and remove Alamofire from WordPressKit. Maybe not worth adding it to another framework?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. I'm okay to wait, in particular because the useURLSession deprecation should be very near: wordpress-mobile/WordPressKit-iOS#736

) {

self.wpcomClientId = wpcomClientId
Expand Down Expand Up @@ -248,5 +254,6 @@ public struct WordPressAuthenticatorConfiguration {
self.enableManualErrorHandlingForSiteCredentialLogin = enableManualErrorHandlingForSiteCredentialLogin
self.useEnterEmailAddressAsStepValueForGetStartedVC = useEnterEmailAddressAsStepValueForGetStartedVC
self.enableSiteAddressLoginOnlyInPrologue = enableSiteAddressLoginOnlyInPrologue
self.useURLSession = useURLSession
}
}