Skip to content

Commit

Permalink
Merge branch 'master' into github-master
Browse files Browse the repository at this point in the history
  • Loading branch information
Jose Cabal-Ugaz committed Jun 16, 2015
2 parents 15c055f + 443289b commit daa1a0f
Show file tree
Hide file tree
Showing 130 changed files with 3,484 additions and 364 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
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
10 changes: 8 additions & 2 deletions BinaryProjects/ANSDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand Down Expand Up @@ -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>"; };
Expand Down Expand Up @@ -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>"; };
Expand All @@ -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>"; };
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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>";
Expand Down Expand Up @@ -2215,6 +2220,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8A56E67C1B264DC200642ACC /* ANAdAdapterNativeAdColony.m in Sources */,
8A8E0FDE1AD432B7004C5C50 /* ANAdAdapterBaseAdColony.m in Sources */,
8A8E0FDF1AD432B7004C5C50 /* ANAdAdapterInterstitialAdColony.m in Sources */,
);
Expand Down
36 changes: 36 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
## RC 2.3

### Bug fixes:

+ MS-1219 Removed OpenUDID dependency

+ MS-1265 Move location of kANAdFetcherDidReceiveResponseNotification

+ MS-1267 Testing improvements

### New mediation adapters:

+ MS-1107 AdColony Native

### Contains the following mediated SDKs:

+ AdMob SDK Version 7.3.1

+ Amazon SDK Version 2.2.8

+ Facebook SDK Version 4.2.0

+ Millennial Media SDK Version 5.4.1

+ MoPub SDK Version 3.8.0

+ InMobi SDK Version 4.5.3

+ VDOPIA Lightweight SDK Version 4

+ Vungle SDK 3.0.13

+ AdColony SDK 2.5.1

+ Chartboost SDK 5.4.0

## RC 2.2

### Feature additions:
Expand Down
6 changes: 5 additions & 1 deletion mediation/mediatedviews/AdColony/ANAdAdapterBaseAdColony.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
limitations under the License.
*/

#import <Foundation/Foundation.h>
#import <AdColony/AdColonyNativeAdView.h>

// Can be used to query ANNativeAdResponse customElements for native ads from AdColony
// Returns AdColonyNativeAdView
extern NSString *const kANAdAdapterNativeAdColonyVideoView;

@interface ANAdAdapterBaseAdColony : NSObject

Expand Down
21 changes: 21 additions & 0 deletions mediation/mediatedviews/AdColony/ANAdAdapterNativeAdColony.h
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 mediation/mediatedviews/AdColony/ANAdAdapterNativeAdColony.m
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 not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
/**
* Enum for zone status
*/
typedef enum {
typedef NS_ENUM(NSUInteger, ADCOLONY_ZONE_STATUS) {
ADCOLONY_ZONE_STATUS_NO_ZONE = 0, /**< AdColony has not been configured with that zone ID. */
ADCOLONY_ZONE_STATUS_OFF, /**< The zone has been turned off on the [Control Panel](http://clients.adcolony.com). */
ADCOLONY_ZONE_STATUS_LOADING, /**< The zone is preparing ads for display. */
ADCOLONY_ZONE_STATUS_ACTIVE, /**< The zone has completed preparing ads for display. */
ADCOLONY_ZONE_STATUS_UNKNOWN /**< AdColony has not yet received the zone's configuration from the server. */
} ADCOLONY_ZONE_STATUS;
};

#pragma mark -
#pragma mark Forward declarations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ typedef enum {
@property (nonatomic, readonly) NSString *iapProductID;

/**
* The number of items the user wishes to purchase.
* The number of items to be purchased.
* @param iapQuantity An int denoting the number of items the user wishes to purchase.
*/
@property (nonatomic, readonly) int iapQuantity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
* Use this property to access the UIButton and customize anything about it except its title text and tap action.
* @param engagementButton The engagement button that is already embedded within this ad.
*/
@property (nonatomic) UIButton* engagementButton;
@property (nonatomic, readonly) UIButton* engagementButton;

/**
* Returns the recommended height for the AdColonyNativeAdView if it will be displayed at the specified width.
Expand Down Expand Up @@ -161,4 +161,10 @@
* @param muted Whether the ad was muted or unmuted.
*/
-(void)onAdColonyNativeAd:(AdColonyNativeAdView*)ad muted:(BOOL)muted;

/**
* Notifies your app that a user has engaged with the native ad via an in-video engagement mechanism.
* @param ad The affected native ad view.
*/
-(void)onAdColonyNativeAdEngagementPressed:(AdColonyNativeAdView*)ad;
@end
Binary file not shown.
Binary file not shown.
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.
*/
Expand Down
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.
*/
Expand Down
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.
*/
Expand Down
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.
*/
Expand Down
Loading

0 comments on commit daa1a0f

Please sign in to comment.