BVSDKManager Class Reference
Inherits from | NSObject |
---|---|
Declared in | BVSDKManager.h |
Overview
The singleton instance for registering your API key and server to use. Any use of the BVRecommendations API must start here!
Code Examples: Initializing the SDK Manager
Objective-C
// Will search app bundle for file bvsdk_config_staging.json for
BVConfigurationTypeStaging or
// bvsdk_config_prod.json for BVConfigurationTypeProd. BVSDK will be
configured using this file
[BVSDKManager configure:BVConfigurationTypeStaging];
Swift
@code
// Will search app bundle for file bvsdk_config_staging.json for
BVConfigurationTypeStaging or // bvsdk_config_prod.json for BVConfigurationTypeProd. BVSDK will be configured using this file BVSDKManager.configure(.staging) @endcode
urlSessionDelegate
BVURLSessionDelegate used to acquire NSURLSession objects and proxy methods. Please see BVURLSessionDelegate.h for more details. Setting this is guaranteed to be thread safe, however, it isn’t atomic with respect to currently enqueued and running jobs so behavior is undefined if you set/unset this anytime after initialization. It’s best to set this at launch and to not unset.
@property (nullable, nonatomic, weak) id<BVURLSessionDelegate> urlSessionDelegate
Declared In
BVSDKManager.h
urlRootShopperAdvertising
Read-only value of urlRoot for BVRecommendations APIs. Varies depending on value of staging.
@property (nonnull, nonatomic, readonly) NSString *urlRootShopperAdvertising
Declared In
BVSDKManager.h
timeout
Network timeout in seconds. Default is 60 seconds. Note that iOS may set a minimum timeout of 240 seconds for post requests.
@property (nonatomic, assign) float timeout
Declared In
BVSDKManager.h
bvUser
The authenticed user retrieved after calling setUserWithAuthString. The model may be empty until the BV user profile has been reconcilled.
@property (nonnull, strong, readonly) BVAuthenticatedUser *bvUser
Declared In
BVSDKManager.h
+ configureWithConfiguration:configType:
+ (void)configureWithConfiguration:(nonnull NSDictionary *)configDict configType:(BVConfigurationType)configType
+ sharedManager
Singleton pattern. Use this sharedManager
whenever interacting with BVSDK.
+ (nonnull instancetype)sharedManager
Declared In
BVSDKManager.h
– setLogLevel:
Set the log level for getting log and event info. Default is BVLogLevel.kBVLogLevelError
- (void)setLogLevel:(BVLogLevel)logLevel
Declared In
BVSDKManager.h
– setUserWithAuthString:
Set user information. Associates a user profile with device for taylored
recommendations.
Use of this method requires that a valid key has been set for
apiKeyShopperMarketing.
- (void)setUserWithAuthString:(nonnull NSString *)userAuthString
Parameters
userAuthString |
The UAS that was generated server-side for Bazaarvoice. |
---|
Declared In
BVSDKManager.h
– getCustomTargeting
Generate DFP (Doubleclick For Publsher's) compatible custom targeting.
- (nonnull NSDictionary *)getCustomTargeting
Discussion
@code
DFPRequest* request = [[DFPRequest request] request];
request.customerTargeting = [[BVSDKManager sharedManager]
getTargetingKeywords]; @endcode
Declared In
BVSDKManager.h