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

Conversation

@mokagio
Copy link
Contributor

@mokagio mokagio commented Feb 21, 2024

This will allow clients that do no need access to WordPressKit (i.e. WooCommerce) to explicitly depend only on WordPressAuthenticator and still configure whether to use URLSession.

See it in use in woocommerce/woocommerce-ios#12063

For context: I discovered this possibility while looking around the apps and the libraries searching for ways to redistribute concerns. I wanted to know how many of the WordPressKit APIs Woo used, go I grepped import WordPressKit. I found a single usage, which this PR plus woocommerce/woocommerce-ios#12063 remove.


  • I have considered if this change warrants release notes and have added them to the appropriate section in the CHANGELOG.md if necessary.

This is so we have access to the `useURLSession` property of the API
classes.
This will allow clients that do no need access to WordPressKit (i.e.
WooCommerce) to explicitly depend only on WordPressAuthenticator and
still configure whether to use `URLSession`.
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

@mokagio mokagio closed this Feb 23, 2024
auto-merge was automatically disabled February 23, 2024 02:21

Pull request was closed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants