Skip to content

Commit

Permalink
4.11.1
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb-lee committed Nov 28, 2016
1 parent 95035c0 commit 821b3f7
Show file tree
Hide file tree
Showing 12 changed files with 73 additions and 52 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## Version 4.11.1 (November 28th, 2016)
- **App Transport Security Updates**
- Checks for "NSAllowsArbitraryLoadsInMedia" were changed to "NSAllowsArbitraryLoadsForMedia", per updated Apple documentation
- Resolves issue in which explicitly using NSAllowsArbitraryLoadsForMedia or NSAllowsArbitraryLoadsInWebContent causes HTTP clickthroughs not to resolve on iOS 10.1 or higher

## Version 4.11.0 (November 10th, 2016)
- **The MoPub SDK now uses WKWebView to display ads when possible. Backwards compatibility for old OS versions is retained using UIWebView.**
- **Native video start tracker now fires immediately upon successful video playback.**
Expand Down
6 changes: 2 additions & 4 deletions MoPubSDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8131,7 +8131,6 @@
"$(inherited)",
);
INFOPLIST_FILE = "$(SRCROOT)/Specs/MoPubSDKSpecs/Specs-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/AdNetworkSupport/GoogleAdMob/SDK\"",
Expand Down Expand Up @@ -8192,7 +8191,6 @@
"$(inherited)",
);
INFOPLIST_FILE = "$(SRCROOT)/Specs/MoPubSDKSpecs/Specs-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/AdNetworkSupport/GoogleAdMob/SDK\"",
Expand Down Expand Up @@ -8249,7 +8247,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "-fembed-bitcode-marker";
SDKROOT = iphoneos;
Expand All @@ -8272,7 +8270,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
OTHER_CFLAGS = "-fembed-bitcode";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
Expand Down
2 changes: 1 addition & 1 deletion MoPubSDK/Internal/MPCoreInstanceProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ typedef id(^MPSingletonProviderBlock)();
typedef NS_OPTIONS(NSUInteger, MPATSSetting) {
MPATSSettingEnabled = 0,
MPATSSettingAllowsArbitraryLoads = (1 << 0),
MPATSSettingAllowsArbitraryLoadsInMedia = (1 << 1),
MPATSSettingAllowsArbitraryLoadsForMedia = (1 << 1),
MPATSSettingAllowsArbitraryLoadsInWebContent = (1 << 2),
MPATSSettingRequiresCertificateTransparency = (1 << 3),
MPATSSettingAllowsLocalNetworking = (1 << 4),
Expand Down
16 changes: 13 additions & 3 deletions MoPubSDK/Internal/MPCoreInstanceProvider.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

static NSString *const kMoPubAppTransportSecurityDictionaryKey = @"NSAppTransportSecurity";
static NSString *const kMoPubAppTransportSecurityAllowsArbitraryLoadsKey = @"NSAllowsArbitraryLoads";
static NSString *const kMoPubAppTransportSecurityAllowsArbitraryLoadsInMediaKey = @"NSAllowsArbitraryLoadsInMedia";
static NSString *const kMoPubAppTransportSecurityAllowsArbitraryLoadsForMediaKey = @"NSAllowsArbitraryLoadsForMedia";
static NSString *const kMoPubAppTransportSecurityAllowsArbitraryLoadsInWebContentKey = @"NSAllowsArbitraryLoadsInWebContent";
static NSString *const kMoPubAppTransportSecurityRequiresCertificateTransparencyKey = @"NSRequiresCertificateTransparency";
static NSString *const kMoPubAppTransportSecurityAllowsLocalNetworkingKey = @"NSAllowsLocalNetworking";
Expand Down Expand Up @@ -292,8 +292,18 @@ - (MPATSSetting)appTransportSecuritySettings
// New App Transport Security keys were introduced in iOS 10. Only send settings for these keys if we're running iOS 10 or greater.
// They may exist in the dictionary if we're running iOS 9, but they won't do anything, so the server shouldn't know about them.
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"10.0")) {
if ([atsSettingsDictionary[kMoPubAppTransportSecurityAllowsArbitraryLoadsInMediaKey] boolValue]) {
gSetting |= MPATSSettingAllowsArbitraryLoadsInMedia;
// In iOS 10, NSAllowsArbitraryLoads gets ignored if ANY keys of NSAllowsArbitraryLoadsForMedia,
// NSAllowsArbitraryLoadsInWebContent, or NSAllowsLocalNetworking are PRESENT (i.e., they can be set to `false`)
// See: https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW34
// If needed, flip NSAllowsArbitraryLoads back to 0 if any of these keys are present.
if (atsSettingsDictionary[kMoPubAppTransportSecurityAllowsArbitraryLoadsForMediaKey] != nil
|| atsSettingsDictionary[kMoPubAppTransportSecurityAllowsArbitraryLoadsInWebContentKey] != nil
|| atsSettingsDictionary[kMoPubAppTransportSecurityAllowsLocalNetworkingKey] != nil) {
gSetting &= (~MPATSSettingAllowsArbitraryLoads);
}

if ([atsSettingsDictionary[kMoPubAppTransportSecurityAllowsArbitraryLoadsForMediaKey] boolValue]) {
gSetting |= MPATSSettingAllowsArbitraryLoadsForMedia;
}
if ([atsSettingsDictionary[kMoPubAppTransportSecurityAllowsArbitraryLoadsInWebContentKey] boolValue]) {
gSetting |= MPATSSettingAllowsArbitraryLoadsInWebContent;
Expand Down
2 changes: 1 addition & 1 deletion MoPubSDK/MPConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#define DEFAULT_PUB_ID @"agltb3B1Yi1pbmNyDAsSBFNpdGUYkaoMDA"
#define MP_SERVER_VERSION @"8"
#define MP_BUNDLE_IDENTIFIER @"com.mopub.mopub"
#define MP_SDK_VERSION @"4.11.0"
#define MP_SDK_VERSION @"4.11.1"

// Sizing constants.
extern CGSize const MOPUB_BANNER_SIZE;
Expand Down
8 changes: 2 additions & 6 deletions MoPubSampleApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3254,7 +3254,6 @@
"$(SRCROOT)/Externals/**",
);
INFOPLIST_FILE = "$(SRCROOT)/MoPubSampleApp/MoPubSampleApp with CEs-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/AdNetworkSupport/GoogleAdMob/SDK",
Expand Down Expand Up @@ -3296,7 +3295,6 @@
"$(SRCROOT)/Externals/**",
);
INFOPLIST_FILE = "$(SRCROOT)/MoPubSampleApp/MoPubSampleApp with CEs-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/AdNetworkSupport/GoogleAdMob/SDK",
Expand Down Expand Up @@ -3336,7 +3334,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -3362,7 +3360,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -3388,7 +3386,6 @@
"$(SRCROOT)/Externals/**",
);
INFOPLIST_FILE = "MoPubSampleApp/MoPubSampleApp-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/AdNetworkSupport/GoogleAdMob/SDK",
Expand Down Expand Up @@ -3421,7 +3418,6 @@
"$(SRCROOT)/Externals/**",
);
INFOPLIST_FILE = "MoPubSampleApp/MoPubSampleApp-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/AdNetworkSupport/GoogleAdMob/SDK",
Expand Down
2 changes: 1 addition & 1 deletion MoPubSampleApp/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(

[[UITableViewHeaderFooterView appearance] setTintColor:[UIColor colorWithRed:0.4 green:0.4 blue:0.4 alpha:1]];
navController.navigationBar.barStyle = UIBarStyleBlackOpaque;
navController.navigationBar.titleTextAttributes = @{UITextAttributeTextColor: [UIColor colorWithRed:0.86 green:0.86 blue:0.86 alpha:1]};
navController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor colorWithRed:0.86 green:0.86 blue:0.86 alpha:1]};

return YES;
}
Expand Down
26 changes: 15 additions & 11 deletions MoPubSampleApp/Controllers/MPAdEntryViewController.xib
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="4514" systemVersion="12F45" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11542" systemVersion="15G1108" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" colorMatched="NO">
<dependencies>
<deployment version="1280" identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/>
<deployment identifier="iOS"/>
<development version="7000" identifier="xcode"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MPAdEntryViewController">
Expand All @@ -28,7 +29,7 @@
<rect key="frame" x="0.0" y="20" width="82" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<color key="textColor" red="0.66666666666666663" green="0.66666666666666663" blue="0.66666666666666663" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="fCR-b2-Whl">
Expand All @@ -45,7 +46,7 @@
<rect key="frame" x="0.0" y="58" width="82" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<color key="textColor" red="0.66666666666666663" green="0.66666666666666663" blue="0.66666666666666663" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter Ad Unit ID" minimumFontSize="8" clearButtonMode="whileEditing" id="mvS-ta-PkW">
Expand All @@ -61,7 +62,7 @@
<rect key="frame" x="0.0" y="96" width="82" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<color key="textColor" red="0.66666666666666663" green="0.66666666666666663" blue="0.66666666666666663" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter a Name (Optional)" minimumFontSize="8" clearButtonMode="whileEditing" id="xo0-VW-A6P">
Expand Down Expand Up @@ -92,7 +93,7 @@
<button hidden="YES" opaque="NO" alpha="0.69999999999999973" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="98I-4z-Qoi" userLabel="Button - Toucheater">
<rect key="frame" x="0.0" y="0.0" width="320" height="276"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" name="HelveticaNeue-Bold" family="Helvetica Neue" pointSize="26"/>
<connections>
<action selector="touchEaterClicked:" destination="-1" eventType="touchUpInside" id="Ryo-se-uhP"/>
Expand All @@ -101,7 +102,7 @@
<pickerView hidden="YES" contentMode="scaleToFill" id="sCz-Un-4PR">
<rect key="frame" x="0.0" y="254" width="320" height="162"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<color key="backgroundColor" red="0.66666666666666663" green="0.66666666666666663" blue="0.66666666666666663" alpha="1" colorSpace="calibratedRGB"/>
<connections>
<outlet property="dataSource" destination="-1" id="IR0-GS-bfM"/>
<outlet property="delegate" destination="-1" id="LLa-nV-KoP"/>
Expand All @@ -120,9 +121,12 @@
</toolbar>
</subviews>
<color key="backgroundColor" red="0.21176470588235294" green="0.21176470588235294" blue="0.21176470588235294" alpha="1" colorSpace="calibratedRGB"/>
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/>
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" barStyle="black" translucent="NO" prompted="NO"/>
<simulatedScreenMetrics key="simulatedDestinationMetrics"/>
</view>
</objects>
</document>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination"/>
</simulatedMetricsContainer>
</document>
Loading

0 comments on commit 821b3f7

Please sign in to comment.