Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature - New ImageDownloader Initializer Accepting Manager #32

Merged
merged 1 commit into from
Oct 14, 2015

Conversation

cnoon
Copy link
Member

@cnoon cnoon commented Oct 10, 2015

This PR adds the ability for the ImageDownloader to accept a custom Alamofire Manager instance directly rather than having to initialize one from an NSURLSessionConfiguration. When using this in tandem with the new initializers in Alamofire 3.0, the user now has FULL control over all the NSURLSession initialization.

Default behavior here is still exactly the same. This just adds a new custom initializer.

@cnoon
Copy link
Member Author

cnoon commented Oct 10, 2015

cc @kcharwood and @jshier

@cnoon cnoon added this to the 2.0.0 milestone Oct 10, 2015
@cnoon cnoon self-assigned this Oct 10, 2015
@@ -86,17 +86,23 @@ public class ImageDownloader {
/// The credential used for authenticating each download request.
public private(set) var credential: NSURLCredential?

var queuedRequests: [Request]
var activeRequestCount: Int
let sessionManager: Alamofire.Manager
Copy link
Contributor

Choose a reason for hiding this comment

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

Docs?

Copy link
Member Author

Choose a reason for hiding this comment

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

Don't generally put docstrings on anything other than public properties unless they aren't self documenting.

cnoon added a commit that referenced this pull request Oct 14, 2015
…lization

Feature - New ImageDownloader Initializer Accepting Manager
@cnoon cnoon merged commit 4c5f9f6 into master Oct 14, 2015
@cnoon cnoon deleted the feature/image_downloader_initialization branch October 14, 2015 15:13
@cnoon cnoon mentioned this pull request Oct 14, 2015
@phongleq
Copy link

Is this available through cocoa pods yet?

@cnoon
Copy link
Member Author

cnoon commented Oct 15, 2015

It is not @phongleq. Working on getting it out here soon. Should drop tonight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants