Skip to content

Commit

Permalink
-- NEW: support for Bazaarvoice Curations: Ability to display custom …
Browse files Browse the repository at this point in the history
…social media feeds and post photos from your mobile app.

-- NEW: BVPixel - Analytics for tracking purchase and non-transaction events for ROI reporting and omnichannel profile
-- Update usage pattern for BVRecommendations for fetching and displaying product recommendations
-- Removed SDK dependency on Google DFP SDK.
  • Loading branch information
Tim Kelly committed May 4, 2016
1 parent a65cff6 commit 2d2b350
Show file tree
Hide file tree
Showing 459 changed files with 11,540 additions and 26,337 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ Tests/Pods/*
# Removing the pods from the example projects so that deployment never needs to update the SDK inside the reference apps themselves
Examples/*/Pods/
Examples/Conversations/*/Pods/

# ignore jekyll generated content
_site/
18 changes: 5 additions & 13 deletions BVSDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

Pod::Spec.new do |s|
s.name = "BVSDK"
s.version = '3.1.2'
s.version = '4.0.0'
s.homepage = 'https://developer.bazaarvoice.com'
s.license = { :type => 'Commercial', :text => 'See https://developer.bazaarvoice.com/API_Terms_of_Use' }
s.author = { 'Bazaarvoice' => '[email protected]' }
Expand All @@ -35,25 +35,17 @@ Pod::Spec.new do |s|
end

s.subspec 'BVAdvertising' do |ads|
ads.source_files = 'Pod/BVAdvertising/**/*.{h,m}'
# install Google Ads SDK, min of 7.6, and up to but not including 8.0
# NOTE: When using CocooaPods with "use_frameworks!" and a Swift app you cannot have a dependency # on a library that is not dynamic. You must install the SDK manually if using BVAdvertising.
ads.dependency 'Google-Mobile-Ads-SDK', '~> 7.6'
ads.dependency 'BVSDK/Core'
end

s.subspec 'BVRecommendations' do |recs|
recs.source_files = 'Pod/BVRecommendations/**/*.{h,m}'
recs.dependency 'BVSDK/Core'
end

s.subspec 'BVRecommendationsUI' do |recsui|
recsui.source_files = 'Pod/BVRecommendationsUI/**/*.{h,m}'
recsui.resource = "Pod/BVRecommendationsUI/**/*.{png,bundle,xib,nib}"
recsui.dependency 'BVSDK/BVRecommendations'
recsui.dependency 'SDWebImage'
recsui.dependency 'HCSStarRatingView', '~> 1.4.3'
recsui.dependency 'SVProgressHUD'

s.subspec 'BVCurations' do |curations|
curations.source_files = 'Pod/BVCurations/**/*.{h,m}'
curations.dependency 'BVSDK/Core'
end

end
98 changes: 44 additions & 54 deletions Examples/Advertising/BVAdvertising.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion Examples/Advertising/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ source 'https://github.com/CocoaPods/Specs.git'

target 'TargetedAdsDemo' do

pod "BVSDK/BVAdvertising", :path => "../../"
pod "BVSDK/BVAdvertising", :path => "../../"
# NOTE: When using CocooaPods with "use_frameworks!" and a Swift app you cannot have a dependency # on a library that is not dynamic. You must install the SDK manually if using BVAdvertising.
pod 'Google-Mobile-Ads-SDK', '~> 7.6'
pod 'MBProgressHUD', '~> 0.9.1'
pod 'FontAwesomeKit/FontAwesome'

Expand Down
16 changes: 8 additions & 8 deletions Examples/Advertising/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
PODS:
- BVSDK/BVAdvertising (3.0.1):
- BVSDK/BVAdvertising (3.3.0):
- BVSDK/Core
- Google-Mobile-Ads-SDK (~> 7.6)
- BVSDK/Core (3.0.1)
- BVSDK/Core (3.3.0)
- FontAwesomeKit/Core (2.2.0)
- FontAwesomeKit/FontAwesome (2.2.0):
- FontAwesomeKit/Core
- Google-Mobile-Ads-SDK (7.6.0)
- MBProgressHUD (0.9.1)
- Google-Mobile-Ads-SDK (7.7.1)
- MBProgressHUD (0.9.2)

DEPENDENCIES:
- BVSDK/BVAdvertising (from `../../`)
- FontAwesomeKit/FontAwesome
- Google-Mobile-Ads-SDK (~> 7.6)
- MBProgressHUD (~> 0.9.1)

EXTERNAL SOURCES:
BVSDK:
:path: ../../

SPEC CHECKSUMS:
BVSDK: 99b137fcafebddece8f182e8a62fd29d5959e424
BVSDK: 731e9cc69a0e5ab17b90128f333469f80f232bc3
FontAwesomeKit: 025fd4dd1017fe4e3f8d47b03e024deedbb33cd4
Google-Mobile-Ads-SDK: 0290020329c61183c4685304264b73382bc49fb4
MBProgressHUD: c47f2c166c126cf2ce36498d80f33e754d4e93ad
Google-Mobile-Ads-SDK: e27569901b58881d9a94b42f2c642739cfe3970a
MBProgressHUD: 1569cf7ace17a8bac47aabfbb8580a49690386d1

COCOAPODS: 0.39.0
2 changes: 1 addition & 1 deletion Examples/Advertising/TargetedAdsDemo/AppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AppDelegate.h
// Bazaarvoice SDK - Demo Application
//
// Copyright 2015 Bazaarvoice Inc. All rights reserved.
// Copyright 2016 Bazaarvoice Inc. All rights reserved.
//

#import <UIKit/UIKit.h>
Expand Down
85 changes: 49 additions & 36 deletions Examples/Advertising/TargetedAdsDemo/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,81 +2,94 @@
// AppDelegate.m
// Bazaarvoice SDK - Demo Application
//
// Copyright 2015 Bazaarvoice Inc. All rights reserved.
// Copyright 2016 Bazaarvoice Inc. All rights reserved.
//

#import <BVSDK/BVAdvertising.h>
#import "AppDelegate.h"
#import "RootViewController.h"
#import <BVSDK/BVSDK.h>


@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
[self setupWindow];

// set status bar color
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:NO];

self.window.rootViewController = [self getRootViewController];
[self.window makeKeyAndVisible];
#warning ADD YOUR CLIENT ID AND SHOPPER ADVERTISING KEY HERE!!!
NSString *myClientId = @"REPLACE_ME"; // INSERT YOUR CLIEND ID!!!!
NSString *myShopperAdvertisingKey = @"REPLACE_ME"; // INSERT YOUR SHOPPER ADVERTISING KEY!!!

NSString *myClientId = nil; // INSERT YOUR CLIEND ID!!!!
NSString *myShopperAdvertisingKey = nil; // INSERT YOUR SHOPPER ADVERTISING KEY!!!

if (myClientId != nil && myShopperAdvertisingKey != nil){
if (![myClientId isEqualToString:@"REPLACE_ME"] && ![myShopperAdvertisingKey isEqualToString:@"REPLACE_ME"]){

// set up the BVAdsSDK with your clientId, and AdsPassKey

// Configure BVSDKManager
[[BVSDKManager sharedManager] setClientId:myClientId];
[[BVSDKManager sharedManager] setApiKeyShopperAdvertising:myShopperAdvertisingKey];
[[BVSDKManager sharedManager] setLogLevel:BVLogLevelInfo];
[[BVSDKManager sharedManager] setLogLevel:BVLogLevelError];

// set BVAdvertising to staging for testing and development.

// Set BVAdvertising to staging for testing and development. Set to NO for release.
[[BVSDKManager sharedManager] setStaging:YES];

/*
Next, we have to tell BVSDK about the user. See the BVSDK wiki for more discussion on how to create this user auth string: https://github.com/bazaarvoice/bv-ios-sdk/wiki/BVSDK-UserAuthentication
A user auth string would contain data in a query string format. For example:
userid=Example&[email protected]&age=28&gender=female&facebookId=123abc
*/

// Example MD5 encoded auth string used
[[BVSDKManager sharedManager] setUserWithAuthString:@"aa05cf391c8d4738efb4d05f7b2ad7ce7573657269643d4f6d6e694368616e6e656c50726f66696c65313226656d61696c3d6a61736f6e406a61736f6e2e636f6d"]; // pre-populated with a small profile interested in "pets", "powersports", "gamefish", and others -- for testing purposes.
} else {

UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"BVSDK Not Configured" message:@"Make sure you have set your API Key and Client ID in AppDelegate.m. Please contact Bazaarvoice if you need an evaluation key." preferredStyle:UIAlertControllerStyleAlert];
// Next, we have to tell BVSDK about the user.
// See the BVSDK wiki for more discussion on how to create this user auth string: https://github.com/bazaarvoice/bv-ios-sdk/wiki/BVSDK-UserAuthentication
// A user auth string would contain data in a query string format. For example:
// userid=Example&[email protected]&age=28&gender=female&facebookId=123abc


UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
// completion
exit(1);
}];
// Example auth string used, pre-populated with a small profile interested in "pets",
// "powersports", "gamefish", and others -- for testing purposes.
[[BVSDKManager sharedManager] setUserWithAuthString:@"0ce436b29697d6bc74f30f724b9b0bb6646174653d31323334267573657269643d5265636f6d6d656e646174696f6e7353646b54657374"];

[alert addAction:okAction];
} else {

[self.window.rootViewController presentViewController:alert animated:YES completion:^{
}];
[self showNotConfiguredError];

}

return YES;
}

-(UINavigationController*)getRootViewController {
-(void)setupWindow {

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:NO]; // set status bar color

UINavigationController* navigationController = [[UINavigationController alloc] initWithRootViewController:[[RootViewController alloc] init]];
[navigationController.navigationBar setBarTintColor:[UIColor whiteColor]];
[navigationController.navigationBar setTintColor:[UIColor whiteColor]];
[navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor whiteColor]}];
[navigationController.navigationBar setTranslucent:NO];
[navigationController.navigationBar setBarStyle:UIBarStyleBlack];
return navigationController;

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
[self.window setRootViewController:navigationController];
[self.window makeKeyAndVisible];

}

-(void)showNotConfiguredError {

NSString* alertTitle = @"BVSDK Not Configured";
NSString* alertMessage = @"Make sure you have set your API Key and Client ID in AppDelegate.m. Please contact Bazaarvoice if you do not have an API key.";

UIAlertController *alert = [UIAlertController alertControllerWithTitle:alertTitle
message:alertMessage
preferredStyle:UIAlertControllerStyleAlert];

UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"OK"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * _Nonnull action) { exit(1); }];

[alert addAction:okAction];

[self.window.rootViewController presentViewController:alert animated:YES completion:nil];

}

@end
4 changes: 2 additions & 2 deletions Examples/Advertising/TargetedAdsDemo/BVAdTypesCell.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//
// NativeAdTypesCell.h
// Bazaarvoice SDK
// Bazaarvoice SDK - Demo Application
//
// Copyright 2015 Bazaarvoice Inc. All rights reserved.
// Copyright 2016 Bazaarvoice Inc. All rights reserved.
//

#import <UIKit/UIKit.h>
Expand Down
4 changes: 2 additions & 2 deletions Examples/Advertising/TargetedAdsDemo/BVAdTypesCell.m
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//
// NativeAdTypesCell.m
// Bazaarvoice SDK
// Bazaarvoice SDK - Demo Application
//
// Copyright 2015 Bazaarvoice Inc. All rights reserved.
// Copyright 2016 Bazaarvoice Inc. All rights reserved.
//

#import "BVAdTypesCell.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
// BannerDemoViewController.h
// Bazaarvoice Mobile Ads SDK - Demo Application
//
// Copyright 2015 Bazaarvoice Inc. All rights reserved.
// Copyright 2016 Bazaarvoice Inc. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <BVSDK/BVAdvertising.h>
@import GoogleMobileAds;

@interface BannerDemoViewController : UIViewController

@property (weak, nonatomic) IBOutlet UIButton* closeButton;
@property (weak, nonatomic) IBOutlet BVTargetedBannerView* bannerView;
@property (weak, nonatomic) IBOutlet DFPBannerView* bannerView;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
// BannerDemoViewController.m
// Bazaarvoice Mobile Ads SDK - Demo Application
//
// Copyright 2015 Bazaarvoice Inc. All rights reserved.
// Copyright 2016 Bazaarvoice Inc. All rights reserved.
//

#import "BannerDemoViewController.h"
#import <BVSDK/BVSDK.h>

@implementation BannerDemoViewController

Expand All @@ -16,8 +17,9 @@ - (void)viewDidLoad {
self.bannerView.adUnitID = @"/6499/example/banner"; //Test adUnitId. Replace with your targeted adUnitId.
self.bannerView.rootViewController = self;

BVTargetedRequest* request = [self.bannerView getTargetedRequest];
DFPRequest* request = [DFPRequest request];
request.testDevices = @[ kGADSimulatorID ];
request.customTargeting = [[BVSDKManager sharedManager] getCustomTargeting];
[self.bannerView loadRequest:request];

[self.view addSubview:self.bannerView];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="BannerDemoViewController">
Expand Down Expand Up @@ -32,7 +32,7 @@
<action selector="closeButtonPressed" destination="-1" eventType="touchUpInside" id="LW8-Qg-Ryx"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="RSt-9U-suP" customClass="BVTargetedBannerView">
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="RSt-9U-suP" customClass="DFPBannerView">
<rect key="frame" x="73.5" y="550" width="320" height="50"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//
// GeneralizedDemoViewController.h
// Bazaarvoice Mobile Ads SDK - Demo Application
// Bazaarvoice SDK - Demo Application
//
// Copyright 2015 Bazaarvoice Inc. All rights reserved.
// Copyright 2016 Bazaarvoice Inc. All rights reserved.
//

#import <UIKit/UIKit.h>
Expand Down
Loading

0 comments on commit 2d2b350

Please sign in to comment.