CLUURLProtocolConfiguration
@interface CLUURLProtocolConfiguration : NSObject
CLUURLProtocolConfiguration
is a singleton class which keeps custom network configuration (like CLUNetworkObserverDelegate
delegate)
Used for additional configuration of CLUURLProtocol
which intercepting all network communication.
-
Delegate instance of
CLUNetworkObserverDelegate
to be able to redirect network communication fromCLUURLProtocol
to appropriate delegate methodDeclaration
Objective-C
@property (readonly, getter=networkDelegate, strong, nonatomic) id<CLUNetworkObserverDelegate> delegate;
Swift
var delegate: Any! { get }
-
Returns the shared singleton instance of
CLUURLProtocolConfiguration
Declaration
Objective-C
+ (instancetype)sharedConfiguration;
Swift
class func shared() -> Self!
Return Value
Shared singleton instance of
CLUURLProtocolConfiguration
-
Set
CLUNetworkObserverDelegate
delegate objectWarning
Always call
-removeNetworkObserverDelegate
when you don’t need network delegate anymoreDeclaration
Objective-C
- (void)setNetworkObserverDelegate:(id<CLUNetworkObserverDelegate>)delegate;
Swift
func setNetworkObserverDelegate(_ delegate: Any!)
Parameters
delegate
Delegate instance of
CLUNetworkObserverDelegate
to be able to redirect network communication fromCLUURLProtocol
to appropriate delegate method -
Remove
CLUNetworkObserverDelegate
delegate objectDeclaration
Objective-C
- (void)removeNetworkObserverDelegate;
Swift
func removeNetworkObserverDelegate()