The Bazaarvoice Mobile SDKs provide access to most of the core products Bazaarvoice offers. To learn more, go to the Mobile SDK documentation home page.
This page explains how to configure the behavior of
NSURLSession using the Bazaarvoice Mobile SDK for iOS.
The iOS SDK uses
NSURLSession for issuing networking requests, therefore, if you're attempting to configure the behavior of the
NSURLSession or would like to control how various tasks are handled then using the
BVURLSessionDelegate is the way to do that. After you have created an object that implements the
BVURLSessionDelegate protocol you can set it into action by following the example below:
In the code below, after this delegate is set, it will dispatch your object's implemented methods appropriately for every pertinent networking request that the Bazaarvoice iOS SDK issues on your behalf. Please see the documentation and comments in the module for more specific information pertaining to behavior.
let urlSessionDelegate: BVURLSessionDelegate = ... /// acquire your delegate /// and set the delegate on the BVSDKManager. BVSDKManager.shared().urlSessionDelegate = urlSessionDelegate
id <BVURLSessionDelegate> urlSessionDelegate = ... /// acquire your delegate /// and set the delegate on the BVSDKManager. [BVSDKManager sharedManager].urlSessionDelegate = urlSessionDelegate;
let urlSession: URLSession = ... /// acquire your urlSession BVManager.sharedManager.urlSession = urlSession