Classes
The following classes are available globally.
-
CaffeineHTTPProxy
hooks into the iOS URL loading system to accelerate the network requests you specify usingallow:
anddeny:
.The Caffeine API consists of 3 main functions:
start
,allow:
, anddeny:
This class is packaged inside the
Proxeine
module, so it must be imported into your App Delegate.To a Swift project:
import Proxeine
To an Objective-C Project:
import "Proxeine-Swift.h"
By Default, Caffeine is added to all instances of NSURLSessionConfiguration.defaultSessionConfiguration().
Caffeine will work alongside networking libraries such as Alamofire or AFNetworking.
This class uses the open source CocoaAsyncSocket library’s
GCDAsyncUdpSocketDelegate
protocol for frictionless UDP-diagnostic logging.Note
If at any time you require help, please contact our engineers at help@caffei.net
Warning
NSURLSessions that do not use
NSURLSession.sharedSession()
or theNSURLSessionConfiguration.defaultSessionConfiguration
should calladdCaffeine
on their session configurations.Declaration
Swift
@objc final public class CaffeineHTTPProxy : NSObject, GCDAsyncUdpSocketDelegate