Last Updated: February 06, 2018
·
875
· nebiros

My Alamofire + DVR recipe for network testing in Swift

After solve some issues from DVR, like:

"-[DVR.SessionDataTask taskIdentifier]: unrecognized selector sent to instance 0x60b000064a60"

I finally make it to work with Alamofire, 🎉, here's my receipe:

let defaultSessionManager = SessionManager.default
session = Session(cassetteName: "example", backingSession: defaultSessionManager.session)
sessionManager = SessionManager(session: session, delegate: defaultSessionManager.delegate)
sessionManager.request(url)