-
Notifications
You must be signed in to change notification settings - Fork 0
BVSDK Installation
The BVSDK is comprised of a core SDK (BVCore) and 4 optional SDK modules that can be installed.
- Product Recommendations ("BVRecommendations" and "BVRecommendationsUI") - Provides access to Bazaarvoice product recommendations. It also provides three easy-to-use views to set up product recommendations with low effort.
- Targeted Advertising ("BVAdvertising") - Provides access to highly targeted advertising, powered by Google Mobile Ads.
- Conversations ("BVConversations") - Provides access to Bazaarvoice's Conversations platform, to consume and contribute ratings & reviews, questions & answers, photos, videos, user stories, etc.
-
Install the SDK with CocoaPods (recommended)
- Alternatively, you can install the SDK manually.
WARNING: Developers with Swift projects and the BVAdvertising module MUST install manually. The Google Mobile Ads SDK does not currently support being installed as a submodule with Cocoapods when
use_frameworks!
is in yourPodfile
. For this use case, please follow the manual installation steps for Swift when using BVAdvertising.
The simplest way to add the BVSDK to your project is through CocoaPods. If you do not have CocoaPods installed you can follow the Cocoapods Installation Instructions.
A complete Podfile
that installs all the BVSDK modules is shown below. Only include the pod
statements that you need.
# Add use_frameworks! ONLY if you are building with Swift and are NOT using an Objective-C bridging header. Then uncomment the following line:
#use_frameworks!
target 'YOUR_TARGET_NAME' do
# Default install: Installs BVConversations and core modules.
pod "BVSDK"
# Default install: Installs BVConversations and core modules.
pod "BVSDK/BVConversations"
# Installs BVAdvertising and core modules.
pod "BVSDK/BVAdvertising"
# Installs BVRecommendations Shopper Advertising API and core modules.
pod "BVSDK/BVRecommendations"
# Installs BVRecommendations and BVRecommendationsUI plus core modules.
pod "BVSDK/BVRecommendationsUI"
# Installs BVCurations and core modules.
pod "BVSDK/BVCurations"
end
When you have configured your Podfile
, simply run pod install
from your project directory to install the BVSDK modules.
Great! The SDK is included in your project. You can now add the required imports to your Objective-C or Swift project.
You can install the SDK by cloning or downloding this library and adding the source files to your project:
- Clone this repo, or download it with the "download zip" button:
- Highlight the source folders you want to add, under
/Pod/
and drag them into your Xcode project:
- Select 'Copy Items if Neeeded', and continue:
- Install 3rd-Party Dependencies
BVSDK uses a couple external libraries, that need to be installed alongside BVSDK. This step is only required for BVAdvertising and/or BVRecommendationsUI modules. * BVAdvertising -- Requires installation of the Google Ads SDK Framework. Please refer to the manual installation instructions on the Google Developers site.
* **BVRecommendationsUI** -- Requires installation of [SDWebImage](https://github.com/rs/SDWebImage), [HCSStarRatingView](https://github.com/hsousa/HCSStarRatingView) and [SVProgressHUD](https://github.com/TransitApp/SVProgressHUD) open source add-ins from github.
- Great! The SDK is included in your project. You can now add the required imports to your Objective-C or Swift project.
The imports for header files will differ depending on whether your project is Objective-C or Swift+Objective-C bridging header, or a Swift project using dynamic frameworks. The samples below provide you a sample of the fully installed BVSDK. However, you only need to include the headers that map to the modules you installed.
// Import BVSDK.h for all modules, including BVConversations
#import <BVSDK/BVSDK.h>
// Import BVAdvertising.h when using BVAdvertising
#import <BVSDK/BVAdvertising.h>
// Import BVConversations.h when using BVConversations
#import <BVSDK/BVConversations.h>
// Import BVRecommendations.h when using BVRecommendations
#import <BVSDK/BVRecommendations.h>
// Import BVRecommendationsUI.h when using BVRecommendationsUI
#import <BVSDK/BVRecommendationsUI.h>
// Import BVCurations.h when using BVCurations
#import <BVSDK/BVCurations.h>
For Swift compilation, you will need to add only one import to each .swift
file that references the BVSDK:
import BVSDK
Google's Mobile Advertising SDK does not support the use of dynamic frameworks. If you try to install the Google Mobild Ads SDK via your Podfile
and use use_frameworks!
in your Podfile
, you will not be able to link. This is because Swift does not support static frameworks.
You can workaround this issue by downloading and installing the Google Mobile SDK manually.
Copyright 2016 Bazaarvoice Inc. All rights reserved.
Use of this SDK is contingent on your agreement and conformance with Bazaarvoice's API Terms of Use. Additionally, you agree to store all data acquired by this SDK or Bazaarvoice’s API only within the storage of the individual application instance using the SDK or API. You also agree to use the data acquired by the SDK or API only within the context of the same individual application instance and only for purposes consistent with that application’s purpose. Except as otherwise noted, the Bazaarvoice iOS SDK licensed under the Apache License, Version 2.0.