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

Updated library to work with latest Alamofire/AFNetworking. Updated travis yml to build with latest Xcode #44

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

csknns
Copy link
Contributor

@csknns csknns commented Jul 5, 2017

Update codebase to work with latest Alamofire (5.6.2).
The main fixes are that Alamofire expects the calls to the session delegate to happen on the same queue as the one the initial session has started, but the NSURLSession-Mock always uses the main queue.

An other fix to work with Alamofire is that it expects the didFinishCollecting of the URLSessionTaskDelegate to be called, see the new URLSessionTaskMetrics APIs.
So I updated the MockEntry.swift to call the metrics API, before the task is finished.

      DispatchQueue.current.asyncAfter(deadline: .now() + time) {
            if #available(iOS 10.0, *) {
                let metrics = URLSessionTaskMetrics()
                // Alamofire waits for the didFinishCollecting to trigger the callbacks of a request
                delegate.urlSession?(session, task: task, didFinishCollecting: metrics)

Updated travis yml to install the latest stable cocoapods instead of the latest beta (--pre), this fixes failing travis CI builds due to pod lint checks.
Also removed the unnecessary framework search path "$(SDKROOT)/Developer/Library/Frameworks" that caused this warning:
screen shot 2017-07-05 at 11 46 10

@csknns csknns changed the title Updated travis yml to install the latest stable cocoapods and use the latest OS version Updated library to work with latest Alamofire/AFNetworking. Updated travis yml to build with latest Xcode Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant