I'm working with Alamofire. Following up on Mattt's comment in one of the closed issues on GitHub, I attempted a NSURLProtocol
-based mechanism to set the UIApplication.sharedApplication().networkActivityIndicatorVisible
flag.
However, after registering my custom protocol with Alamofire's underlying NSURLSessionConfiguration
I got stuck pretty quickly since Alamofire doesn't expose much of its SessionDelegate
class.
Is there a simple way to notify the custom NSURLProtocol
the request has completed without reproducing much of the already existing implementation of Alamofire inside my NSURLProtocol
?