-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into github-master
- Loading branch information
Showing
130 changed files
with
3,484 additions
and
364 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 |
---|---|---|
@@ -1,3 +0,0 @@ | ||
[submodule "sdk/externals/OpenUDID"] | ||
path = sdk/externals/OpenUDID | ||
url = https://github.com/ylechelle/OpenUDID.git | ||
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 |
---|---|---|
|
@@ -24,6 +24,7 @@ | |
8A4FF3AA1A2F8CC10000E4CC /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 8A4FF3A91A2F8CC10000E4CC /* [email protected] */; }; | ||
8A4FF3AD1A2F8CE50000E4CC /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 8A4FF3AB1A2F8CE50000E4CC /* [email protected] */; }; | ||
8A4FF3AE1A2F8CE50000E4CC /* an_arrow_right.png in Resources */ = {isa = PBXBuildFile; fileRef = 8A4FF3AC1A2F8CE50000E4CC /* an_arrow_right.png */; }; | ||
8A56E67C1B264DC200642ACC /* ANAdAdapterNativeAdColony.m in Sources */ = {isa = PBXBuildFile; fileRef = 8A56E67B1B264DC200642ACC /* ANAdAdapterNativeAdColony.m */; }; | ||
8A598F8B1A1EA061009BA879 /* ANNativeStandardAdResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A598F881A1EA061009BA879 /* ANNativeStandardAdResponse.h */; settings = {ATTRIBUTES = (Private, ); }; }; | ||
8A598F8C1A1EA061009BA879 /* ANNativeStandardAdResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 8A598F891A1EA061009BA879 /* ANNativeStandardAdResponse.m */; }; | ||
8A598F8D1A1EA061009BA879 /* ANNativeStandardAdResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 8A598F891A1EA061009BA879 /* ANNativeStandardAdResponse.m */; }; | ||
|
@@ -584,6 +585,8 @@ | |
8A4FF3A91A2F8CC10000E4CC /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; }; | ||
8A4FF3AB1A2F8CE50000E4CC /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; }; | ||
8A4FF3AC1A2F8CE50000E4CC /* an_arrow_right.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = an_arrow_right.png; sourceTree = "<group>"; }; | ||
8A56E67A1B264DC200642ACC /* ANAdAdapterNativeAdColony.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANAdAdapterNativeAdColony.h; sourceTree = "<group>"; }; | ||
8A56E67B1B264DC200642ACC /* ANAdAdapterNativeAdColony.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANAdAdapterNativeAdColony.m; sourceTree = "<group>"; }; | ||
8A598F881A1EA061009BA879 /* ANNativeStandardAdResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANNativeStandardAdResponse.h; sourceTree = "<group>"; }; | ||
8A598F891A1EA061009BA879 /* ANNativeStandardAdResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANNativeStandardAdResponse.m; sourceTree = "<group>"; }; | ||
8A6514701A12DB31003F1047 /* UIView+ANNativeAdCategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+ANNativeAdCategory.h"; sourceTree = "<group>"; }; | ||
|
@@ -654,6 +657,7 @@ | |
8A9AED8C1A1BE84F00C58BDA /* AppNexusSDK.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AppNexusSDK.framework; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
8A9AED8F1A1BE84F00C58BDA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; | ||
8A9AED901A1BE84F00C58BDA /* AppNexusSDK.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppNexusSDK.h; sourceTree = "<group>"; }; | ||
8A9FB0131B29F97A004EAC63 /* libInMobi-4.5.3.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libInMobi-4.5.3.a"; sourceTree = "<group>"; }; | ||
8AA5B4C41AA8B4A500522E1C /* libANSDKInMobiAdapter.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libANSDKInMobiAdapter.a; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
8AA5B4CE1AA8B72C00522E1C /* ANAdAdapterBannerInMobi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANAdAdapterBannerInMobi.h; sourceTree = "<group>"; }; | ||
8AA5B4CF1AA8B72C00522E1C /* ANAdAdapterBannerInMobi.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANAdAdapterBannerInMobi.m; sourceTree = "<group>"; }; | ||
|
@@ -668,7 +672,6 @@ | |
8AA5B4D91AA8B72C00522E1C /* IMNativeDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IMNativeDelegate.h; sourceTree = "<group>"; }; | ||
8AA5B4DA1AA8B72C00522E1C /* InMobi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InMobi.h; sourceTree = "<group>"; }; | ||
8AA5B4DB1AA8B72C00522E1C /* InMobiAnalytics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InMobiAnalytics.h; sourceTree = "<group>"; }; | ||
8AA5B4DC1AA8B72C00522E1C /* libInMobi-4.5.1.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libInMobi-4.5.1.a"; sourceTree = "<group>"; }; | ||
8AA5B4DF1AA8B74E00522E1C /* ANAdAdapterInterstitialInMobi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANAdAdapterInterstitialInMobi.h; sourceTree = "<group>"; }; | ||
8AA5B4E01AA8B74E00522E1C /* ANAdAdapterInterstitialInMobi.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANAdAdapterInterstitialInMobi.m; sourceTree = "<group>"; }; | ||
8AA5B4E11AA8B74E00522E1C /* ANAdAdapterNativeInMobi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANAdAdapterNativeInMobi.h; sourceTree = "<group>"; }; | ||
|
@@ -1004,6 +1007,8 @@ | |
8A8DEF891AD58EC900742AD7 /* ANAdAdapterBaseAdColony+PrivateMethods.h */, | ||
8A8E0FDC1AD432B7004C5C50 /* ANAdAdapterInterstitialAdColony.h */, | ||
8A8E0FDD1AD432B7004C5C50 /* ANAdAdapterInterstitialAdColony.m */, | ||
8A56E67A1B264DC200642ACC /* ANAdAdapterNativeAdColony.h */, | ||
8A56E67B1B264DC200642ACC /* ANAdAdapterNativeAdColony.m */, | ||
); | ||
name = AdColony; | ||
path = ../mediation/mediatedviews/AdColony; | ||
|
@@ -1217,7 +1222,7 @@ | |
8AA5B4D91AA8B72C00522E1C /* IMNativeDelegate.h */, | ||
8AA5B4DA1AA8B72C00522E1C /* InMobi.h */, | ||
8AA5B4DB1AA8B72C00522E1C /* InMobiAnalytics.h */, | ||
8AA5B4DC1AA8B72C00522E1C /* libInMobi-4.5.1.a */, | ||
8A9FB0131B29F97A004EAC63 /* libInMobi-4.5.3.a */, | ||
); | ||
path = InMobiSDK; | ||
sourceTree = "<group>"; | ||
|
@@ -2215,6 +2220,7 @@ | |
isa = PBXSourcesBuildPhase; | ||
buildActionMask = 2147483647; | ||
files = ( | ||
8A56E67C1B264DC200642ACC /* ANAdAdapterNativeAdColony.m in Sources */, | ||
8A8E0FDE1AD432B7004C5C50 /* ANAdAdapterBaseAdColony.m in Sources */, | ||
8A8E0FDF1AD432B7004C5C50 /* ANAdAdapterInterstitialAdColony.m in Sources */, | ||
); | ||
|
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
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
21 changes: 21 additions & 0 deletions
21
mediation/mediatedviews/AdColony/ANAdAdapterNativeAdColony.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,21 @@ | ||
/* Copyright 2015 APPNEXUS INC | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
#import "ANNativeCustomAdapter.h" | ||
#import "ANAdAdapterBaseAdColony.h" | ||
|
||
@interface ANAdAdapterNativeAdColony : NSObject <ANNativeCustomAdapter> | ||
|
||
@end |
173 changes: 173 additions & 0 deletions
173
mediation/mediatedviews/AdColony/ANAdAdapterNativeAdColony.m
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,173 @@ | ||
/* Copyright 2015 APPNEXUS INC | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
#import "ANAdAdapterNativeAdColony.h" | ||
#import "ANAdAdapterBaseAdColony+PrivateMethods.h" | ||
#import "ANLogging.h" | ||
#import <AdColony/AdColony.h> | ||
#import <AdColony/AdColonyNativeAdView.h> | ||
|
||
#import "UIView+ANCategory.h" | ||
|
||
NSString *const kANAdAdapterNativeAdColonyVideoView = @"ANAdAdapterNativeAdColonyVideoView"; | ||
|
||
#pragma mark - ANAdColonyViewController | ||
|
||
@interface ANAdColonyViewController : UIViewController | ||
|
||
@property (nonatomic, readwrite, weak) UIViewController *rootViewController; | ||
|
||
@end | ||
|
||
@implementation ANAdColonyViewController | ||
|
||
- (void)presentViewController:(UIViewController *)viewControllerToPresent | ||
animated:(BOOL)flag | ||
completion:(void (^)(void))completion { | ||
[self.rootViewController presentViewController:viewControllerToPresent | ||
animated:flag | ||
completion:completion]; | ||
} | ||
|
||
- (void)dismissViewControllerAnimated:(BOOL)flag | ||
completion:(void (^)(void))completion { | ||
[self.rootViewController dismissViewControllerAnimated:flag | ||
completion:completion]; | ||
} | ||
|
||
@end | ||
|
||
#pragma mark - ANAdAdapterNativeAdColony | ||
|
||
@interface ANAdAdapterNativeAdColony () <AdColonyNativeAdDelegate> | ||
|
||
@property (nonatomic, readwrite, strong) ANAdColonyViewController *proxyViewController; | ||
|
||
@end | ||
|
||
@implementation ANAdAdapterNativeAdColony | ||
|
||
@synthesize requestDelegate = _requestDelegate; | ||
@synthesize nativeAdDelegate = _nativeAdDelegate; | ||
@synthesize expired = _expired; | ||
|
||
- (void)requestNativeAdWithServerParameter:(NSString *)parameterString | ||
adUnitId:(NSString *)adUnitId | ||
targetingParameters:(ANTargetingParameters *)targetingParameters { | ||
ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); | ||
[ANAdAdapterBaseAdColony setAdColonyTargetingWithTargetingParameters:targetingParameters]; | ||
AdColonyNativeAdView *nativeAdView = [AdColony getNativeAdForZone:adUnitId | ||
presentingViewController:self.proxyViewController]; | ||
if (nativeAdView) { | ||
ANNativeMediatedAdResponse *adResponse = [self adResponseFromNativeAdView:nativeAdView]; | ||
[self.requestDelegate didLoadNativeAd:adResponse]; | ||
} else { | ||
ADCOLONY_ZONE_STATUS zoneStatus = [AdColony zoneStatusForZone:adUnitId]; | ||
ANAdResponseCode errorCode = ANAdResponseInternalError; | ||
switch (zoneStatus) { | ||
case ADCOLONY_ZONE_STATUS_NO_ZONE: | ||
errorCode = ANAdResponseInvalidRequest; | ||
break; | ||
case ADCOLONY_ZONE_STATUS_OFF: | ||
errorCode = ANAdResponseInvalidRequest; | ||
break; | ||
case ADCOLONY_ZONE_STATUS_LOADING: | ||
errorCode = ANAdResponseUnableToFill; | ||
break; | ||
case ADCOLONY_ZONE_STATUS_UNKNOWN: | ||
errorCode = ANAdResponseInternalError; | ||
break; | ||
default: | ||
ANLogDebug(@"%@ %@ | Unhandled AdColony Zone Status: %ld", NSStringFromClass([self class]), NSStringFromSelector(_cmd), (long)zoneStatus); | ||
errorCode = ANAdResponseInternalError; | ||
break; | ||
} | ||
[self.requestDelegate didFailToLoadNativeAd:errorCode]; | ||
} | ||
} | ||
|
||
- (ANNativeMediatedAdResponse *)adResponseFromNativeAdView:(AdColonyNativeAdView *)nativeAdView { | ||
ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); | ||
ANNativeMediatedAdResponse *adResponse = [[ANNativeMediatedAdResponse alloc] initWithCustomAdapter:self | ||
networkCode:ANNativeAdNetworkCodeAdColony]; | ||
adResponse.title = nativeAdView.adTitle; | ||
adResponse.body = nativeAdView.adDescription; | ||
adResponse.iconImage = nativeAdView.advertiserIcon; | ||
|
||
NSMutableDictionary *mutableCustomElements = [[NSMutableDictionary alloc] init]; | ||
if (nativeAdView.advertiserName) { | ||
mutableCustomElements[kANAdAdapterNativeAdColonyVideoView] = nativeAdView; | ||
} | ||
adResponse.customElements = [mutableCustomElements copy]; | ||
|
||
return adResponse; | ||
} | ||
|
||
- (void)registerViewForImpressionTrackingAndClickHandling:(UIView *)view | ||
withRootViewController:(UIViewController *)rvc | ||
clickableViews:(NSArray *)clickableViews { | ||
self.proxyViewController.rootViewController = rvc; | ||
} | ||
|
||
- (ANAdColonyViewController *)proxyViewController { | ||
if (!_proxyViewController) _proxyViewController = [[ANAdColonyViewController alloc] init]; | ||
return _proxyViewController; | ||
} | ||
|
||
#pragma mark - AdColonyNativeAdDelegate | ||
|
||
- (void)onAdColonyNativeAdStarted:(AdColonyNativeAdView *)ad { | ||
ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); | ||
// Do nothing | ||
} | ||
|
||
- (void)onAdColonyNativeAdExpanded:(AdColonyNativeAdView *)ad { | ||
ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); | ||
[self.nativeAdDelegate adWasClicked]; | ||
[self.nativeAdDelegate willPresentAd]; | ||
[self.nativeAdDelegate didPresentAd]; | ||
} | ||
|
||
- (void)onAdColonyNativeAdFinished:(AdColonyNativeAdView *)ad | ||
expanded:(BOOL)expanded { | ||
ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); | ||
if (expanded) { | ||
[self.nativeAdDelegate willCloseAd]; | ||
[self.nativeAdDelegate didCloseAd]; | ||
} | ||
} | ||
|
||
- (void)onAdColonyNativeAd:(AdColonyNativeAdView *)ad | ||
finishedWithInfo:(AdColonyAdInfo *)info | ||
expanded:(BOOL)expanded { | ||
ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); | ||
if (expanded) { | ||
[self.nativeAdDelegate willCloseAd]; | ||
[self.nativeAdDelegate didCloseAd]; | ||
} | ||
} | ||
|
||
- (void)onAdColonyNativeAd:(AdColonyNativeAdView *)ad | ||
muted:(BOOL)muted { | ||
ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); | ||
// Do nothing | ||
} | ||
|
||
- (void)onAdColonyNativeAdEngagementPressed:(AdColonyNativeAdView *)ad { | ||
ANLogTrace(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)); | ||
[self.nativeAdDelegate adWasClicked]; | ||
} | ||
|
||
@end |
Binary file modified
BIN
-563 KB
(96%)
mediation/mediatedviews/AdColony/AdColonySDK/AdColony.framework/Versions/A/AdColony
Binary file not shown.
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
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
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
Binary file modified
BIN
+826 KB
(100%)
mediation/mediatedviews/Amazon/AmazonSDK/AmazonAd.framework/Versions/A/AmazonAd
Binary file not shown.
Binary file modified
BIN
+184 KB
(100%)
mediation/mediatedviews/Chartboost/ChartboostSDK/Chartboost.framework/Versions/A/Chartboost
Binary file not shown.
2 changes: 1 addition & 1 deletion
2
...iatedviews/Chartboost/ChartboostSDK/Chartboost.framework/Versions/A/Headers/CBAnalytics.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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* CBAnalytics.h | ||
* Chartboost | ||
* 5.2.1 | ||
* 5.4.0 | ||
* | ||
* Copyright 2011 Chartboost. All rights reserved. | ||
*/ | ||
|
2 changes: 1 addition & 1 deletion
2
...mediatedviews/Chartboost/ChartboostSDK/Chartboost.framework/Versions/A/Headers/CBInPlay.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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* CBInPlay.h | ||
* Chartboost | ||
* 5.2.1 | ||
* 5.4.0 | ||
* | ||
* Copyright 2011 Chartboost. All rights reserved. | ||
*/ | ||
|
2 changes: 1 addition & 1 deletion
2
...dviews/Chartboost/ChartboostSDK/Chartboost.framework/Versions/A/Headers/CBMoreAppsBadge.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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* CBMoreAppsBadge.h | ||
* Chartboost | ||
* 5.2.1 | ||
* 5.4.0 | ||
* | ||
* Copyright 2011 Chartboost. All rights reserved. | ||
*/ | ||
|
2 changes: 1 addition & 1 deletion
2
...views/Chartboost/ChartboostSDK/Chartboost.framework/Versions/A/Headers/CBMoreAppsButton.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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* CBMoreAppsButton.h | ||
* Chartboost | ||
* 5.2.1 | ||
* 5.4.0 | ||
* | ||
* Copyright 2011 Chartboost. All rights reserved. | ||
*/ | ||
|
Oops, something went wrong.