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 - Network Activity Indicator #1

Merged
merged 8 commits into from Feb 8, 2016

Conversation

cnoon
Copy link
Member

@cnoon cnoon commented Feb 7, 2016

This PR adds the NetworkActivityIndicatorManager class and all the tests to verify behavior. Code coverage is currently at 98% and looking good.

The general approach is fairly similar to AFN with a simplification of not having to swizzle the NSURLSessionTask.State changes since we can rely on the Request methods directly. While this approach does not work if the user uses the task property directly to resume or suspend the task, this should be able to be resolved with documentation. This is certainly a better tradeoff than swizzling the task state. AFN couldn't use this approach b/c there is no concept of a Request.

@jshier and I have a huge conversation on the design choices of using NSNotification instead of closures on the Manager or Request classes. We decided that it is best in this case to use notifications since it is a broadcast that could have multiple observers.

@cnoon cnoon self-assigned this Feb 7, 2016
@cnoon
Copy link
Member Author

cnoon commented Feb 7, 2016

cc @jshier, @kcharwood, @kylef for review

@cnoon
Copy link
Member Author

cnoon commented Feb 7, 2016

Once we get this through, I'll create all the documentation and get the repo opened up so I can start testing with Travis.

@jshier
Copy link
Contributor

jshier commented Feb 7, 2016

Pod spec?

@cnoon
Copy link
Member Author

cnoon commented Feb 7, 2016

I'm on it @jshier. 👍🏼

@cnoon
Copy link
Member Author

cnoon commented Feb 7, 2016

Podspec is up but won't build until Alamofire 3.2.0 is released.

@@ -0,0 +1 @@
github "Alamofire/Alamofire" "master"
Copy link
Member Author

Choose a reason for hiding this comment

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

This will be repointed at ~> 3.2 once it is actually released.

cnoon added a commit that referenced this pull request Feb 8, 2016
@cnoon cnoon merged commit 070eb7c into master Feb 8, 2016
@cnoon cnoon deleted the feature/network_activity_indicator branch February 8, 2016 02:06
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.

None yet

2 participants