Skip to content

Commit

Permalink
Merge branch 'master' of ssh://stash.corp.appnexus.com:7999/mobile-sd…
Browse files Browse the repository at this point in the history
…k/app_mobile-sdk-ios
  • Loading branch information
asharmaa committed May 7, 2020
2 parents f87666e + 18e1037 commit 4b9c90a
Show file tree
Hide file tree
Showing 82 changed files with 3,510 additions and 2,549 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ xcuserdata/
*.moved-aside
*.xccheckout
*.xcscmblueprint
*.xcworkspace

########################################################################################
# Objective-C.gitignore
Expand Down
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.3"
s.version = "7.3.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.3.1
### Improvements/Bug Fixes
+ MS-4326: Fix for ANMultiAdRequest crashes when UT Response is not received due to Internet connectivity issues/device being offline


## 7.3
### New Feature
+ MS-4266 Added API to support Friendly Obstruction for Open Measurement
Expand Down

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/* Copyright 2020 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 <UIKit/UIKit.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

@end

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* Copyright 2020 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 "AppDelegate.h"

@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
return YES;
}

@end
Original file line number Diff line number Diff line change
@@ -1,34 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="Y6l-fV-MSh">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="vXZ-lx-hvc">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment version="4400" identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Navigation Controller-->
<scene sceneID="ozJ-Ud-MLw">
<objects>
<navigationController id="Y6l-fV-MSh" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="pqq-gm-uRw">
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="vXZ-lx-hvc" kind="relationship" relationship="rootViewController" id="tGR-YO-Phv"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="e6M-c7-HCG" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-468" y="32"/>
</scene>
<!--Simple View Controller-->
<!--Banner Ad View Controller-->
<scene sceneID="ufC-wZ-h7g">
<objects>
<viewController id="vXZ-lx-hvc" customClass="SimpleViewController" sceneMemberID="viewController">
<viewController id="vXZ-lx-hvc" customClass="BannerAdViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="jyV-Pf-zRb"/>
<viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/>
Expand All @@ -45,7 +27,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-14" y="32"/>
<point key="canvasLocation" x="-20.289855072463769" y="21.428571428571427"/>
</scene>
<!--Simple Web View Controller-->
<scene sceneID="Aed-eF-8RK">
Expand All @@ -56,11 +38,11 @@
<viewControllerLayoutGuide type="bottom" id="6AX-Ng-S30"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="JAC-Ci-3Hk">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="647"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<wkWebView contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Kau-tQ-K5Z">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="647"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" heightSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.36078431370000003" green="0.38823529410000002" blue="0.4039215686" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<wkWebViewConfiguration key="configuration">
Expand All @@ -69,7 +51,7 @@
</wkWebViewConfiguration>
</wkWebView>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7xD-lD-F4E">
<rect key="frame" x="312" y="28" width="47" height="44"/>
<rect key="frame" x="312" y="28" width="47" height="43"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" heightSizable="YES" flexibleMaxY="YES"/>
<state key="normal" title="X"/>
<connections>
Expand All @@ -86,7 +68,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="tF9-s8-1D6" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="482" y="3"/>
<point key="canvasLocation" x="698.55072463768124" y="2.0089285714285712"/>
</scene>
</scenes>
</document>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2014 APPNEXUS INC
/* Copyright 2020 APPNEXUS INC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -15,6 +15,6 @@

#import <UIKit/UIKit.h>

@interface SimpleViewController : UIViewController
@interface BannerAdViewController : UIViewController

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/* Copyright 2020 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 "BannerAdViewController.h"
#import <AppNexusSDK/AppNexusSDK.h>



@interface BannerAdViewController () <ANBannerAdViewDelegate>

@property (nonatomic, readwrite, strong) ANBannerAdView *banner;


@end

@implementation BannerAdViewController

- (void)viewDidLoad
{
[super viewDidLoad];
self.title = @"Banner Ad";

int adWidth = 300;
int adHeight = 250;
NSString *adID = @"1281482";

// We want to center our ad on the screen.
CGRect screenRect = [[UIScreen mainScreen] bounds];
CGFloat originX = (screenRect.size.width / 2) - (adWidth / 2);
CGFloat originY = (screenRect.size.height / 2) - (adHeight / 2);

// Needed for when we create our ad view.
CGRect rect = CGRectMake(originX, originY, adWidth, adHeight);
CGSize size = CGSizeMake(adWidth, adHeight);

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

// Since this example is for testing, we'll turn on PSAs and verbose logging.
self.banner.shouldServePublicServiceAnnouncements = NO;

// Load an ad.
[self.banner loadAd];
}

- (void)adDidReceiveAd:(id)ad {
NSLog(@"Ad did receive ad");
}

-(void)ad:(id)ad requestFailedWithError:(NSError *)error{
NSLog(@"Ad request Failed With Error");
}

- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}

@end
Loading

0 comments on commit 4b9c90a

Please sign in to comment.