-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit for Prebid Mobile SDK for iOS
- Loading branch information
Showing
699 changed files
with
145,108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
#### | ||
# Binary build product files | ||
|
||
**/out | ||
**/Payload/ | ||
**/PrebidMobileDemo.app/ | ||
#**/Products | ||
**/screenshot* | ||
|
||
######################################################################################## | ||
# macOS.gitignore | ||
# https://github.com/github/gitignore/blob/master/Global/macOS.gitignore | ||
######################################################################################## | ||
|
||
*.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Icon must end with two \r | ||
Icon | ||
|
||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
.com.apple.timemachine.donotpresent | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
|
||
######################################################################################## | ||
# Xcode.gitignore | ||
# https://github.com/github/gitignore/blob/master/Global/Xcode.gitignore | ||
######################################################################################## | ||
|
||
# Xcode | ||
# | ||
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore | ||
|
||
## Build generated | ||
build/ | ||
DerivedData/ | ||
|
||
## Various settings | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
xcuserdata/ | ||
|
||
## Other | ||
*.moved-aside | ||
*.xccheckout | ||
*.xcscmblueprint | ||
|
||
######################################################################################## | ||
# Objective-C.gitignore | ||
# https://github.com/github/gitignore/blob/master/Objective-C.gitignore | ||
######################################################################################## | ||
|
||
# Xcode | ||
# | ||
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore | ||
|
||
## Build generated | ||
build/ | ||
DerivedData/ | ||
|
||
## Various settings | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
xcuserdata/ | ||
|
||
## Other | ||
*.moved-aside | ||
*.xcuserstate | ||
|
||
## Obj-C/Swift specific | ||
*.hmap | ||
#*.ipa | ||
*.dSYM.zip | ||
*.dSYM | ||
|
||
# CocoaPods | ||
# | ||
# We recommend against adding the Pods directory to your .gitignore. However | ||
# you should judge for yourself, the pros and cons are mentioned at: | ||
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control | ||
# | ||
# Pods/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
language: objective-c | ||
osx_image: xcode8 | ||
script: | ||
- ./scripts/buildPrebidMobile.sh | ||
- ./scripts/testPrebidMobile.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Prebid Mobile iOS SDK | ||
|
||
Get started with Prebid Mobile by creating a Prebid Server account [here](http://prebid.org/prebid-mobile/prebid-mobile-pbs.html) | ||
|
||
## Use Cocoapods? | ||
|
||
Easily include the Prebid Mobile SDK for your priamy ad server in your Podfile/ | ||
|
||
``` | ||
platform :ios, '8.0' | ||
target 'MyAmazingApp' do | ||
pod 'PrebidMobile' | ||
end | ||
``` | ||
|
||
## Build framework from source | ||
|
||
Build Prebid Mobile from source code. After cloning the repo, from the root directory run | ||
|
||
``` | ||
./scripts/buildPrebidMobile.sh | ||
``` | ||
|
||
to output the PrebidMobileForDFP & PrebidMobileForMoPub frameworks. | ||
|
||
|
||
## Test Prebid Mobile | ||
|
||
Run the test script to run unit tests and integration tests. | ||
|
||
``` | ||
./scripts/testPrebidMobile.sh | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
source "https://rubygems.org" | ||
|
||
gem "calabash-cucumber", ">= 0.20.4", "< 2.0" | ||
gem 'rspec' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
CFPropertyList (2.3.5) | ||
awesome_print (1.7.0) | ||
builder (3.2.3) | ||
calabash-cucumber (0.20.4) | ||
awesome_print | ||
bundler (~> 1.3) | ||
clipboard (~> 1.0) | ||
cucumber | ||
edn (>= 1.0.6, < 2.0) | ||
geocoder (>= 1.1.8, < 2.0) | ||
httpclient (>= 2.7.1, < 3.0) | ||
json | ||
run_loop (>= 2.2.4, < 3.0) | ||
slowhandcuke (~> 0.0.3) | ||
clipboard (1.1.1) | ||
command_runner_ng (0.1.0) | ||
cucumber (2.4.0) | ||
builder (>= 2.1.2) | ||
cucumber-core (~> 1.5.0) | ||
cucumber-wire (~> 0.0.1) | ||
diff-lcs (>= 1.1.3) | ||
gherkin (~> 4.0) | ||
multi_json (>= 1.7.5, < 2.0) | ||
multi_test (>= 0.1.2) | ||
cucumber-core (1.5.0) | ||
gherkin (~> 4.0) | ||
cucumber-wire (0.0.1) | ||
diff-lcs (1.3) | ||
edn (1.1.1) | ||
geocoder (1.4.3) | ||
gherkin (4.1.1) | ||
httpclient (2.8.3) | ||
i18n (0.8.1) | ||
json (1.8.6) | ||
multi_json (1.12.1) | ||
multi_test (0.1.2) | ||
rspec (3.5.0) | ||
rspec-core (~> 3.5.0) | ||
rspec-expectations (~> 3.5.0) | ||
rspec-mocks (~> 3.5.0) | ||
rspec-core (3.5.4) | ||
rspec-support (~> 3.5.0) | ||
rspec-expectations (3.5.0) | ||
diff-lcs (>= 1.2.0, < 2.0) | ||
rspec-support (~> 3.5.0) | ||
rspec-mocks (3.5.0) | ||
diff-lcs (>= 1.2.0, < 2.0) | ||
rspec-support (~> 3.5.0) | ||
rspec-support (3.5.0) | ||
run_loop (2.3.1) | ||
CFPropertyList (~> 2.2) | ||
awesome_print (~> 1.2) | ||
command_runner_ng (>= 0.0.2) | ||
httpclient (>= 2.7.1, < 3.0) | ||
i18n (>= 0.7.0, < 1.0) | ||
json (~> 1.8) | ||
thor (>= 0.18.1, < 1.0) | ||
slowhandcuke (0.0.3) | ||
cucumber | ||
thor (0.19.4) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
calabash-cucumber (>= 0.20.4, < 2.0) | ||
rspec | ||
|
||
BUNDLED WITH | ||
1.14.6 |
Binary file not shown.
94 changes: 94 additions & 0 deletions
94
examples/PrebidMobileDemo/GoogleMobileAds.framework/Headers/DFPBannerView.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
// | ||
// DFPBannerView.h | ||
// Google Mobile Ads SDK | ||
// | ||
// Copyright 2012 Google Inc. All rights reserved. | ||
// | ||
|
||
#import <GoogleMobileAds/DFPCustomRenderedBannerViewDelegate.h> | ||
#import <GoogleMobileAds/GADAppEventDelegate.h> | ||
#import <GoogleMobileAds/GADBannerView.h> | ||
#import <GoogleMobileAds/GADCorrelator.h> | ||
#import <GoogleMobileAds/GADVideoController.h> | ||
#import <GoogleMobileAds/GoogleMobileAdsDefines.h> | ||
|
||
GAD_ASSUME_NONNULL_BEGIN | ||
|
||
/// The view that displays DoubleClick For Publishers banner ads. | ||
@interface DFPBannerView : GADBannerView | ||
|
||
/// Required value created on the DFP website. Create a new ad unit for every unique placement of an | ||
/// ad in your application. Set this to the ID assigned for this placement. Ad units are important | ||
/// for targeting and statistics. | ||
/// | ||
/// Example DFP ad unit ID: @"/6499/example/banner" | ||
@property(nonatomic, copy, GAD_NULLABLE) NSString *adUnitID; | ||
|
||
/// Optional delegate that is notified when creatives send app events. | ||
@property(nonatomic, weak, GAD_NULLABLE) IBOutlet id<GADAppEventDelegate> appEventDelegate; | ||
|
||
/// Optional delegate that is notified when creatives cause the banner to change size. | ||
@property(nonatomic, weak, GAD_NULLABLE) IBOutlet id<GADAdSizeDelegate> adSizeDelegate; | ||
|
||
/// Optional array of NSValue encoded GADAdSize structs, specifying all valid sizes that are | ||
/// appropriate for this slot. Never create your own GADAdSize directly. Use one of the predefined | ||
/// standard ad sizes (such as kGADAdSizeBanner), or create one using the GADAdSizeFromCGSize | ||
/// method. | ||
/// | ||
/// Example: | ||
/// | ||
/// <pre> | ||
/// NSArray *validSizes = @[ | ||
/// NSValueFromGADAdSize(kGADAdSizeBanner), | ||
/// NSValueFromGADAdSize(kGADAdSizeLargeBanner) | ||
/// ]; | ||
/// | ||
/// bannerView.validAdSizes = validSizes; | ||
/// </pre> | ||
@property(nonatomic, copy, GAD_NULLABLE) NSArray *validAdSizes; | ||
|
||
/// Correlator object for correlating this object to other ad objects. | ||
@property(nonatomic, strong, GAD_NULLABLE) GADCorrelator *correlator; | ||
|
||
/// Indicates that the publisher will record impressions manually when the ad becomes visible to the | ||
/// user. | ||
@property(nonatomic, assign) BOOL enableManualImpressions; | ||
|
||
/// Optional delegate object for custom rendered ads. | ||
@property(nonatomic, weak, GAD_NULLABLE) | ||
IBOutlet id<DFPCustomRenderedBannerViewDelegate> customRenderedBannerViewDelegate; | ||
|
||
/// Video controller for controlling video rendered by this ad view. | ||
@property(nonatomic, strong, readonly) GADVideoController *videoController; | ||
|
||
/// If you've set enableManualImpressions to YES, call this method when the ad is visible. | ||
- (void)recordImpression; | ||
|
||
/// Use this function to resize the banner view without launching a new ad request. | ||
- (void)resize:(GADAdSize)size; | ||
|
||
/// Sets options that configure ad loading. | ||
/// | ||
/// @param adOptions An array of GADAdLoaderOptions objects. The array is deep copied and option | ||
/// objects cannot be modified after calling this method. | ||
- (void)setAdOptions:(NSArray *)adOptions; | ||
|
||
#pragma mark Deprecated | ||
|
||
/// Deprecated. Use the validAdSizes property. | ||
/// Sets the receiver's valid ad sizes to the values pointed to by the provided NULL terminated list | ||
/// of GADAdSize pointers. | ||
/// | ||
/// Example: | ||
/// | ||
/// <pre> | ||
/// GADAdSize size1 = kGADAdSizeBanner; | ||
/// GADAdSize size2 = kGADAdSizeLargeBanner; | ||
/// [bannerView setValidAdSizesWithSizes:&size1, &size2, NULL]; | ||
/// </pre> | ||
- (void)setValidAdSizesWithSizes:(GADAdSize *)firstSize, ... NS_REQUIRES_NIL_TERMINATION | ||
GAD_DEPRECATED_MSG_ATTRIBUTE("Use validAdSizes property."); | ||
|
||
@end | ||
|
||
GAD_ASSUME_NONNULL_END |
34 changes: 34 additions & 0 deletions
34
examples/PrebidMobileDemo/GoogleMobileAds.framework/Headers/DFPCustomRenderedAd.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// | ||
// DFPCustomRenderedAd.h | ||
// Google Mobile Ads SDK | ||
// | ||
// Copyright 2014 Google Inc. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
#import <GoogleMobileAds/GoogleMobileAdsDefines.h> | ||
|
||
GAD_ASSUME_NONNULL_BEGIN | ||
|
||
/// Custom rendered ad. Your application renders the ad. | ||
@interface DFPCustomRenderedAd : NSObject | ||
|
||
/// The ad's HTML. | ||
@property(nonatomic, readonly, copy) NSString *adHTML; | ||
|
||
/// The base URL of the ad's HTML. | ||
@property(nonatomic, readonly, copy) NSURL *adBaseURL; | ||
|
||
/// Call this method when the user clicks the ad. | ||
- (void)recordClick; | ||
|
||
/// Call this method when the ad is visible to the user. | ||
- (void)recordImpression; | ||
|
||
/// Call this method after the ad has been rendered in a UIView object. | ||
- (void)finishedRenderingAdView:(UIView *)view; | ||
|
||
@end | ||
|
||
GAD_ASSUME_NONNULL_END |
28 changes: 28 additions & 0 deletions
28
.../PrebidMobileDemo/GoogleMobileAds.framework/Headers/DFPCustomRenderedBannerViewDelegate.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// DFPCustomRenderedBannerViewDelegate.h | ||
// Google Mobile Ads SDK | ||
// | ||
// Copyright 2014 Google Inc. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
#import <GoogleMobileAds/GoogleMobileAdsDefines.h> | ||
|
||
@class DFPBannerView; | ||
@class DFPCustomRenderedAd; | ||
|
||
GAD_ASSUME_NONNULL_BEGIN | ||
|
||
/// The DFPCustomRenderedAd banner view delegate protocol for notifying the delegate of changes to | ||
/// custom rendered banners. | ||
@protocol DFPCustomRenderedBannerViewDelegate<NSObject> | ||
|
||
/// Called after ad data has been received. You must construct a banner from |customRenderedAd| and | ||
/// call the |customRenderedAd| object's finishedRenderingAdView: when the ad has been rendered. | ||
- (void)bannerView:(DFPBannerView *)bannerView | ||
didReceiveCustomRenderedAd:(DFPCustomRenderedAd *)customRenderedAd; | ||
|
||
@end | ||
|
||
GAD_ASSUME_NONNULL_END |
Oops, something went wrong.