Skip to content

Commit

Permalink
SDKv7.7.1
Browse files Browse the repository at this point in the history
* commit '10172b2a605caea785ad979475885bf663634756':
  vSDK7.7.1
  Merge pull request #655 in MOBILE-SDK/app_mobile-sdk-ios from MS-4574_CocoaPods_Support_1.10 to develop
  made changes as per review
  modified the 2nd load
  modified the 2nd load logic
  fixed the lazy load issue
  • Loading branch information
asharmaa committed Oct 22, 2020
2 parents e2ef6c4 + 10172b2 commit eb488d8
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 45 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.7"
s.version = "7.7.1"
s.platform = :ios, "9.0"

s.summary = "AppNexus iOS Mobile Advertising SDK"
Expand Down
5 changes: 5 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 7.7.1
### Improvements/Bug Fixes
+ MS-4573 Fixed banner refresh on Lazyload
+ MS-4574 Add support for Cocoapods version 1.10.0

## 7.7
### New Feature
+ MS-4412 Added support for listening to Ad Expiry events for Native Ads [https://wiki.xandr.com/x/ugPyBg]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,16 @@ - (void)viewDidLoad
CGSize size = CGSizeMake(adWidth, adHeight);

// Make a banner ad view.
//self.banner = [ANBannerAdView adViewWithFrame:rect placementId:adID adSize:size];
self.banner = [ANBannerAdView adViewWithFrame:rect placementId:adID adSize:size];

// Needed for when we create our ad view.
CGRect rect1 = CGRectMake(originX, originY, adWidth1, adHeight1);
CGSize size1 = CGSizeMake(adWidth1, adHeight1);

self.banner = [[ANBannerAdView alloc] initWithFrame:rect1 memberId:memberID inventoryCode:inventoryCode adSize:size1];
//self.banner = [[ANBannerAdView alloc] initWithFrame:rect1 memberId:memberID inventoryCode:inventoryCode adSize:size1];
self.banner.rootViewController = self;
self.banner.delegate = self;
self.banner.enableLazyLoad = YES;
[self.view addSubview:self.banner];

// Since this example is for testing, we'll turn on PSAs and verbose logging.
Expand All @@ -80,6 +81,10 @@ - (void)adDidReceiveAd:(id)ad {
NSLog(@"Updated Ad rendered at: %f", executionTime*1000);
}

-(void) lazyAdDidReceiveAd:(id)ad {
[self.banner loadLazyAd];
}

-(void)ad:(id)ad requestFailedWithError:(NSError *)error{
NSLog(@"Ad request Failed With Error");
self.processEnd = [NSDate date];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ - (void)viewDidLoad {
self.marAdRequest = [[ANMultiAdRequest alloc] initWithMemberId:10094 andDelegate:self];
// Add Ad Units
[self.marAdRequest addAdUnit:[self createBannerAd:self.bannerAdView]];
[self.marAdRequest addAdUnit:[self createInterstitialAd]];
[self.marAdRequest addAdUnit: [self createVideoAd]];
[self.marAdRequest addAdUnit:[self createNativeAd]];
//[self.marAdRequest addAdUnit:[self createInterstitialAd]];
//[self.marAdRequest addAdUnit: [self createVideoAd]];
//[self.marAdRequest addAdUnit:[self createNativeAd]];
// Load Ad Units
[self.marAdRequest load];

Expand All @@ -61,7 +61,7 @@ - (void)viewDidLoad {
// Create Banner Ad Object
- (ANBannerAdView *)createBannerAd:(UIView *) adView
{
self.bannerAd = [[ANBannerAdView alloc] initWithFrame:CGRectMake(0, 0, 300, 250) placementId:@"19212468" adSize:CGSizeMake(300, 250)];
self.bannerAd = [[ANBannerAdView alloc] initWithFrame:CGRectMake(0, 0, 300, 250) placementId:@"15215010" adSize:CGSizeMake(300, 250)];
self.bannerAd.rootViewController =self;
self.bannerAd.delegate =self;
self.bannerAd.shouldResizeAdToFitContainer = YES;
Expand Down Expand Up @@ -104,6 +104,10 @@ - (ANNativeAdRequest *)createNativeAd
#pragma mark - Delegate methods exclusively for ANMultiAdRequest.
- (void) multiAdRequestDidComplete:(nonnull ANMultiAdRequest *)mar{
NSLog(@"Multi Ad Request Did Complete");

dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 10 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
[self.marAdRequest load];
});
}

- (void) multiAdRequest:(nonnull ANMultiAdRequest *)mar didFailWithError:(nonnull NSError *)error{
Expand All @@ -130,6 +134,10 @@ - (void)ad:(id)ad requestFailedWithError:(NSError *)error{

}

-(void) lazyAdDidReceiveAd:(id)ad {
[self.bannerAd loadLazyAd];
}

#pragma mark - Delegate methods exclusively for ANNativeAd.
- (void)adRequest:(ANNativeAdRequest *)request didFailToLoadWithError:(NSError *)error withAdResponseInfo:(ANAdResponseInfo *)adResponseInfo{
NSLog(@"requestFailedWithError %@:",error);
Expand Down
51 changes: 16 additions & 35 deletions sdk/AppNexusSDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@
0E14220E22F99ACA006C597A /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = ECE4EAD5194B768A0069D934 /* [email protected] */; };
0E14220F22F99ACA006C597A /* UIButtonBarArrowRight.png in Resources */ = {isa = PBXBuildFile; fileRef = ECE4EAD6194B768A0069D934 /* UIButtonBarArrowRight.png */; };
0E14221022F99ACA006C597A /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = ECE4EAD7194B768A0069D934 /* [email protected] */; };
0E14221122F99AD4006C597A /* ANBrowserViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = FC210A302007D529002A9F0E /* ANBrowserViewController.xib */; };
0E14221222F99AD6006C597A /* ANBrowserViewController_SizeClasses.xib in Resources */ = {isa = PBXBuildFile; fileRef = FC210A332007D52C002A9F0E /* ANBrowserViewController_SizeClasses.xib */; };
0E14221322F99AE2006C597A /* ANInterstitialAdViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = ECE4EACC194B768A0069D934 /* ANInterstitialAdViewController.xib */; };
0E14221422F99AE7006C597A /* anjam.js in Resources */ = {isa = PBXBuildFile; fileRef = ECE4EACD194B768A0069D934 /* anjam.js */; };
0E14221522F99AE9006C597A /* ANMRAID.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 8A3EC16F19B8FDC70049CD29 /* ANMRAID.bundle */; };
Expand Down Expand Up @@ -94,6 +92,10 @@
3850566C24DAD12F00D4B54D /* ANAdResponseCode.h in Headers */ = {isa = PBXBuildFile; fileRef = 3850566924DAD12F00D4B54D /* ANAdResponseCode.h */; settings = {ATTRIBUTES = (Public, ); }; };
3850566D24DAD12F00D4B54D /* ANAdResponseCode.m in Sources */ = {isa = PBXBuildFile; fileRef = 3850566A24DAD12F00D4B54D /* ANAdResponseCode.m */; };
3850566E24DAD12F00D4B54D /* ANAdResponseCode.m in Sources */ = {isa = PBXBuildFile; fileRef = 3850566A24DAD12F00D4B54D /* ANAdResponseCode.m */; };
38975FF32540488D006C4578 /* ANBrowserViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 38975FF12540488D006C4578 /* ANBrowserViewController.xib */; };
38975FF42540488D006C4578 /* ANBrowserViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 38975FF12540488D006C4578 /* ANBrowserViewController.xib */; };
38975FF52540488D006C4578 /* ANBrowserViewController_SizeClasses.xib in Resources */ = {isa = PBXBuildFile; fileRef = 38975FF22540488D006C4578 /* ANBrowserViewController_SizeClasses.xib */; };
38975FF62540488D006C4578 /* ANBrowserViewController_SizeClasses.xib in Resources */ = {isa = PBXBuildFile; fileRef = 38975FF22540488D006C4578 /* ANBrowserViewController_SizeClasses.xib */; };
4F06400823A2E7D700E7920A /* ANAdFetcherBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 006F6B992295F70E003D2DF0 /* ANAdFetcherBase.m */; };
4F06400923A2E7DC00E7920A /* ANAdFetcherBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 006F6B9D2295F72A003D2DF0 /* ANAdFetcherBase.h */; };
4F5758B12303A8CB00AFF4B6 /* ANMultiAdRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F5758B02303A8CB00AFF4B6 /* ANMultiAdRequest.m */; };
Expand Down Expand Up @@ -268,8 +270,6 @@
F52F82EE2293367A00F4578C /* NSString+ANCategory.h in Headers */ = {isa = PBXBuildFile; fileRef = ECE4EA96194B768A0069D934 /* NSString+ANCategory.h */; settings = {ATTRIBUTES = (Private, ); }; };
F52F82F1229338F100F4578C /* ANProxyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8ABC03D31C5AD3E100D7C789 /* ANProxyViewController.m */; };
F52F82F2229338FC00F4578C /* ANProxyViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 8ABC03D21C5AD3E100D7C789 /* ANProxyViewController.h */; settings = {ATTRIBUTES = (Private, ); }; };
F52F83142295DCA500F4578C /* ANBrowserViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = FC210A302007D529002A9F0E /* ANBrowserViewController.xib */; };
F52F83152295DCA500F4578C /* ANBrowserViewController_SizeClasses.xib in Resources */ = {isa = PBXBuildFile; fileRef = FC210A332007D52C002A9F0E /* ANBrowserViewController_SizeClasses.xib */; };
F52F83162295DCA500F4578C /* errors.strings in Resources */ = {isa = PBXBuildFile; fileRef = ECE4EACE194B768A0069D934 /* errors.strings */; };
F52F83172295DCA500F4578C /* omsdk.js in Resources */ = {isa = PBXBuildFile; fileRef = 0EEE97DA21764ACD007DADE6 /* omsdk.js */; };
F5731B3F228C8CA80012B134 /* ANNativeAdImageCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 8AB876201A0994310022D9A5 /* ANNativeAdImageCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
Expand Down Expand Up @@ -380,8 +380,6 @@
0E35D4AC2088F67E000A6C27 /* ANGDPRSettings.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANGDPRSettings.m; sourceTree = "<group>"; };
0E3E3E61241FB73500823D66 /* ANCSRNativeAdResponse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ANCSRNativeAdResponse.h; sourceTree = "<group>"; };
0E3E3E62241FB73500823D66 /* ANCSRNativeAdResponse.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ANCSRNativeAdResponse.m; sourceTree = "<group>"; };
0E6D9AB220D1A943001FA1FA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/ANBrowserViewController.xib; sourceTree = "<group>"; };
0E6D9AB320D1A943001FA1FA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/ANBrowserViewController_SizeClasses.xib; sourceTree = "<group>"; };
0E72F63A22D72C7700744B5E /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
0E7BC1C9229FC71D002F41FF /* ANNativeRenderingViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ANNativeRenderingViewController.m; path = ../native/internal/NativeRendering/ANNativeRenderingViewController.m; sourceTree = "<group>"; };
0E7BC1CA229FC71D002F41FF /* ANNativeRenderingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ANNativeRenderingViewController.h; path = ../native/internal/NativeRendering/ANNativeRenderingViewController.h; sourceTree = "<group>"; };
Expand All @@ -398,6 +396,8 @@
381A0182245B17850093EBB2 /* ANAudioVolumeChangeListener.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ANAudioVolumeChangeListener.m; sourceTree = "<group>"; };
3850566924DAD12F00D4B54D /* ANAdResponseCode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ANAdResponseCode.h; sourceTree = "<group>"; };
3850566A24DAD12F00D4B54D /* ANAdResponseCode.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ANAdResponseCode.m; sourceTree = "<group>"; };
38975FF12540488D006C4578 /* ANBrowserViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ANBrowserViewController.xib; sourceTree = "<group>"; };
38975FF22540488D006C4578 /* ANBrowserViewController_SizeClasses.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ANBrowserViewController_SizeClasses.xib; sourceTree = "<group>"; };
4F131E8A1F71CCE50019FDAC /* ANAdFetcherResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANAdFetcherResponse.h; sourceTree = "<group>"; };
4F131E8B1F71CCE50019FDAC /* ANAdFetcherResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ANAdFetcherResponse.m; sourceTree = "<group>"; };
4F403A6D2043C8CF00EF75A2 /* vastVideo.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = vastVideo.html; sourceTree = "<group>"; };
Expand Down Expand Up @@ -973,9 +973,9 @@
isa = PBXGroup;
children = (
ECE4EACF194B768A0069D934 /* images */,
FC210A302007D529002A9F0E /* ANBrowserViewController.xib */,
FC210A332007D52C002A9F0E /* ANBrowserViewController_SizeClasses.xib */,
ECE4EACC194B768A0069D934 /* ANInterstitialAdViewController.xib */,
38975FF22540488D006C4578 /* ANBrowserViewController_SizeClasses.xib */,
38975FF12540488D006C4578 /* ANBrowserViewController.xib */,
ECE4EACD194B768A0069D934 /* anjam.js */,
8A3EC16F19B8FDC70049CD29 /* ANMRAID.bundle */,
609733001E42EAFF0061EC0A /* ASTMediationManager.js */,
Expand Down Expand Up @@ -1274,8 +1274,6 @@
0E1421EC22F99AC9006C597A /* an_arrow_right.png in Resources */,
0E1421ED22F99AC9006C597A /* [email protected] in Resources */,
0E1421EE22F99AC9006C597A /* [email protected] in Resources */,
0E14221122F99AD4006C597A /* ANBrowserViewController.xib in Resources */,
0E14221222F99AD6006C597A /* ANBrowserViewController_SizeClasses.xib in Resources */,
0E14221322F99AE2006C597A /* ANInterstitialAdViewController.xib in Resources */,
0E14221422F99AE7006C597A /* anjam.js in Resources */,
0E14221522F99AE9006C597A /* ANMRAID.bundle in Resources */,
Expand All @@ -1300,6 +1298,8 @@
0E1421FA22F99AC9006C597A /* [email protected] in Resources */,
0E1421FB22F99AC9006C597A /* UIButtonBarArrowRight.png in Resources */,
0E1421FC22F99AC9006C597A /* [email protected] in Resources */,
38975FF52540488D006C4578 /* ANBrowserViewController_SizeClasses.xib in Resources */,
38975FF32540488D006C4578 /* ANBrowserViewController.xib in Resources */,
0E14221C22F99B02006C597A /* vastVideo.html in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -1312,10 +1312,10 @@
0E1421FE22F99ACA006C597A /* [email protected] in Resources */,
0E1421FF22F99ACA006C597A /* [email protected] in Resources */,
0E14220022F99ACA006C597A /* an_arrow_right.png in Resources */,
38975FF42540488D006C4578 /* ANBrowserViewController.xib in Resources */,
0E14220122F99ACA006C597A /* [email protected] in Resources */,
38975FF62540488D006C4578 /* ANBrowserViewController_SizeClasses.xib in Resources */,
0E14220222F99ACA006C597A /* [email protected] in Resources */,
F52F83142295DCA500F4578C /* ANBrowserViewController.xib in Resources */,
F52F83152295DCA500F4578C /* ANBrowserViewController_SizeClasses.xib in Resources */,
0E14220322F99ACA006C597A /* appnexus_logo_icon.png in Resources */,
0E14220422F99ACA006C597A /* [email protected] in Resources */,
0E14220522F99ACA006C597A /* compass.png in Resources */,
Expand Down Expand Up @@ -1478,25 +1478,6 @@
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXVariantGroup section */
FC210A302007D529002A9F0E /* ANBrowserViewController.xib */ = {
isa = PBXVariantGroup;
children = (
0E6D9AB220D1A943001FA1FA /* Base */,
);
name = ANBrowserViewController.xib;
sourceTree = "<group>";
};
FC210A332007D52C002A9F0E /* ANBrowserViewController_SizeClasses.xib */ = {
isa = PBXVariantGroup;
children = (
0E6D9AB320D1A943001FA1FA /* Base */,
);
name = ANBrowserViewController_SizeClasses.xib;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
8A9AED9F1A1BE84F00C58BDA /* Debug */ = {
isa = XCBuildConfiguration;
Expand Down Expand Up @@ -1526,7 +1507,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = "";
MARKETING_VERSION = 7.7;
MARKETING_VERSION = 7.7.1;
MTL_ENABLE_DEBUG_INFO = YES;
PRODUCT_BUNDLE_IDENTIFIER = "corp.appnexus.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -1563,7 +1544,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = "";
MARKETING_VERSION = 7.7;
MARKETING_VERSION = 7.7.1;
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = "corp.appnexus.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -1715,7 +1696,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = "";
MARKETING_VERSION = 7.7;
MARKETING_VERSION = 7.7.1;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.appnexus.AppNexusNativeSDK;
Expand Down Expand Up @@ -1760,7 +1741,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = "";
MARKETING_VERSION = 7.7;
MARKETING_VERSION = 7.7.1;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.appnexus.AppNexusNativeSDK;
Expand Down
8 changes: 6 additions & 2 deletions sdk/sourcefiles/internal/ANBannerAdView.m
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,12 @@ - (void)setContentView:(UIView *)newContentView
{
// Do not update lazy loaded webview unless the new webview candidate is defined.
//
if (!newContentView && self.isLazySecondPassThroughAdUnit) { return; }
if (!newContentView && self.isLazySecondPassThroughAdUnit) {
//reset this property so that the refresh of banner doesnt get affected - https://jira.xandr-services.com/browse/MS-4573
_contentView = newContentView;
return;

}

//
if (newContentView != _contentView)
Expand Down Expand Up @@ -663,7 +668,6 @@ - (void)universalAdFetcher:(ANUniversalAdFetcher *)fetcher didFinishRequestWithR
if (trackersShouldBeFired) {
[self fireTrackerAndOMID];
}

[self adDidReceiveAd:self];


Expand Down
2 changes: 1 addition & 1 deletion sdk/sourcefiles/internal/ANGlobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#define AN_ERROR_TABLE @"errors"

#define AN_DEFAULT_PLACEMENT_ID @"default_placement_id"
#define AN_SDK_VERSION @"7.7"
#define AN_SDK_VERSION @"7.7.1"


#define APPNEXUS_BANNER_SIZE CGSizeMake(320, 50)
Expand Down

0 comments on commit eb488d8

Please sign in to comment.