Skip to content

Commit

Permalink
v7.10
Browse files Browse the repository at this point in the history
* commit 'd2f8dceb45b9d2ee4bedac3db187878afeb187df':
  v7.10
  ATTrackingManager Support
  Merge pull request #685 in MOBILE-SDK/app_mobile-sdk-ios from MS-4671-LimitForANJAMRefreshFrequency to develop
  Merge pull request #683 in MOBILE-SDK/app_mobile-sdk-ios from MS-4659-NetID-Changes to develop
  Merge pull request #680 in MOBILE-SDK/app_mobile-sdk-ios from MS-4658_Native_ViewabilityIssue to develop
  • Loading branch information
asharmaa committed Feb 23, 2021
2 parents 8bf747d + d2f8dce commit 3f436e8
Show file tree
Hide file tree
Showing 29 changed files with 746 additions and 103 deletions.
2 changes: 1 addition & 1 deletion AppNexusSDK.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "AppNexusSDK"
s.version = "7.9"
s.version = "7.10"
s.platform = :ios, "9.0"

s.summary = "AppNexus iOS Mobile Advertising SDK"
Expand Down
9 changes: 9 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## 7.10
### New Feature
+ MS-4659, MS-4674 Added support for User Id from external sources(Criteo, NetID, LiverRamp, The Trade Desk) (https://wiki.xandr.com/x/7IW1Bg)
+ MS-4657 Changes to support AppTrackingTransparency (https://wiki.xandr.com/x/3Ie1Bg)
### Improvements/Bug Fixes
+ MS-4671 Added minimum threshold of 100ms for callSetMraidRefreshFrequency
### Deprecated API
+ externalUid property in ANAdProtocol has been deprecated, use publisherUserId in ANSDKSettings instead (https://wiki.xandr.com/x/7IW1Bg).

## 7.9
### New Feature
+ MS-4388 Support to disable passing device IDs in bid requests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ - (void)viewDidLoad {
[ANLogManager setANLogLevel:ANLogLevelAll];

self.nativeAdRequest= [[ANNativeAdRequest alloc] init];
self.nativeAdRequest.placementId = @"19212468";
self.nativeAdRequest.placementId = @"17058950";
self.nativeAdRequest.gender = ANGenderMale;
self.nativeAdRequest.shouldLoadIconImage = YES;
self.nativeAdRequest.shouldLoadMainImage = YES;
Expand Down Expand Up @@ -70,5 +70,43 @@ - (void)adRequest:(nonnull ANNativeAdRequest *)request didFailToLoadWithError:(n
NSLog(@"Ad request Failed With Error");
}

#pragma mark - ANNativeAdDelegate

- (void)adDidLogImpression:(id)ad {
NSLog(@"%@", NSStringFromSelector(_cmd));
}

- (void)adWillExpire:(id)ad {
NSLog(@"%@", NSStringFromSelector(_cmd));
}

- (void)adDidExpire:(id)ad {
NSLog(@"%@", NSStringFromSelector(_cmd));
}

- (void)adWasClicked:(id)ad {
NSLog(@"%@", NSStringFromSelector(_cmd));
}

- (void)adWillPresent:(id)ad {
NSLog(@"%@", NSStringFromSelector(_cmd));
}

- (void)adDidPresent:(id)ad {
NSLog(@"%@", NSStringFromSelector(_cmd));
}

- (void)adWillClose:(id)ad {
NSLog(@"%@", NSStringFromSelector(_cmd));
}

- (void)adDidClose:(id)ad {
NSLog(@"%@", NSStringFromSelector(_cmd));
}

- (void)adWillLeaveApplication:(id)ad {
NSLog(@"%@", NSStringFromSelector(_cmd));
}


@end
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class BannerAdViewController: UIViewController , ANBannerAdViewDelegate{

let adWidth: Int = 300
let adHeight: Int = 250
let adID = "1281482"
let adID = "17058950"

// We want to center our ad on the screen.
let screenRect: CGRect = UIScreen.main.bounds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class InterstitialAdViewController: UIViewController , ANInterstitialAdDelegate
super.viewDidLoad()
self.title = "Interstitial Ad"

interstitialAd = ANInterstitialAd(placementId: "1281482")
interstitialAd = ANInterstitialAd(placementId: "17058950")
interstitialAd!.delegate = self
interstitialAd!.clickThroughAction = ANClickThroughAction.openSDKBrowser
interstitialAd!.load()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,23 +63,23 @@ class MultiAdViewController: UITableViewController , ANMultiAdRequestDelegate ,

// Create InstreamVideo Ad Object
func createVideoAd(adView : UIView) -> ANInstreamVideoAd {
videoAd = ANInstreamVideoAd(placementId: "17982237")
videoAd = ANInstreamVideoAd(placementId: "17058950")
videoAd.loadDelegate = self
return videoAd
}


// Create Interstitial Ad Object
func createInterstitialAd() -> ANInterstitialAd{
interstitialAd = ANInterstitialAd(placementId: "17982237")
interstitialAd = ANInterstitialAd(placementId: "17058950")
interstitialAd!.delegate = self
return interstitialAd!
}

// Create Native Ad Object
func createNativeAd() -> ANNativeAdRequest{
nativeAdRequest = ANNativeAdRequest()
nativeAdRequest!.placementId = "17982237"
nativeAdRequest!.placementId = "17058950"
nativeAdRequest!.shouldLoadIconImage = true
nativeAdRequest!.shouldLoadMainImage = true
nativeAdRequest!.delegate = self
Expand All @@ -92,7 +92,7 @@ class MultiAdViewController: UITableViewController , ANMultiAdRequestDelegate ,
let rect = CGRect(origin: CGPoint(x: 0,y :0), size: CGSize(width: self.bannerAdView.frame.size.width , height: self.bannerAdView.frame.size.height))

// Make a banner ad view.
self.bannerAd = ANBannerAdView(frame: rect, placementId: "17982237", adSize: size)
self.bannerAd = ANBannerAdView(frame: rect, placementId: "17058950", adSize: size)
self.bannerAd!.rootViewController = self
self.bannerAd!.delegate = self
self.bannerAd!.shouldResizeAdToFitContainer = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class NativeAdViewController: UIViewController , ANNativeAdRequestDelegate , ANN
// Do any additional setup after loading the view.

nativeAdRequest = ANNativeAdRequest()
nativeAdRequest!.placementId = "1281482"
nativeAdRequest!.placementId = "17058950"
nativeAdRequest!.shouldLoadIconImage = true
nativeAdRequest!.shouldLoadMainImage = true
nativeAdRequest!.delegate = self
Expand Down Expand Up @@ -64,5 +64,42 @@ class NativeAdViewController: UIViewController , ANNativeAdRequestDelegate , ANN
func adRequest(_ request: ANNativeAdRequest, didFailToLoadWithError error: Error, with adResponseInfo: ANAdResponseInfo?) {
print("Ad request Failed With Error")
}

// MARK: - ANNativeAdDelegate
func adDidLogImpression(_ response: Any) {
print("adDidLogImpression")
}

func adWillExpire(_ response: Any) {
print("adWillExpire")
}

func adDidExpire(_ response: Any) {
print("adDidExpire")
}

func adWasClicked(_ response: Any) {
print("adWasClicked")
}

func adWillPresent(_ response: Any) {
print("adWillPresent")
}

func adDidPresent(_ response: Any) {
print("adDidPresent")
}

func adWillClose(_ response: Any) {
print("adWillClose")
}

func adDidClose(_ response: Any) {
print("adDidClose")
}

func adWillLeaveApplication(_ response: Any) {
print("adWillLeaveApplication")
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class VideoAdViewController: UIViewController , ANInstreamVideoAdLoadDelegate, A
}

setupContentPlayer()
videoAd = ANInstreamVideoAd(placementId: "1281482")
videoAd = ANInstreamVideoAd(placementId: "17058950")
videoAd?.load(with: self)
videoAd?.clickThroughAction = ANClickThroughAction.openSDKBrowser

Expand Down
2 changes: 2 additions & 0 deletions sdk/AppNexusNativeSDK/AppNexusNativeSDK.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,5 @@ FOUNDATION_EXPORT const unsigned char AppNexusNativeSDKVersionString[];


#import <AppNexusNativeSDK/ANCSRNativeAdResponse.h>

#import <AppNexusNativeSDK/ANExternalUserId.h>
2 changes: 1 addition & 1 deletion sdk/AppNexusNativeSDK/SDK-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>7.9</string>
<string>7.10</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
Expand Down
12 changes: 12 additions & 0 deletions sdk/AppNexusSDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
0099B484228CA0F6004E80AB /* UIView+ANCategory.m in Sources */ = {isa = PBXBuildFile; fileRef = ECE4EA9B194B768A0069D934 /* UIView+ANCategory.m */; };
0099B485228CA18C004E80AB /* NSTimer+ANCategory.h in Headers */ = {isa = PBXBuildFile; fileRef = ECE4EA98194B768A0069D934 /* NSTimer+ANCategory.h */; settings = {ATTRIBUTES = (Private, ); }; };
0099B486228CA191004E80AB /* NSTimer+ANCategory.m in Sources */ = {isa = PBXBuildFile; fileRef = ECE4EA99194B768A0069D934 /* NSTimer+ANCategory.m */; };
00C4919325DF043100609E49 /* ANExternalUserId.h in Headers */ = {isa = PBXBuildFile; fileRef = 00C4919225DF043100609E49 /* ANExternalUserId.h */; settings = {ATTRIBUTES = (Public, ); }; };
00C4919425DF043100609E49 /* ANExternalUserId.h in Headers */ = {isa = PBXBuildFile; fileRef = 00C4919225DF043100609E49 /* ANExternalUserId.h */; settings = {ATTRIBUTES = (Public, ); }; };
00C491C325DF15AB00609E49 /* ANExternalUserId.m in Sources */ = {isa = PBXBuildFile; fileRef = 00C491C025DF15AB00609E49 /* ANExternalUserId.m */; };
00C491C425DF15AB00609E49 /* ANExternalUserId.m in Sources */ = {isa = PBXBuildFile; fileRef = 00C491C025DF15AB00609E49 /* ANExternalUserId.m */; };
00D6B04820D1BC9B007A3439 /* ANOMIDImplementation.h in Headers */ = {isa = PBXBuildFile; fileRef = 00D6B04720D1BC9B007A3439 /* ANOMIDImplementation.h */; };
00D6B04B20D1BCAF007A3439 /* ANOMIDImplementation.m in Sources */ = {isa = PBXBuildFile; fileRef = 00D6B04920D1BCAF007A3439 /* ANOMIDImplementation.m */; };
0E02F07024336D570073A226 /* ANCSRNativeAdResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E3E3E62241FB73500823D66 /* ANCSRNativeAdResponse.m */; };
Expand Down Expand Up @@ -370,6 +374,8 @@
0035C5AF1F44971100915E97 /* ANSSMMediationAdViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANSSMMediationAdViewController.m; sourceTree = "<group>"; };
006F6B992295F70E003D2DF0 /* ANAdFetcherBase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANAdFetcherBase.m; sourceTree = "<group>"; };
006F6B9D2295F72A003D2DF0 /* ANAdFetcherBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANAdFetcherBase.h; sourceTree = "<group>"; };
00C4919225DF043100609E49 /* ANExternalUserId.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ANExternalUserId.h; sourceTree = "<group>"; };
00C491C025DF15AB00609E49 /* ANExternalUserId.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ANExternalUserId.m; sourceTree = "<group>"; };
00D6B04720D1BC9B007A3439 /* ANOMIDImplementation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ANOMIDImplementation.h; sourceTree = "<group>"; };
00D6B04920D1BCAF007A3439 /* ANOMIDImplementation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ANOMIDImplementation.m; sourceTree = "<group>"; };
0E0C5E5B2437E2EC0030B813 /* ANCSRAd.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANCSRAd.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -682,6 +688,7 @@
ECE4EA8E194B768A0069D934 /* ANAdView.h */,
ECE4EA8F194B768A0069D934 /* ANBannerAdView.h */,
ECE4EA90194B768A0069D934 /* ANCustomAdapter.h */,
00C4919225DF043100609E49 /* ANExternalUserId.h */,
0E35D4A92088F652000A6C27 /* ANGDPRSettings.h */,
609732B31E42E7910061EC0A /* ANInstreamVideoAd.h */,
ECE4EA91194B768A0069D934 /* ANInterstitialAd.h */,
Expand Down Expand Up @@ -895,6 +902,7 @@
60D39E1422570FE20029F741 /* ANVideoPlayerSettings.m */,
60183FD222933E9500CFDE33 /* ANWebView.h */,
60183FD322933E9500CFDE33 /* ANWebView.m */,
00C491C025DF15AB00609E49 /* ANExternalUserId.m */,
);
path = internal;
sourceTree = "<group>";
Expand Down Expand Up @@ -1107,6 +1115,7 @@
609732D71E42E9860061EC0A /* ANVideoAdProcessor.h in Headers */,
60D39E2922679E480029F741 /* ANVideoPlayerSettings+ANCategory.h in Headers */,
60D39E1522570FE20029F741 /* ANVideoPlayerSettings.h in Headers */,
00C4919325DF043100609E49 /* ANExternalUserId.h in Headers */,
60183FD52293482700CFDE33 /* ANWebView.h in Headers */,
0ECF336622D79A62007DB185 /* AppNexusSDK.h in Headers */,
609732B01E42E73D0061EC0A /* NSDictionary+ANCategory.h in Headers */,
Expand Down Expand Up @@ -1179,6 +1188,7 @@
F52F82EB2293362600F4578C /* NSObject+ANCategory.h in Headers */,
F52F82EE2293367A00F4578C /* NSString+ANCategory.h in Headers */,
0099B485228CA18C004E80AB /* NSTimer+ANCategory.h in Headers */,
00C4919425DF043100609E49 /* ANExternalUserId.h in Headers */,
0099B483228CA0EB004E80AB /* UIView+ANCategory.h in Headers */,
F5731B4B228C8D050012B134 /* UIView+ANNativeAdCategory.h in Headers */,
);
Expand Down Expand Up @@ -1355,6 +1365,7 @@
0E0C5E5C2437E2EC0030B813 /* ANCSRAd.m in Sources */,
0E92D3B52420D06A00209580 /* ANCSRNativeAdController.m in Sources */,
0E3E3E64241FB73500823D66 /* ANCSRNativeAdResponse.m in Sources */,
00C491C325DF15AB00609E49 /* ANExternalUserId.m in Sources */,
0ED85345208A94F200A5FFA0 /* ANGDPRSettings.m in Sources */,
8A9AEDF61A1BF99D00C58BDA /* ANGlobal.m in Sources */,
60165D262464823E00E8E07C /* ANHTTPNetworkSession.m in Sources */,
Expand Down Expand Up @@ -1438,6 +1449,7 @@
F5731B6C228C8E430012B134 /* ANGDPRSettings.m in Sources */,
F5731B71228C8FD20012B134 /* ANGlobal.m in Sources */,
60165D272464823E00E8E07C /* ANHTTPNetworkSession.m in Sources */,
00C491C425DF15AB00609E49 /* ANExternalUserId.m in Sources */,
F5731B73228C900B0012B134 /* ANLocation.m in Sources */,
F5731B77228C902D0012B134 /* ANLogging.m in Sources */,
F5731B76228C902A0012B134 /* ANLogManager.m in Sources */,
Expand Down
4 changes: 4 additions & 0 deletions sdk/AppNexusSDK/AppNexusSDK.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@ FOUNDATION_EXPORT const unsigned char AppNexusSDKVersionString[];

#import <AppNexusSDK/ANGDPRSettings.h>
#import <AppNexusSDK/ANUSPrivacySettings.h>
#import <AppNexusSDK/ANExternalUserId.h>



2 changes: 1 addition & 1 deletion sdk/AppNexusSDK/SDK-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>7.9</string>
<string>7.10</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
7 changes: 7 additions & 0 deletions sdk/sourcefiles/ANAdConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,10 @@ typedef NS_ENUM(NSUInteger, ANVideoOrientation) {
ANLandscape,
ANSquare
};







2 changes: 1 addition & 1 deletion sdk/sourcefiles/ANAdProtocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
/**
Specifies a string that corresponds to an external user ID for user
*/
@property (nonatomic, readwrite, strong, nullable) NSString *externalUid;
@property (nonatomic, readwrite, strong, nullable) NSString *externalUid DEPRECATED_MSG_ATTRIBUTE("Use ANSDKSettings.publisherUserId instead.");


/**
Expand Down
47 changes: 47 additions & 0 deletions sdk/sourcefiles/ANExternalUserId.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/* Copyright 2021 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 <Foundation/Foundation.h>
/*
* Supported Third Party ID Sources
* */
typedef NS_ENUM(NSUInteger, ANExternalUserIdSource) {
ANExternalUserIdSourceLiveRamp,
ANExternalUserIdSourceNetId,
ANExternalUserIdSourceCriteo,
ANExternalUserIdSourceTheTradeDesk
};



/**
Defines the User Id Object from an External Thrid Party Source
*/
@interface ANExternalUserId : NSObject

/**
Source of the External User Id
*/
@property (nonatomic, readwrite) ANExternalUserIdSource source;

/**
The User Id String
*/
@property (nonatomic, readwrite, strong, nonnull) NSString *userId;


- (nullable instancetype)initWithSource:(ANExternalUserIdSource)source userId:(nonnull NSString *)userId;

@end
14 changes: 14 additions & 0 deletions sdk/sourcefiles/ANSDKSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#import <Foundation/Foundation.h>


#import "ANExternalUserId.h"



@interface ANSDKSettings : NSObject
Expand Down Expand Up @@ -95,4 +97,16 @@ An AppNexus disableIDFAUsage is a boolean value which exclude the IDFA field in
*/
@property (nonatomic, readwrite) BOOL disableIDFAUsage;


/**
Specifies a string that corresponds to the Publishers User ID for current application user.
*/
@property (nonatomic, readwrite, strong, nullable) NSString *publisherUserId;


/**
A Dictionary containing objects that hold External UserId parameters.
*/
@property (nonatomic, readwrite, strong, nullable) NSArray<ANExternalUserId *> *externalUserIdArray;

@end
2 changes: 1 addition & 1 deletion sdk/sourcefiles/ANTargetingParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

@property (nonatomic, readwrite, strong, nullable) NSString *age;
@property (nonatomic, readwrite, assign) ANGender gender;
@property (nonatomic, readwrite, strong, nullable) NSString *externalUid;
@property (nonatomic, readwrite, strong, nullable) NSString *externalUid DEPRECATED_MSG_ATTRIBUTE("No Alternatives");
/**
location may be nil if not specified by app.
*/
Expand Down
Loading

0 comments on commit 3f436e8

Please sign in to comment.