diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/CHANGELOG.md b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/CHANGELOG.md new file mode 100755 index 0000000000..f1326cdbdf --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/CHANGELOG.md @@ -0,0 +1,15 @@ +## Changelog + * 7.30.0.1 + * Updated the adapter's cocoapods dependency to MoPub version 5.0 + + * 7.30.0.0 + * This version of the adapters has been certified with AdMob 7.30.0. + + * 7.29.0.0 + * This version of the adapters has been certified with AdMob 7.29.0. + + * 7.27.0.1 + * This version of the adapters has been certified with AdMob 7.27.0. + + * Initial Commit + * Adapters moved from [mopub-iOS-sdk](https://github.com/mopub/mopub-ios-sdk) to [mopub-iOS-mediation](https://github.com/mopub/mopub-iOS-mediation/) diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/MPGoogleAdMobRewardedVideoCustomEvent.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/MPGoogleAdMobRewardedVideoCustomEvent.h index 5a5b3211ba..2ec02ee475 100755 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/MPGoogleAdMobRewardedVideoCustomEvent.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/MPGoogleAdMobRewardedVideoCustomEvent.h @@ -1,9 +1,9 @@ +#if __has_include() +#import +#else #import "MPRewardedVideoCustomEvent.h" +#endif -/* - * Please reference the Supported Mediation Partner page at http://bit.ly/2mqsuFH for the - * latest version and ad format certifications. - */ @interface MPGoogleAdMobRewardedVideoCustomEvent : MPRewardedVideoCustomEvent @end diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/MoPub-AdMob-PodSpecs/LICENSE b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/MoPub-AdMob-PodSpecs/LICENSE new file mode 100755 index 0000000000..ca6cf23021 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/MoPub-AdMob-PodSpecs/LICENSE @@ -0,0 +1,3 @@ +The MoPub SDK License can be found at http://www.mopub.com/legal/sdk-license-agreement/ + + diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/MoPub-AdMob-PodSpecs/MoPub-AdMob-Adapters.podspec b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/MoPub-AdMob-PodSpecs/MoPub-AdMob-Adapters.podspec new file mode 100755 index 0000000000..c5cd4a4e9d --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/MoPub-AdMob-PodSpecs/MoPub-AdMob-Adapters.podspec @@ -0,0 +1,24 @@ +# +# Be sure to run `pod lib lint MoPub-Google-Adapters.podspec' to ensure this is a +# valid spec before submitting. +# + +Pod::Spec.new do |s| +s.name = 'MoPub-AdMob-Adapters' +s.version = '7.30.0.1' +s.summary = 'Google Adapters for mediating through MoPub.' +s.description = <<-DESC +Supported ad formats: Banner, Interstitial, Rewarded Video, Native.\n +To download and integrate the Mobile Ads SDK, please check this tutorial: https://developers.google.com/admob/ios/download.\n\n +For inquiries and support, please utilize the developer support forum: https://groups.google.com/forum/#!forum/google-admob-ads-sdk/. \n +DESC +s.homepage = 'https://github.com/mopub/mopub-ios-mediation' +s.license = { :type => 'New BSD', :file => 'LICENSE' } +s.author = { 'MoPub' => 'support@mopub.com' } +s.source = { :git => 'https://github.com/mopub/mopub-ios-mediation.git', :commit => 'master' } +s.ios.deployment_target = '8.0' +s.static_framework = true +s.source_files = 'AdMob/*.{h,m}' +s.dependency 'mopub-ios-sdk', '~> 5.0' +s.dependency 'Google-Mobile-Ads-SDK', '7.30.0' +end diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/README.md b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/README.md new file mode 100755 index 0000000000..9e04445889 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/README.md @@ -0,0 +1,7 @@ +## Overview + * This folder contains mediation adapters used to mediate AdMob. + * To download and integrate the AdMob SDK, please check [this tutorial](https://developers.google.com/admob/ios/download). + * For inquiries and support, please visit [support](https://groups.google.com/forum/#!forum/google-admob-ads-sdk/) forum. + +## Adapter integration + * To integrate adapters, please visit our [integration tutorial](https://developers.mopub.com/docs/ios/integrating-networks/). diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/GoogleMobileAds b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/GoogleMobileAds deleted file mode 120000 index 95e839f2af..0000000000 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/GoogleMobileAds +++ /dev/null @@ -1 +0,0 @@ -Versions/Current/GoogleMobileAds \ No newline at end of file diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/GoogleMobileAds b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/GoogleMobileAds new file mode 100644 index 0000000000..ccdfefcce2 Binary files /dev/null and b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/GoogleMobileAds differ diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers deleted file mode 120000 index a177d2a6b9..0000000000 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers +++ /dev/null @@ -1 +0,0 @@ -Versions/Current/Headers \ No newline at end of file diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/DFPBannerView.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/DFPBannerView.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/DFPBannerView.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/DFPBannerView.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/DFPBannerViewOptions.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/DFPBannerViewOptions.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/DFPBannerViewOptions.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/DFPBannerViewOptions.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedAd.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/DFPCustomRenderedAd.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedAd.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/DFPCustomRenderedAd.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedBannerViewDelegate.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/DFPCustomRenderedBannerViewDelegate.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedBannerViewDelegate.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/DFPCustomRenderedBannerViewDelegate.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedInterstitialDelegate.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/DFPCustomRenderedInterstitialDelegate.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/DFPCustomRenderedInterstitialDelegate.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/DFPCustomRenderedInterstitialDelegate.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/DFPInterstitial.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/DFPInterstitial.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/DFPInterstitial.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/DFPInterstitial.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/DFPRequest.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/DFPRequest.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/DFPRequest.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/DFPRequest.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADAdChoicesView.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADAdChoicesView.h similarity index 81% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADAdChoicesView.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADAdChoicesView.h index 4604413465..c9bab806fa 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADAdChoicesView.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADAdChoicesView.h @@ -20,10 +20,6 @@ GAD_ASSUME_NONNULL_BEGIN /// GADNativeAppInstallAdView and GADNativeContentAdView. @interface GADAdChoicesView : UIView -/// Native ad object that contains the AdChoices asset. Set this property to populate this view's -/// content. -@property(nonatomic, weak) GADNativeAd *nativeAd; - @end GAD_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoader.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADAdLoader.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoader.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADAdLoader.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoaderAdTypes.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADAdLoaderAdTypes.h similarity index 85% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoaderAdTypes.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADAdLoaderAdTypes.h index e63230d06b..a99a5d49f3 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoaderAdTypes.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADAdLoaderAdTypes.h @@ -34,4 +34,8 @@ GAD_EXTERN GADAdLoaderAdType const kGADAdLoaderAdTypeNativeCustomTemplate; /// conform to the DFPBannerAdLoaderDelegate protocol. See DFPBannerView.h. GAD_EXTERN GADAdLoaderAdType const kGADAdLoaderAdTypeDFPBanner; +/// Use with GADAdLoader to request native ads. To receive ads, the ad loader's delegate must +/// conform to the GADUnifiedNativeAdLoaderDelegate protocol. See GADUnifiedNativeAd.h. +GAD_EXTERN GADAdLoaderAdType const kGADAdLoaderAdTypeUnifiedNative; + GAD_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoaderDelegate.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADAdLoaderDelegate.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADAdLoaderDelegate.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADAdLoaderDelegate.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADAdNetworkExtras.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADAdNetworkExtras.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADAdNetworkExtras.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADAdNetworkExtras.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADAdReward.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADAdReward.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADAdReward.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADAdReward.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADAdSize.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADAdSize.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADAdSize.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADAdSize.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADAdSizeDelegate.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADAdSizeDelegate.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADAdSizeDelegate.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADAdSizeDelegate.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADAppEventDelegate.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADAppEventDelegate.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADAppEventDelegate.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADAppEventDelegate.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADAudioVideoManager.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADAudioVideoManager.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADAudioVideoManager.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADAudioVideoManager.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADAudioVideoManagerDelegate.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADAudioVideoManagerDelegate.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADAudioVideoManagerDelegate.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADAudioVideoManagerDelegate.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADBannerView.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADBannerView.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADBannerView.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADBannerView.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADBannerViewDelegate.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADBannerViewDelegate.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADBannerViewDelegate.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADBannerViewDelegate.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADCorrelator.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADCorrelator.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADCorrelator.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADCorrelator.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADCorrelatorAdLoaderOptions.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADCorrelatorAdLoaderOptions.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADCorrelatorAdLoaderOptions.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADCorrelatorAdLoaderOptions.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventBanner.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADCustomEventBanner.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventBanner.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADCustomEventBanner.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventBannerDelegate.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADCustomEventBannerDelegate.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventBannerDelegate.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADCustomEventBannerDelegate.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventExtras.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADCustomEventExtras.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventExtras.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADCustomEventExtras.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventInterstitial.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADCustomEventInterstitial.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventInterstitial.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADCustomEventInterstitial.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventInterstitialDelegate.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADCustomEventInterstitialDelegate.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventInterstitialDelegate.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADCustomEventInterstitialDelegate.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventNativeAd.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADCustomEventNativeAd.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventNativeAd.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADCustomEventNativeAd.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventNativeAdDelegate.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADCustomEventNativeAdDelegate.h similarity index 72% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventNativeAdDelegate.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADCustomEventNativeAdDelegate.h index 19029a3c81..4a94602501 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventNativeAdDelegate.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADCustomEventNativeAdDelegate.h @@ -8,8 +8,9 @@ #import #import -#import #import +#import +#import GAD_ASSUME_NONNULL_BEGIN @@ -26,6 +27,10 @@ GAD_ASSUME_NONNULL_BEGIN - (void)customEventNativeAd:(id)customEventNativeAd didFailToLoadWithError:(NSError *)error; +/// Tells the delegate that the custom event ad request succeeded and loaded a unified native ad. +- (void)customEventNativeAd:(id)customEventNativeAd + didReceiveMediatedUnifiedNativeAd:(id)mediatedUnifiedNativeAd; + @end GAD_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventParameters.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADCustomEventParameters.h similarity index 88% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventParameters.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADCustomEventParameters.h index 084155d69e..5a6041e77e 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventParameters.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADCustomEventParameters.h @@ -14,6 +14,6 @@ GAD_ASSUME_NONNULL_BEGIN /// Key for getting the server parameter configured in AdMob when mediating to a custom event /// adapter. /// Example: NSString *serverParameter = connector.credentials[GADCustomEventParametersServer]. -extern NSString *const GADCustomEventParametersServer; +GAD_EXTERN NSString *const GADCustomEventParametersServer; GAD_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventRequest.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADCustomEventRequest.h similarity index 87% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventRequest.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADCustomEventRequest.h index cf48be3a28..e702a3d4f2 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADCustomEventRequest.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADCustomEventRequest.h @@ -18,12 +18,6 @@ GAD_ASSUME_NONNULL_BEGIN /// forwarded to custom events for purposes of populating an ad request to a 3rd party ad network. @interface GADCustomEventRequest : NSObject -/// User's gender set in GADRequest. If not specified, returns kGADGenderUnknown. -@property(nonatomic, readonly, assign) GADGender userGender; - -/// User's birthday set in GADRequest. If not specified, returns nil. -@property(nonatomic, readonly, copy, GAD_NULLABLE) NSDate *userBirthday; - /// If the user's latitude, longitude, and accuracy are not specified, userHasLocation returns NO, /// and userLatitude, userLongitude, and userLocationAccuracyInMeters return 0. @property(nonatomic, readonly, assign) BOOL userHasLocation; @@ -54,6 +48,14 @@ GAD_ASSUME_NONNULL_BEGIN /// Indicates if the testing property has been set in GADRequest. @property(nonatomic, readonly, assign) BOOL isTesting; +#pragma mark Deprecated methods + +/// Deprecated. User's gender set in GADRequest. If not specified, returns kGADGenderUnknown. +@property(nonatomic, readonly, assign) GADGender userGender GAD_DEPRECATED_ATTRIBUTE; + +/// Deprecated. User's birthday set in GADRequest. If not specified, returns nil. +@property(nonatomic, readonly, copy, GAD_NULLABLE) NSDate *userBirthday GAD_DEPRECATED_ATTRIBUTE; + @end GAD_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADDebugOptionsViewController.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADDebugOptionsViewController.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADDebugOptionsViewController.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADDebugOptionsViewController.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADDynamicHeightSearchRequest.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADDynamicHeightSearchRequest.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADDynamicHeightSearchRequest.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADDynamicHeightSearchRequest.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADExtras.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADExtras.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADExtras.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADExtras.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADInAppPurchase.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADInAppPurchase.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADInAppPurchase.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADInAppPurchase.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADInAppPurchaseDelegate.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADInAppPurchaseDelegate.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADInAppPurchaseDelegate.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADInAppPurchaseDelegate.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADInterstitial.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADInterstitial.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADInterstitial.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADInterstitial.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADInterstitialDelegate.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADInterstitialDelegate.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADInterstitialDelegate.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADInterstitialDelegate.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADMediaView.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADMediaView.h similarity index 83% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADMediaView.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADMediaView.h index b6f6edd9b8..11f7d10598 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADMediaView.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADMediaView.h @@ -24,10 +24,6 @@ GAD_ASSUME_NONNULL_BEGIN /// is empty. @interface GADMediaView : UIView -/// The associated native ad. Setting this property displays the native ad's media assets in this -/// view. -@property(nonatomic, weak) GADNativeAd *nativeAd; - @end GAD_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADMobileAds.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADMobileAds.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADMobileAds.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADMobileAds.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADMultipleAdsAdLoaderOptions.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADMultipleAdsAdLoaderOptions.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADMultipleAdsAdLoaderOptions.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADMultipleAdsAdLoaderOptions.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAd.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeAd.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAd.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeAd.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdDelegate.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeAdDelegate.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdDelegate.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeAdDelegate.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImage+Mediation.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeAdImage+Mediation.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImage+Mediation.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeAdImage+Mediation.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImage.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeAdImage.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImage.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeAdImage.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImageAdLoaderOptions.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeAdImageAdLoaderOptions.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdImageAdLoaderOptions.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeAdImageAdLoaderOptions.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdViewAdOptions.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeAdViewAdOptions.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAdViewAdOptions.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeAdViewAdOptions.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAppInstallAd.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeAppInstallAd.h similarity index 82% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAppInstallAd.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeAppInstallAd.h index 225719a846..89cfbd981e 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAppInstallAd.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeAppInstallAd.h @@ -13,6 +13,7 @@ #import #import #import +#import #import #import @@ -48,9 +49,21 @@ GAD_ASSUME_NONNULL_BEGIN /// Video controller for controlling video playback in GADNativeAppInstallAdView's mediaView. @property(nonatomic, strong, readonly) GADVideoController *videoController; -/// Registers ad view and asset views created from this native ad. +/// Registers ad view and asset views with this native ad. /// @param assetViews Dictionary of asset views keyed by asset IDs. -- (void)registerAdView:(UIView *)adView assetViews:(NSDictionary *)assetViews; +- (void)registerAdView:(UIView *)adView + assetViews:(NSDictionary *)assetViews + GAD_DEPRECATED_MSG_ATTRIBUTE("Use -registerAdView:clickableAssetViews:nonclickableAssetViews:"); + +/// Registers ad view, clickable asset views, and nonclickable asset views with this native ad. +/// Media view shouldn't be registered as clickable. +/// @param clickableAssetViews Dictionary of asset views that are clickable, keyed by asset IDs. +/// @param nonclickableAssetViews Dictionary of asset views that are not clickable, keyed by asset +/// IDs. +- (void)registerAdView:(UIView *)adView + clickableAssetViews:(NSDictionary *)clickableAssetViews + nonclickableAssetViews: + (NSDictionary *)nonclickableAssetViews; /// Unregisters ad view from this native ad. The corresponding asset views will also be /// unregistered. diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeAppInstallAdAssetIDs.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeAppInstallAdAssetIDs.h new file mode 100644 index 0000000000..710f491f04 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeAppInstallAdAssetIDs.h @@ -0,0 +1,30 @@ +// +// GADNativeAppInstallAdAssetIDs.h +// Google Mobile Ads SDK +// +// Copyright 2017 Google Inc. All rights reserved. +// + +#import + +#import + +GAD_ASSUME_NONNULL_BEGIN + +typedef NSString *GADNativeAppInstallAssetID GAD_STRING_ENUM; + +GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallHeadlineAsset; +GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallCallToActionAsset; +GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallIconAsset; +GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallBodyAsset; +GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallStoreAsset; +GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallPriceAsset; +GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallImageAsset; +GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallStarRatingAsset; +GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallAttributionIconAsset; +GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallAttributionTextAsset; +GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallMediaViewAsset; +GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallAdChoicesViewAsset; +GAD_EXTERN GADNativeAppInstallAssetID const GADNativeAppInstallBackgroundAsset; + +GAD_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeContentAd.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeContentAd.h similarity index 80% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeContentAd.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeContentAd.h index 20ab074fa5..512846c918 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeContentAd.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeContentAd.h @@ -13,6 +13,7 @@ #import #import #import +#import #import #import @@ -46,9 +47,21 @@ GAD_ASSUME_NONNULL_BEGIN /// Video controller for controlling video playback in GADNativeContentAdView's mediaView. @property(nonatomic, strong, readonly) GADVideoController *videoController; -/// Registers ad view and asset views created from this native ad. +/// Registers ad view and asset views created with this native ad. /// @param assetViews Dictionary of asset views keyed by asset IDs. -- (void)registerAdView:(UIView *)adView assetViews:(NSDictionary *)assetViews; +- (void)registerAdView:(UIView *)adView + assetViews:(NSDictionary *)assetViews + GAD_DEPRECATED_MSG_ATTRIBUTE("Use -registerAdView:clickableAssetViews:nonclickableAssetViews:"); + +/// Registers ad view, clickable asset views, and nonclickable asset views with this native ad. +/// Media view shouldn't be registered as clickable. +/// @param clickableAssetViews Dictionary of asset views that are clickable, keyed by asset IDs. +/// @param nonclickableAssetViews Dictionary of asset views that are not clickable, keyed by asset +/// IDs. +- (void)registerAdView:(UIView *)adView + clickableAssetViews:(NSDictionary *)clickableAssetViews + nonclickableAssetViews: + (NSDictionary *)nonclickableAssetViews; /// Unregisters ad view from this native ad. The corresponding asset views will also be /// unregistered. diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeContentAdAssetIDs.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeContentAdAssetIDs.h new file mode 100644 index 0000000000..78ba54e922 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeContentAdAssetIDs.h @@ -0,0 +1,28 @@ +// +// GADNativeContentAdAssetIDs.h +// Google Mobile Ads SDK +// +// Copyright 2017 Google Inc. All rights reserved. +// + +#import + +#import + +GAD_ASSUME_NONNULL_BEGIN + +typedef NSString *GADNativeContentAdAssetID GAD_STRING_ENUM; + +GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentHeadlineAsset; +GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentBodyAsset; +GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentCallToActionAsset; +GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentAdvertiserAsset; +GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentImageAsset; +GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentLogoAsset; +GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentAttributionIconAsset; +GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentAttributionTextAsset; +GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentMediaViewAsset; +GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentAdChoicesViewAsset; +GAD_EXTERN GADNativeContentAdAssetID const GADNativeContentBackgroundAsset; + +GAD_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeCustomTemplateAd.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeCustomTemplateAd.h similarity index 98% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeCustomTemplateAd.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeCustomTemplateAd.h index 153dcfd769..2fb396219f 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeCustomTemplateAd.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeCustomTemplateAd.h @@ -21,7 +21,7 @@ GAD_ASSUME_NONNULL_BEGIN typedef void (^GADNativeAdCustomClickHandler)(NSString *assetID); /// Asset key for the GADMediaView asset view. -extern NSString *const GADNativeCustomTemplateAdMediaViewKey; +GAD_EXTERN NSString *const GADNativeCustomTemplateAdMediaViewKey; /// Native custom template ad. To request this ad type, you need to pass /// kGADAdLoaderAdTypeNativeCustomTemplate (see GADAdLoaderAdTypes.h) to the |adTypes| parameter in diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeExpressAdView.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeExpressAdView.h similarity index 99% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeExpressAdView.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeExpressAdView.h index 2eeb67c9bb..ed93885ca1 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeExpressAdView.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeExpressAdView.h @@ -29,6 +29,7 @@ GAD_ASSUME_NONNULL_BEGIN /// // Request an ad without any additional targeting information. /// [adView loadRequest:[GADRequest request]]; /// +GAD_DEPRECATED_ATTRIBUTE @interface GADNativeExpressAdView : UIView #pragma mark - Initialization diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeExpressAdViewDelegate.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeExpressAdViewDelegate.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeExpressAdViewDelegate.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADNativeExpressAdViewDelegate.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADRequest.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADRequest.h similarity index 83% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADRequest.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADRequest.h index 422ba55aea..5aa7f27c7a 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADRequest.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADRequest.h @@ -16,11 +16,11 @@ GAD_ASSUME_NONNULL_BEGIN /// Add this constant to the testDevices property's array to receive test ads on the simulator. GAD_EXTERN const id kGADSimulatorID; -/// Genders to help deliver more relevant ads. +/// Deprecated gender constants. typedef NS_ENUM(NSInteger, GADGender) { - kGADGenderUnknown, ///< Unknown gender. - kGADGenderMale, ///< Male gender. - kGADGenderFemale ///< Female gender. + kGADGenderUnknown, ///< Deprecated. + kGADGenderMale, ///< Deprecated. + kGADGenderFemale ///< Deprecated. }; /// Specifies optional parameters for ad requests. @@ -34,9 +34,9 @@ typedef NS_ENUM(NSInteger, GADGender) { /// Ad networks may have additional parameters they accept. To pass these parameters to them, create /// the ad network extras object for that network, fill in the parameters, and register it here. The /// ad network should have a header defining the interface for the 'extras' object to create. All -/// networks will have access to the basic settings you've set in this GADRequest (gender, birthday, -/// testing mode, etc.). If you register an extras object that is the same class as one you have -/// registered before, the previous extras will be overwritten. +/// networks will have access to the basic settings you've set in this GADRequest. If you register +/// an extras object that is the same class as one you have registered before, the previous extras +/// will be overwritten. - (void)registerAdNetworkExtras:(id)extras; /// Returns the network extras defined for an ad network. @@ -58,12 +58,6 @@ typedef NS_ENUM(NSInteger, GADGender) { #pragma mark User Information -/// Provide the user's gender to increase ad relevancy. -@property(nonatomic, assign) GADGender gender; - -/// Provide the user's birthday to increase ad relevancy. -@property(nonatomic, copy, GAD_NULLABLE) NSDate *birthday; - /// The user's current location may be used to deliver more relevant ads. However do not use Core /// Location just for advertising, make sure it is used for more beneficial reasons as well. It is /// both a good idea and part of Apple's guidelines. @@ -110,15 +104,18 @@ typedef NS_ENUM(NSInteger, GADGender) { #pragma mark Deprecated Methods -/// Provide the user's birthday to increase ad relevancy. +/// Deprecated property. The user's gender. +@property(nonatomic, assign) GADGender gender GAD_DEPRECATED_ATTRIBUTE; + +/// Deprecated property. The user's birthday. +@property(nonatomic, copy, GAD_NULLABLE) NSDate *birthday GAD_DEPRECATED_ATTRIBUTE; + +/// Deprecated. - (void)setBirthdayWithMonth:(NSInteger)month day:(NSInteger)day - year:(NSInteger)year - GAD_DEPRECATED_MSG_ATTRIBUTE(" use the birthday property."); + year:(NSInteger)year GAD_DEPRECATED_ATTRIBUTE; -/// When Core Location isn't available but the user's location is known supplying it here may -/// deliver more relevant ads. It can be any free-form text such as @"Champs-Elysees Paris" or -/// @"94041 US". +/// Deprecated. - (void)setLocationWithDescription:(NSString *GAD_NULLABLE_TYPE)locationDescription GAD_DEPRECATED_MSG_ATTRIBUTE(" use setLocationWithLatitude:longitude:accuracy:."); diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADRequestError.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADRequestError.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADRequestError.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADRequestError.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADRewardBasedVideoAd.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADRewardBasedVideoAd.h similarity index 86% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADRewardBasedVideoAd.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADRewardBasedVideoAd.h index 806f80bec5..6a27aa5086 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADRewardBasedVideoAd.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADRewardBasedVideoAd.h @@ -31,6 +31,11 @@ GAD_ASSUME_NONNULL_BEGIN /// events, this property returns the mediated custom event adapter. @property(nonatomic, readonly, copy, GAD_NULLABLE) NSString *adNetworkClassName; +/// A unique identifier used to identify the user when making server-to-server reward callbacks. +/// This value is used at both request time and during ad display. New values must only be set +/// before ad requests. +@property(nonatomic, copy, GAD_NULLABLE) NSString *userIdentifier; + /// Returns the shared GADRewardBasedVideoAd instance. + (GADRewardBasedVideoAd *)sharedInstance; diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADRewardBasedVideoAdDelegate.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADRewardBasedVideoAdDelegate.h similarity index 91% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADRewardBasedVideoAdDelegate.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADRewardBasedVideoAdDelegate.h index f81dd5922b..9d91f600f0 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADRewardBasedVideoAdDelegate.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADRewardBasedVideoAdDelegate.h @@ -38,6 +38,9 @@ GAD_ASSUME_NONNULL_BEGIN /// Tells the delegate that the reward based video ad started playing. - (void)rewardBasedVideoAdDidStartPlaying:(GADRewardBasedVideoAd *)rewardBasedVideoAd; +/// Tells the delegate that the reward based video ad completed playing. +- (void)rewardBasedVideoAdDidCompletePlaying:(GADRewardBasedVideoAd *)rewardBasedVideoAd; + /// Tells the delegate that the reward based video ad closed. - (void)rewardBasedVideoAdDidClose:(GADRewardBasedVideoAd *)rewardBasedVideoAd; diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADSearchBannerView.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADSearchBannerView.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADSearchBannerView.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADSearchBannerView.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADSearchRequest.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADSearchRequest.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADSearchRequest.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADSearchRequest.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAd+ConfirmationClick.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAd+ConfirmationClick.h new file mode 100644 index 0000000000..7513522bab --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAd+ConfirmationClick.h @@ -0,0 +1,34 @@ +// +// GADUnifiedNativeAd+ConfirmationClick.h +// Google Mobile Ads SDK +// +// Copyright 2017 Google Inc. All rights reserved. +// + +#import +#import + +#import +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +@interface GADUnifiedNativeAd (ConfirmationClick) + +/// Unconfirmed click delegate. +@property(nonatomic, weak, nullable) + id unconfirmedClickDelegate; + +/// Registers a view that will confirm the click. +- (void)registerClickConfirmingView:(nullable UIView *)view; + +/// Cancels the unconfirmed click. Called when user fails to confirm the click. When this method is +/// called, SDK stops tracking click on the registered click confirming view and invokes the +/// -nativeAdDidCancelUnconfirmedClick: delegate method. If there's no ongoing unconfirmed click, +/// this method is no-op. +- (void)cancelUnconfirmedClick; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAd.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAd.h new file mode 100644 index 0000000000..f0ce2cbfa6 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAd.h @@ -0,0 +1,129 @@ +// +// GADUnifiedNativeAd.h +// Google Mobile Ads SDK +// +// Copyright 2017 Google Inc. All rights reserved. +// + +#import +#import + +#import +#import +#import +#import +#import +#import +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Unified native ad. To request this ad type, pass kGADAdLoaderAdTypeUnifiedNative +/// (see GADAdLoaderAdTypes.h) to the |adTypes| parameter in GADAdLoader's initializer method. If +/// you request this ad type, your delegate must conform to the GADUnifiedNativeAdLoaderDelegate +/// protocol. +@interface GADUnifiedNativeAd : NSObject + +#pragma mark - Must be displayed if available + +/// Headline +@property(nonatomic, readonly, copy, nullable) NSString *headline; + +#pragma mark - Recommended to display + +/// Text that encourages user to take some action with the ad. For example "Install". +@property(nonatomic, readonly, copy, nullable) NSString *callToAction; +/// Icon image. +@property(nonatomic, readonly, strong, nullable) GADNativeAdImage *icon; +/// Description. +@property(nonatomic, readonly, copy, nullable) NSString *body; +/// Array of GADNativeAdImage objects. +@property(nonatomic, readonly, strong, nullable) NSArray *images; +/// App store rating (0 to 5). +@property(nonatomic, readonly, copy, nullable) NSDecimalNumber *starRating; +/// The app store name. For example, "App Store". +@property(nonatomic, readonly, copy, nullable) NSString *store; +/// String representation of the app's price. +@property(nonatomic, readonly, copy, nullable) NSString *price; +/// Identifies the advertiser. For example, the advertiser’s name or visible URL. +@property(nonatomic, readonly, copy, nullable) NSString *advertiser; +/// Video controller for controlling video playback in GADUnifiedNativeAdView's mediaView. +@property(nonatomic, strong, readonly, nullable) GADVideoController *videoController; + +/// Optional delegate to receive state change notifications. +@property(nonatomic, weak, nullable) id delegate; + +/// Root view controller for handling ad actions. +@property(nonatomic, weak, nullable) UIViewController *rootViewController; + +/// Dictionary of assets which aren't processed by the receiver. +@property(nonatomic, readonly, copy, nullable) NSDictionary *extraAssets; + +/// The ad network class name that fetched the current ad. For both standard and mediated Google +/// AdMob ads, this method returns @"GADMAdapterGoogleAdMobAds". For ads fetched via mediation +/// custom events, this method returns @"GADMAdapterCustomEvents". +@property(nonatomic, readonly, copy, nullable) NSString *adNetworkClassName; + +/// Registers ad view, clickable asset views, and nonclickable asset views with this native ad. +/// Media view shouldn't be registered as clickable. +/// @param clickableAssetViews Dictionary of asset views that are clickable, keyed by asset IDs. +/// @param nonclickableAssetViews Dictionary of asset views that are not clickable, keyed by asset +/// IDs. +- (void)registerAdView:(UIView *)adView + clickableAssetViews: + (NSDictionary *)clickableAssetViews + nonclickableAssetViews: + (NSDictionary *)nonclickableAssetViews; + +/// Unregisters ad view from this native ad. The corresponding asset views will also be +/// unregistered. +- (void)unregisterAdView; + +@end + +#pragma mark - Protocol and constants + +/// The delegate of a GADAdLoader object implements this protocol to receive GADUnifiedNativeAd ads. +@protocol GADUnifiedNativeAdLoaderDelegate +/// Called when a unified native ad is received. +- (void)adLoader:(GADAdLoader *)adLoader didReceiveUnifiedNativeAd:(GADUnifiedNativeAd *)nativeAd; +@end + +#pragma mark - Unified Native Ad View + +/// Base class for native ad views. Your native ad view must be a subclass of this class and must +/// call superclass methods for all overridden methods. +@interface GADUnifiedNativeAdView : UIView + +/// This property must point to the unified native ad object rendered by this ad view. +@property(nonatomic, strong, nullable) GADUnifiedNativeAd *nativeAd; + +/// Weak reference to your ad view's headline asset view. +@property(nonatomic, weak, nullable) IBOutlet UIView *headlineView; +/// Weak reference to your ad view's call to action asset view. +@property(nonatomic, weak, nullable) IBOutlet UIView *callToActionView; +/// Weak reference to your ad view's icon asset view. +@property(nonatomic, weak, nullable) IBOutlet UIView *iconView; +/// Weak reference to your ad view's body asset view. +@property(nonatomic, weak, nullable) IBOutlet UIView *bodyView; +/// Weak reference to your ad view's store asset view. +@property(nonatomic, weak, nullable) IBOutlet UIView *storeView; +/// Weak reference to your ad view's price asset view. +@property(nonatomic, weak, nullable) IBOutlet UIView *priceView; +/// Weak reference to your ad view's image asset view. +@property(nonatomic, weak, nullable) IBOutlet UIView *imageView; +/// Weak reference to your ad view's star rating asset view. +@property(nonatomic, weak, nullable) IBOutlet UIView *starRatingView; +/// Weak reference to your ad view's advertiser asset view. +@property(nonatomic, weak, nullable) IBOutlet UIView *advertiserView; +/// Weak reference to your ad view's media asset view. +@property(nonatomic, weak, nullable) IBOutlet GADMediaView *mediaView; +/// Weak reference to your ad view's AdChoices view. Must set adChoicesView before setting +/// nativeAd, otherwise AdChoices will be rendered in the publisher's preferredAdChoicesPosition as +/// defined in GADNativeAdViewAdOptions. +@property(nonatomic, weak, nullable) IBOutlet GADAdChoicesView *adChoicesView; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAdAssetIdentifiers.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAdAssetIdentifiers.h new file mode 100644 index 0000000000..cbe687d907 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAdAssetIdentifiers.h @@ -0,0 +1,28 @@ +// +// GADUnifiedNativeAdAssetIdentifiers.h +// Google Mobile Ads SDK +// +// Copyright 2017 Google Inc. All rights reserved. +// + +#import + +#import + +GAD_ASSUME_NONNULL_BEGIN + +typedef NSString *GADUnifiedNativeAssetIdentifier GAD_STRING_ENUM; + +GAD_EXTERN GADUnifiedNativeAssetIdentifier const GADUnifiedNativeHeadlineAsset; +GAD_EXTERN GADUnifiedNativeAssetIdentifier const GADUnifiedNativeCallToActionAsset; +GAD_EXTERN GADUnifiedNativeAssetIdentifier const GADUnifiedNativeIconAsset; +GAD_EXTERN GADUnifiedNativeAssetIdentifier const GADUnifiedNativeBodyAsset; +GAD_EXTERN GADUnifiedNativeAssetIdentifier const GADUnifiedNativeStoreAsset; +GAD_EXTERN GADUnifiedNativeAssetIdentifier const GADUnifiedNativePriceAsset; +GAD_EXTERN GADUnifiedNativeAssetIdentifier const GADUnifiedNativeImageAsset; +GAD_EXTERN GADUnifiedNativeAssetIdentifier const GADUnifiedNativeStarRatingAsset; +GAD_EXTERN GADUnifiedNativeAssetIdentifier const GADUnifiedNativeAdvertiserAsset; +GAD_EXTERN GADUnifiedNativeAssetIdentifier const GADUnifiedNativeMediaViewAsset; +GAD_EXTERN GADUnifiedNativeAssetIdentifier const GADUnifiedNativeAdChoicesViewAsset; + +GAD_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAdDelegate.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAdDelegate.h new file mode 100644 index 0000000000..e27294bfff --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAdDelegate.h @@ -0,0 +1,57 @@ +// +// GADUnifiedNativeAdDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2017 Google Inc. All rights reserved. +// + +#import + +#import + +@class GADUnifiedNativeAd; + +GAD_ASSUME_NONNULL_BEGIN + +/// Identifies native ad assets. +@protocol GADUnifiedNativeAdDelegate + +@optional + +#pragma mark Ad Lifecycle Events + +/// Called when an impression is recorded for an ad. Only called for Google ads and is not supported +/// for mediated ads. +- (void)nativeAdDidRecordImpression:(GADUnifiedNativeAd *)nativeAd; + +/// Called when a click is recorded for an ad. Only called for Google ads and is not supported for +/// mediated ads. +- (void)nativeAdDidRecordClick:(GADUnifiedNativeAd *)nativeAd; + +#pragma mark Click-Time Lifecycle Notifications + +/// Called before presenting the user a full screen view in response to an ad action. Use this +/// opportunity to stop animations, time sensitive interactions, etc. +/// +/// Normally the user looks at the ad, dismisses it, and control returns to your application with +/// the nativeAdDidDismissScreen: message. However, if the user hits the Home button or clicks on an +/// App Store link, your application will be backgrounded. The next method called will be the +/// applicationWillResignActive: of your UIApplicationDelegate object. Immediately after that, +/// nativeAdWillLeaveApplication: is called. +- (void)nativeAdWillPresentScreen:(GADUnifiedNativeAd *)nativeAd; + +/// Called before dismissing a full screen view. +- (void)nativeAdWillDismissScreen:(GADUnifiedNativeAd *)nativeAd; + +/// Called after dismissing a full screen view. Use this opportunity to restart anything you may +/// have stopped as part of nativeAdWillPresentScreen:. +- (void)nativeAdDidDismissScreen:(GADUnifiedNativeAd *)nativeAd; + +/// Called before the application will go to the background or terminate due to an ad action that +/// will launch another application (such as the App Store). The normal UIApplicationDelegate +/// methods, like applicationDidEnterBackground:, will be called immediately before this. +- (void)nativeAdWillLeaveApplication:(GADUnifiedNativeAd *)nativeAd; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAdUnconfirmedClickDelegate.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAdUnconfirmedClickDelegate.h new file mode 100644 index 0000000000..90a74987d3 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADUnifiedNativeAdUnconfirmedClickDelegate.h @@ -0,0 +1,34 @@ +// +// GADUnifiedNativeAdUnconfirmedClickDelegate.h +// Google Mobile Ads SDK +// +// Copyright 2017 Google Inc. All rights reserved. +// + +#import + +#import +#import + +@class GADUnifiedNativeAd; + +GAD_ASSUME_NONNULL_BEGIN + +@protocol GADUnifiedNativeAdUnconfirmedClickDelegate + +/// Tells the delegate that native ad receives an unconfirmed click on view with asset ID. You +/// should update user interface and ask user to confirm the click once this message is received. +/// Use the -registerClickConfirmingView: method in GADNUnifiedNativeAd+ConfirmationClick.h to +/// register a view that will confirm the click. Only called for Google ads and is not supported for +/// mediated ads. +- (void)nativeAd:(GADUnifiedNativeAd *)nativeAd + didReceiveUnconfirmedClickOnAssetID:(GADUnifiedNativeAssetIdentifier)assetID; + +/// Tells the delegate that the unconfirmed click is cancelled. You should revert the user interface +/// change once this message is received. Only called for Google ads and is not supported for +/// mediated ads. +- (void)nativeAdDidCancelUnconfirmedClick:(GADUnifiedNativeAd *)nativeAd; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADVideoController.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADVideoController.h similarity index 95% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADVideoController.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADVideoController.h index 53fa5b9142..fa4fc9da81 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADVideoController.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADVideoController.h @@ -17,8 +17,7 @@ GAD_ASSUME_NONNULL_BEGIN /// The video controller class provides a way to get the video metadata and also manages video /// content of the ad rendered by the Google Mobile Ads SDK. You don't need to create an instance of /// this class. When the ad rendered by the Google Mobile Ads SDK loads video content, you may be -/// able to get an instance of this class from the rendered ad object. Currently only native express -/// ad view class exposes video controller. +/// able to get an instance of this class from the rendered ad object. @interface GADVideoController : NSObject /// Delegate for receiving video notifications. diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADVideoControllerDelegate.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADVideoControllerDelegate.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADVideoControllerDelegate.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADVideoControllerDelegate.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADVideoOptions.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADVideoOptions.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADVideoOptions.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GADVideoOptions.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GoogleMobileAds.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GoogleMobileAds.h similarity index 84% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GoogleMobileAds.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GoogleMobileAds.h index c39da3c8db..4096d38e43 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GoogleMobileAds.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GoogleMobileAds.h @@ -69,6 +69,11 @@ FOUNDATION_EXPORT const unsigned char GoogleMobileAdsVersionString[]; #import #import #import +#import +#import +#import +#import +#import #import #import @@ -83,11 +88,6 @@ FOUNDATION_EXPORT const unsigned char GoogleMobileAdsVersionString[]; #import #import #import -#import -#import -#import -#import -#import #import #import @@ -99,6 +99,13 @@ FOUNDATION_EXPORT const unsigned char GoogleMobileAdsVersionString[]; #import #import +#import +#import +#import +#import +#import +#import +#import #import #import #import diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GoogleMobileAdsDefines.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GoogleMobileAdsDefines.h similarity index 93% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GoogleMobileAdsDefines.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GoogleMobileAdsDefines.h index 781f33c901..4ba6e6e0ef 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GoogleMobileAdsDefines.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/GoogleMobileAdsDefines.h @@ -14,13 +14,13 @@ #endif // defined(__cplusplus) #if defined(__has_feature) && defined(__has_attribute) -#if __has_feature(attribute_GAD_DEPRECATED_with_message) +#if __has_feature(attribute_deprecated_with_message) #define GAD_DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s))) #elif __has_attribute(deprecated) #define GAD_DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated)) #else #define GAD_DEPRECATED_MSG_ATTRIBUTE(s) -#endif // __has_feature(attribute_GAD_DEPRECATED_with_message) +#endif // __has_feature(attribute_deprecated_with_message) #if __has_attribute(deprecated) #define GAD_DEPRECATED_ATTRIBUTE __attribute__((deprecated)) #else diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMAdNetworkAdapterProtocol.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMAdNetworkAdapterProtocol.h similarity index 96% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMAdNetworkAdapterProtocol.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMAdNetworkAdapterProtocol.h index f5ee207cba..a420efcbe2 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMAdNetworkAdapterProtocol.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMAdNetworkAdapterProtocol.h @@ -51,10 +51,6 @@ /// idempotent and should not crash regardless of when or how many times the method is called. - (void)stopBeingDelegate; -/// Some ad transition types may cause issues with particular Ad SDKs. The adapter may decide -/// whether the given animation type is OK. Defaults to YES. -- (BOOL)isBannerAnimationOK:(GADMBannerAnimationType)animType; - /// Present an interstitial using the supplied UIViewController, by calling /// presentViewController:animated:completion:. /// diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMAdNetworkConnectorProtocol.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMAdNetworkConnectorProtocol.h similarity index 90% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMAdNetworkConnectorProtocol.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMAdNetworkConnectorProtocol.h index 59c3f53789..a020edf3df 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMAdNetworkConnectorProtocol.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMAdNetworkConnectorProtocol.h @@ -42,10 +42,16 @@ - (void)adapterDidReceiveInterstitial:(id)adapter; /// Tells the connector that the adapter has received a mediated native ad. |mediatedNativeAd| is -/// used by the Google Mobile Ads SDK for constructing a native ad object. +/// used by the Google Mobile Ads SDK to construct a native ad object. - (void)adapter:(id)adapter didReceiveMediatedNativeAd:(id)mediatedNativeAd; +/// Tells the connector that the adapter has received a unified mediated native ad. +/// mediatedUnifiedNativeAd is used by the Google Mobile Ads SDK to construct a unified native ad +/// object. +- (void)adapter:(id)adapter + didReceiveMediatedUnifiedNativeAd:(id)mediatedUnifiedNativeAd; + #pragma mark Ad events // Adapter should call as many of these as possible, during the lifecycle of the loaded banner or diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMEnums.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMEnums.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMEnums.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMEnums.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMRewardBasedVideoAdNetworkAdapterProtocol.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMRewardBasedVideoAdNetworkAdapterProtocol.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMRewardBasedVideoAdNetworkAdapterProtocol.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMRewardBasedVideoAdNetworkAdapterProtocol.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMRewardBasedVideoAdNetworkConnectorProtocol.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMRewardBasedVideoAdNetworkConnectorProtocol.h similarity index 92% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMRewardBasedVideoAdNetworkConnectorProtocol.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMRewardBasedVideoAdNetworkConnectorProtocol.h index 82b8d4520d..d23ec4e06d 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMRewardBasedVideoAdNetworkConnectorProtocol.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMRewardBasedVideoAdNetworkConnectorProtocol.h @@ -39,6 +39,10 @@ - (void)adapterDidStartPlayingRewardBasedVideoAd: (id)rewardBasedVideoAdAdapter; +/// Tells the delegate that a reward based video ad has completed playing. +- (void)adapterDidCompletePlayingRewardBasedVideoAd: + (id)rewardBasedVideoAdAdapter; + /// Tells the delegate that a reward based video ad has closed. - (void)adapterDidCloseRewardBasedVideoAd: (id)rewardBasedVideoAdAdapter; diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAd.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeAd.h similarity index 91% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAd.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeAd.h index 7f37ae26f8..aa070ce0cf 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAd.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeAd.h @@ -7,8 +7,8 @@ #import -#import #import +#import GAD_ASSUME_NONNULL_BEGIN diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAdDelegate.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeAdDelegate.h similarity index 58% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAdDelegate.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeAdDelegate.h index b705652e16..f5b4391de2 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAdDelegate.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeAdDelegate.h @@ -19,11 +19,13 @@ GAD_ASSUME_NONNULL_BEGIN @optional -/// Tells the delegate that the mediated native ad has rendered in |view|, a subview of -/// |viewController|. +/// Tells the delegate that the mediated native ad has rendered in |view| with clickable asset views +/// and nonclickable asset views. viewController should be used to present modal views for the ad. - (void)mediatedNativeAd:(id)mediatedNativeAd - didRenderInView:(UIView *)view - viewController:(UIViewController *)viewController; + didRenderInView:(UIView *)view + clickableAssetViews:(NSDictionary *)clickableAssetViews + nonclickableAssetViews:(NSDictionary *)nonclickableAssetViews + viewController:(UIViewController *)viewController; /// Tells the delegate that the mediated native ad has recorded an impression. This method is called /// only once per mediated native ad. @@ -39,8 +41,19 @@ GAD_ASSUME_NONNULL_BEGIN /// Tells the delegate that the mediated native ad has untracked |view|. This method is called /// when the mediatedNativeAd is no longer rendered in the provided view and the delegate should -/// stop tracking the view's impressions and clicks. -- (void)mediatedNativeAd:(id)mediatedNativeAd didUntrackView:(UIView *)view; +/// stop tracking the view's impressions and clicks. The method may also be called with a nil view +/// when the view in which the mediated native ad has rendered is deallocated. +- (void)mediatedNativeAd:(id)mediatedNativeAd + didUntrackView:(nullable UIView *)view; + +/// Tells the delegate that the mediated native ad has rendered in |view|. viewController should be +/// used to present modal views for the ad. +- (void)mediatedNativeAd:(id)mediatedNativeAd + didRenderInView:(UIView *)view + viewController:(UIViewController *)viewController GAD_DEPRECATED_MSG_ATTRIBUTE( + "Use " + "-mediatedNativeAd:didRenderInView:clickableAssetViews:" + "nonclickableAssetViews:viewController instead."); @end diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAdNotificationSource.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeAdNotificationSource.h similarity index 63% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAdNotificationSource.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeAdNotificationSource.h index 3a3cfe6f82..a2a1725a76 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAdNotificationSource.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeAdNotificationSource.h @@ -7,15 +7,13 @@ #import -#import #import +#import GAD_ASSUME_NONNULL_BEGIN -/// Notifies the Google Mobile Ads SDK about the events performed by adapters. Adapters may perform -/// some action (e.g. opening an in app browser or open the iTunes store) when handling callbacks -/// from GADMediatedNativeAdDelegate. Adapters in such case should notify the Google Mobile Ads SDK -/// by calling the relevant methods from this class. +/// Used by mediation adapters to notify the Google Mobile Ads SDK about events occurring in the +/// lifecycle of a GADMediatedNativeAd. @interface GADMediatedNativeAdNotificationSource : NSObject /// Called by the adapter when it has registered an impression on the tracked view. Adapter should @@ -26,7 +24,7 @@ GAD_ASSUME_NONNULL_BEGIN /// only call this method if -[GADMAdNetworkAdapter handlesUserClicks] returns YES. + (void)mediatedNativeAdDidRecordClick:(id)mediatedNativeAd; -/// Must be called by the adapter just before mediatedNativeAd has opened an in app modal screen. +/// Must be called by the adapter just before mediatedNativeAd has opened an in-app modal screen. + (void)mediatedNativeAdWillPresentScreen:(id)mediatedNativeAd; /// Must be called by the adapter just before the in app modal screen opened by mediatedNativeAd is @@ -37,9 +35,21 @@ GAD_ASSUME_NONNULL_BEGIN /// dismissed. + (void)mediatedNativeAdDidDismissScreen:(id)mediatedNativeAd; -/// Must be called by the adapter just before mediatedNativeAd has left the application. +/// Must be called by the adapter just before mediatedNativeAd causes another app (such as a browser +/// or the App Store) to take input focus. + (void)mediatedNativeAdWillLeaveApplication:(id)mediatedNativeAd; +#pragma mark - Mediated Native Video Ad Notifications + +/// Called by the adapter when native video playback has begun or resumed. ++ (void)mediatedNativeAdDidPlayVideo:(id)mediatedNativeAd; + +/// Called by the adapter when native video playback has paused. ++ (void)mediatedNativeAdDidPauseVideo:(id)mediatedNativeAd; + +/// Called by the adapter when native video playback has ended. ++ (void)mediatedNativeAdDidEndVideoPlayback:(id)mediatedNativeAd; + @end GAD_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAppInstallAd.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeAppInstallAd.h similarity index 83% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAppInstallAd.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeAppInstallAd.h index 9475d35d56..4e9df1ab23 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeAppInstallAd.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeAppInstallAd.h @@ -7,14 +7,14 @@ #import -#import #import #import +#import GAD_ASSUME_NONNULL_BEGIN /// Provides methods used for constructing native app install ads. The adapter must return an object -/// conforming to this protocol for native app install ad requests. +/// conforming to this protocol for native app install requests. @protocol GADMediatedNativeAppInstallAd /// App title. @@ -46,6 +46,12 @@ GAD_ASSUME_NONNULL_BEGIN /// AdChoices view. - (UIView *GAD_NULLABLE_TYPE)adChoicesView; +/// Media view. +- (UIView *GAD_NULLABLE_TYPE)mediaView; + +/// Returns YES if the ad has video content. +- (BOOL)hasVideoContent; + @end GAD_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeContentAd.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeContentAd.h similarity index 84% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeContentAd.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeContentAd.h index 068da58450..bd15dbdbe0 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADMediatedNativeContentAd.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMediatedNativeContentAd.h @@ -7,9 +7,9 @@ #import -#import #import #import +#import GAD_ASSUME_NONNULL_BEGIN @@ -39,6 +39,12 @@ GAD_ASSUME_NONNULL_BEGIN /// AdChoices view. - (UIView *GAD_NULLABLE_TYPE)adChoicesView; +/// Media view. +- (UIView *GAD_NULLABLE_TYPE)mediaView; + +/// Returns YES if the ad has video content. +- (BOOL)hasVideoContent; + @end GAD_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMediatedUnifiedNativeAd.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMediatedUnifiedNativeAd.h new file mode 100644 index 0000000000..aa8645d10b --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMediatedUnifiedNativeAd.h @@ -0,0 +1,90 @@ +// +// GADMediatedUnifiedNativeAd.h +// Google Mobile Ads SDK +// +// Copyright 2017 Google Inc. All rights reserved. +// + +#import + +#import +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Provides methods used for constructing native ads. The adapter must return an object conforming +/// to this protocol for native ad requests. +@protocol GADMediatedUnifiedNativeAd + +/// Headline. +@property(nonatomic, readonly, copy, nullable) NSString *headline; + +/// Array of GADNativeAdImage objects. +@property(nonatomic, readonly, nullable) NSArray *images; + +/// Description. +@property(nonatomic, readonly, copy, nullable) NSString *body; + +/// Icon image. +@property(nonatomic, readonly, nullable) GADNativeAdImage *icon; + +/// Text that encourages user to take some action with the ad. For example "Install". +@property(nonatomic, readonly, copy, nullable) NSString *callToAction; + +/// App store rating (0 to 5). +@property(nonatomic, readonly, copy, nullable) NSDecimalNumber *starRating; + +/// The app store name. For example, "App Store". +@property(nonatomic, readonly, copy, nullable) NSString *store; + +/// String representation of the app's price. +@property(nonatomic, readonly, copy, nullable) NSString *price; + +/// Identifies the advertiser. For example, the advertiser’s name or visible URL. +@property(nonatomic, readonly, copy, nullable) NSString *advertiser; + +/// Returns a dictionary of asset names and object pairs for assets that are not handled by +/// properties of the GADMediatedUnifiedNativeAd. +@property(nonatomic, readonly, copy, nullable) NSDictionary *extraAssets; + +@optional + +/// AdChoices view. +@property(nonatomic, readonly, nullable) UIView *adChoicesView; + +/// Media view. +@property(nonatomic, readonly, nullable) UIView *mediaView; + +/// Indicates whether the ad has video content. +@property(nonatomic, assign, readonly) BOOL hasVideoContent; + +/// Tells the receiver that it has been rendered in |view| with clickable asset views and +/// nonclickable asset views. viewController should be used to present modal views for the ad. +- (void)didRenderInView:(UIView *)view + clickableAssetViews: + (NSDictionary *)clickableAssetViews + nonclickableAssetViews: + (NSDictionary *)nonclickableAssetViews + viewController:(UIViewController *)viewController; + +/// Tells the receiver that an impression is recorded. This method is called only once per mediated +/// native ad. +- (void)didRecordImpression; + +/// Tells the receiver that a user click is recorded on the asset named |assetName|. Full screen +/// actions should be presented from viewController. This method is called only if +/// -[GADMAdNetworkAdapter handlesUserClicks] returns NO. +- (void)didRecordClickOnAssetWithName:(GADUnifiedNativeAssetIdentifier)assetName + view:(UIView *)view + viewController:(UIViewController *)viewController; + +/// Tells the receiver that it has untracked |view|. This method is called when the mediatedNativeAd +/// is no longer rendered in the provided view and the delegate should stop tracking the view's +/// impressions and clicks. The method may also be called with a nil view when the view in which the +/// mediated native ad has rendered is deallocated. +- (void)didUntrackView:(nullable UIView *)view; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMediatedUnifiedNativeAdNotificationSource.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMediatedUnifiedNativeAdNotificationSource.h new file mode 100644 index 0000000000..d21d956822 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMediatedUnifiedNativeAdNotificationSource.h @@ -0,0 +1,55 @@ +// +// GADMediatedUnifiedNativeAdNotificationSource.h +// Google Mobile Ads SDK +// +// Copyright 2017 Google Inc. All rights reserved. +// + +#import + +#import +#import + +GAD_ASSUME_NONNULL_BEGIN + +/// Used by mediation adapters to notify the Google Mobile Ads SDK about events occurring in the +/// lifecycle of a GADMediatedUnifiedNativeAd. +@interface GADMediatedUnifiedNativeAdNotificationSource : NSObject + +/// Called by the adapter when it has registered an impression on the tracked view. Adapter should +/// only call this method if -[GADMAdNetworkAdapter handlesUserImpressions] returns YES. ++ (void)mediatedNativeAdDidRecordImpression:(id)mediatedNativeAd; + +/// Called by the adapter when it has registered a user click on the tracked view. Adapter should +/// only call this method if -[GADMAdNetworkAdapter handlesUserClicks] returns YES. ++ (void)mediatedNativeAdDidRecordClick:(id)mediatedNativeAd; + +/// Must be called by the adapter just before mediatedNativeAd has opened an in-app modal screen. ++ (void)mediatedNativeAdWillPresentScreen:(id)mediatedNativeAd; + +/// Must be called by the adapter just before the in app modal screen opened by mediatedNativeAd is +/// dismissed. ++ (void)mediatedNativeAdWillDismissScreen:(id)mediatedNativeAd; + +/// Must be called by the adapter after the in app modal screen opened by mediatedNativeAd is +/// dismissed. ++ (void)mediatedNativeAdDidDismissScreen:(id)mediatedNativeAd; + +/// Must be called by the adapter just before mediatedNativeAd causes another app (such as a browser +/// or the App Store) to take input focus. ++ (void)mediatedNativeAdWillLeaveApplication:(id)mediatedNativeAd; + +#pragma mark - Mediated Native Video Ad Notifications + +/// Called by the adapter when native video playback has begun or resumed. ++ (void)mediatedNativeAdDidPlayVideo:(id)mediatedNativeAd; + +/// Called by the adapter when native video playback has paused. ++ (void)mediatedNativeAdDidPauseVideo:(id)mediatedNativeAd; + +/// Called by the adapter when native video playback has ended. ++ (void)mediatedNativeAdDidEndVideoPlayback:(id)mediatedNativeAd; + +@end + +GAD_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMediationAdRequest.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdRequest.h similarity index 81% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMediationAdRequest.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdRequest.h index 104ea5a2b3..d8e0ad4861 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/Mediation/GADMediationAdRequest.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Headers/Mediation/GADMediationAdRequest.h @@ -28,13 +28,6 @@ /// enabled. - (NSNumber *)childDirectedTreatment; -/// The end user's gender set by the publisher in GADRequest. Returns kGADGenderUnknown if it has -/// not been specified. -- (GADGender)userGender; - -/// The end user's birthday set by the publisher. Returns nil if it has not been specified. -- (NSDate *)userBirthday; - /// Returns YES if the publisher has specified latitude and longitude location. - (BOOL)userHasLocation; @@ -53,4 +46,14 @@ /// Keywords describing the user's current activity. Example: @"Sport Scores". - (NSArray *)userKeywords; +#pragma mark Deprecated + +/// Deprecated. The end user's gender set by the publisher in GADRequest. Returns kGADGenderUnknown +/// if it has not been specified. +- (GADGender)userGender GAD_DEPRECATED_ATTRIBUTE; + +/// Deprecated. The end user's birthday set by the publisher. Returns nil if it has not been +/// specified. +- (NSDate *)userBirthday GAD_DEPRECATED_ATTRIBUTE; + @end diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Modules/module.modulemap b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Modules/module.modulemap index 13ecc51119..dfee2822e0 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Modules/module.modulemap +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Modules/module.modulemap @@ -7,6 +7,7 @@ framework module GoogleMobileAds { link framework "AdSupport" link framework "AudioToolbox" link framework "AVFoundation" + link framework "CFNetwork" link framework "CoreGraphics" link framework "CoreMedia" link framework "CoreMotion" @@ -19,6 +20,7 @@ framework module GoogleMobileAds { link framework "MessageUI" link framework "MobileCoreServices" link framework "OpenGLES" + link framework "QuartzCore" link framework "SafariServices" link framework "Security" link framework "StoreKit" @@ -76,6 +78,11 @@ framework module GoogleMobileAds { header "GADNativeContentAd.h" header "GADNativeContentAdAssetIDs.h" header "GADNativeCustomTemplateAd.h" + header "GADUnifiedNativeAd.h" + header "GADUnifiedNativeAd+ConfirmationClick.h" + header "GADUnifiedNativeAdAssetIdentifiers.h" + header "GADUnifiedNativeAdDelegate.h" + header "GADUnifiedNativeAdUnconfirmedClickDelegate.h" header "GADMultipleAdsAdLoaderOptions.h" header "GADNativeAdImageAdLoaderOptions.h" @@ -90,11 +97,6 @@ framework module GoogleMobileAds { header "GADCustomEventNativeAdDelegate.h" header "GADCustomEventParameters.h" header "GADCustomEventRequest.h" - header "GADMediatedNativeAd.h" - header "GADMediatedNativeAdDelegate.h" - header "GADMediatedNativeAdNotificationSource.h" - header "GADMediatedNativeAppInstallAd.h" - header "GADMediatedNativeContentAd.h" header "GADDynamicHeightSearchRequest.h" header "GADSearchBannerView.h" @@ -106,6 +108,13 @@ framework module GoogleMobileAds { header "Mediation/GADMAdNetworkAdapterProtocol.h" header "Mediation/GADMAdNetworkConnectorProtocol.h" + header "Mediation/GADMediatedNativeAd.h" + header "Mediation/GADMediatedNativeAdDelegate.h" + header "Mediation/GADMediatedNativeAdNotificationSource.h" + header "Mediation/GADMediatedNativeAppInstallAd.h" + header "Mediation/GADMediatedNativeContentAd.h" + header "Mediation/GADMediatedUnifiedNativeAd.h" + header "Mediation/GADMediatedUnifiedNativeAdNotificationSource.h" header "Mediation/GADMediationAdRequest.h" header "Mediation/GADMEnums.h" header "Mediation/GADMRewardBasedVideoAdNetworkAdapterProtocol.h" diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/GoogleMobileAds b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/GoogleMobileAds deleted file mode 100644 index 25d000e518..0000000000 Binary files a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/GoogleMobileAds and /dev/null differ diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAppInstallAdAssetIDs.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAppInstallAdAssetIDs.h deleted file mode 100644 index 7eef42b13d..0000000000 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeAppInstallAdAssetIDs.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// GADNativeAppInstallAdAssetIDs.h -// Google Mobile Ads SDK -// -// Copyright 2017 Google Inc. All rights reserved. -// - -#import - -#import - -GAD_ASSUME_NONNULL_BEGIN - -GAD_EXTERN NSString *const GADNativeAppInstallHeadlineAsset; -GAD_EXTERN NSString *const GADNativeAppInstallCallToActionAsset; -GAD_EXTERN NSString *const GADNativeAppInstallIconAsset; -GAD_EXTERN NSString *const GADNativeAppInstallBodyAsset; -GAD_EXTERN NSString *const GADNativeAppInstallStoreAsset; -GAD_EXTERN NSString *const GADNativeAppInstallPriceAsset; -GAD_EXTERN NSString *const GADNativeAppInstallImageAsset; -GAD_EXTERN NSString *const GADNativeAppInstallStarRatingAsset; -GAD_EXTERN NSString *const GADNativeAppInstallAttributionIconAsset; -GAD_EXTERN NSString *const GADNativeAppInstallAttributionTextAsset; -GAD_EXTERN NSString *const GADNativeAppInstallMediaViewAsset; -GAD_EXTERN NSString *const GADNativeAppInstallAdChoicesViewAsset; -GAD_EXTERN NSString *const GADNativeAppInstallBackgroundAsset; - -GAD_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeContentAdAssetIDs.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeContentAdAssetIDs.h deleted file mode 100644 index 6986726077..0000000000 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/A/Headers/GADNativeContentAdAssetIDs.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// GADNativeContentAdAssetIDs.h -// Google Mobile Ads SDK -// -// Copyright 2017 Google Inc. All rights reserved. -// - -#import - -#import - -GAD_ASSUME_NONNULL_BEGIN - -GAD_EXTERN NSString *const GADNativeContentHeadlineAsset; -GAD_EXTERN NSString *const GADNativeContentBodyAsset; -GAD_EXTERN NSString *const GADNativeContentCallToActionAsset; -GAD_EXTERN NSString *const GADNativeContentAdvertiserAsset; -GAD_EXTERN NSString *const GADNativeContentImageAsset; -GAD_EXTERN NSString *const GADNativeContentLogoAsset; -GAD_EXTERN NSString *const GADNativeContentAttributionIconAsset; -GAD_EXTERN NSString *const GADNativeContentAttributionTextAsset; -GAD_EXTERN NSString *const GADNativeContentMediaViewAsset; -GAD_EXTERN NSString *const GADNativeContentAdChoicesViewAsset; -GAD_EXTERN NSString *const GADNativeContentBackgroundAsset; - -GAD_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/Current b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/Current deleted file mode 120000 index 8c7e5a667f..0000000000 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework/Versions/Current +++ /dev/null @@ -1 +0,0 @@ -A \ No newline at end of file diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBInstreamAdRendererView.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBInstreamAdRendererView.h deleted file mode 100644 index ef63b3917c..0000000000 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBInstreamAdRendererView.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2004-present Facebook. All Rights Reserved. -// -// You are hereby granted a non-exclusive, worldwide, royalty-free license to use, -// copy, modify, and distribute this software in source code or binary form for use -// in connection with the web services and APIs provided by Facebook. -// -// As with any software that integrates with the Facebook platform, your use of -// this software is subject to the Facebook Developer Principles and Policies -// [http://developers.facebook.com/policy/]. This copyright notice shall be -// included in all copies or substantial portions of the software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -#import - -NS_ASSUME_NONNULL_BEGIN - -@protocol FBInstreamAdRendererViewDelegate; - -@interface FBInstreamAdRendererView : UIView - -@property (nonatomic, getter=isAdValid, readonly) BOOL adValid; -@property (nonatomic, weak, nullable) id delegate; - -- (void)loadAdFromAdParameters:(nonnull NSString *)adParameters; - -- (BOOL)showAdFromRootViewController:(nullable UIViewController *)rootViewController; - - -@end - -@protocol FBInstreamAdRendererViewDelegate - -@optional - -- (void)adRendererViewDidClick:(nonnull FBInstreamAdRendererView *)adRendererView; - -- (void)adRendererViewDidEnd:(nonnull FBInstreamAdRendererView *)adRendererView; - -- (void)adRendererViewDidFinishHandlingClick:(nonnull FBInstreamAdRendererView *)adRendererView; - -- (void)adRendererViewDidLoad:(nonnull FBInstreamAdRendererView *)adRendererView; - -- (void)adRendererView:(nonnull FBInstreamAdRendererView *)adRendererView didFailWithError:(nonnull NSError *)error; - -- (void)adRendererViewWillLogImpression:(nonnull FBInstreamAdRendererView *)adRendererView; - -@end - -NS_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Modules/FBAudienceNetwork.modulemap b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Modules/FBAudienceNetwork.modulemap deleted file mode 100644 index 72796302db..0000000000 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Modules/FBAudienceNetwork.modulemap +++ /dev/null @@ -1,45 +0,0 @@ -framework module FBAudienceNetwork { - umbrella header "FBAudienceNetwork.h" - - export * - module * { - export * - } - - requires objc, blocks - - link framework "AdSupport" - link framework "AudioToolbox" - link framework "AVFoundation" - link framework "CoreGraphics" - link framework "CoreImage" - link framework "CoreMedia" - link framework "CoreMotion" - link framework "Foundation" - link framework "SafariServices" - link framework "Security" - link framework "StoreKit" - link framework "UIKit" - link framework "WebKit" - link framework "VideoToolbox" - - link "c++" - link "xml2" - - header "FBAdChoicesView.h" - header "FBAdDefines.h" - header "FBAdSettings.h" - header "FBAdView.h" - header "FBInstreamAdView.h" - header "FBInterstitialAd.h" - header "FBMediaView.h" - header "FBNativeAd.h" - header "FBNativeAdScrollView.h" - header "FBNativeAdTableViewAdProvider.h" - header "FBNativeAdTableViewCellProvider.h" - header "FBNativeAdCollectionViewAdProvider.h" - header "FBNativeAdCollectionViewCellProvider.h" - header "FBNativeAdView.h" - header "FBNativeAdsManager.h" - header "FBRewardedVideoAd.h" -} diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/CHANGELOG.md b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/CHANGELOG.md new file mode 100755 index 0000000000..ec0f7769da --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/CHANGELOG.md @@ -0,0 +1,26 @@ +## Changelog + +* 4.28.1.2 + * This version of the adapters has been certified with Facebook Audience Network 4.28.1. + * Enables advanced bidding for all adapters and adds FacebookAdvancedBidder. + +* 4.28.1.1 + * This version of the adapters has been certified with Facebook Audience Network 4.28.1. + * Rename delegate method rewardedVideoAdComplete to rewardedVideoAdVideoComplete per Facebook Audience Network change. +* 4.28.1.0 + * This version of the adapters has been certified with Facebook Audience Network 4.28.1. + + * 4.28.0.1 + * This version of the adapters has been certified with Facebook Audience Network 4.28.0. + * Removed star rating from the native ad adapter since it has been deprecated by Facebook. + + * 4.28.0.0 + * This version of the adapters has been certified with Facebook Audience Network 4.28.0. + * Updated native adapters to handle the use-case of empty clickable views + * Updated Rewarded Video header files to be consistent with the rest of the header files + + * 4.27.0.1 + * This version of the adapters has been certified with Facebook Audience Network 4.27.0. + + * Initial Commit + * Adapters moved from [mopub-iOS-sdk](https://github.com/mopub/mopub-ios-sdk) to [mopub-iOS-mediation](https://github.com/mopub/mopub-iOS-mediation/) diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookAdvancedBidder.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookAdvancedBidder.h new file mode 100755 index 0000000000..1b06ea4eea --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookAdvancedBidder.h @@ -0,0 +1,19 @@ +// +// FacebookAdvancedBidder.h +// MoPubSDK +// +// Copyright © 2017 MoPub. All rights reserved. +// + +#import +#if __has_include() +#import +#else +#import "MPAdvancedBidder.h" +#endif + + +@interface FacebookAdvancedBidder : NSObject +@property (nonatomic, copy, readonly) NSString * creativeNetworkName; +@property (nonatomic, copy, readonly) NSString * token; +@end diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookAdvancedBidder.m b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookAdvancedBidder.m new file mode 100755 index 0000000000..62b019d562 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookAdvancedBidder.m @@ -0,0 +1,31 @@ +// +// FacebookAdvancedBidder.m +// MoPubSDK +// +// Copyright © 2017 MoPub. All rights reserved. +// + +#import "FacebookAdvancedBidder.h" +#import + +@implementation FacebookAdvancedBidder + ++ (void)initialize { + if (self == [FacebookAdvancedBidder self]) { + // Initialize an adview to trigger [FBAdUtility initializeAudienceNetwork] + FBAdView * initHackforFacebook = [[FBAdView alloc] initWithPlacementID:@"" adSize:kFBAdSize320x50 rootViewController:[UIViewController new]]; + if (initHackforFacebook) { + NSLog(@"Initialized Facebook Audience Network"); + } + } +} + +- (NSString *)creativeNetworkName { + return @"facebook"; +} + +- (NSString *)token { + return [FBAdSettings bidderToken]; +} + +@end diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/FacebookBannerCustomEvent.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookBannerCustomEvent.h similarity index 67% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/FacebookBannerCustomEvent.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookBannerCustomEvent.h index 6955c1a6f1..38a3208eae 100755 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/FacebookBannerCustomEvent.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookBannerCustomEvent.h @@ -12,8 +12,7 @@ #endif /* - * Please reference the Supported Mediation Partner page at http://bit.ly/2mqsuFH for the - * latest version and ad format certifications. + * Certified with Facebook Audience Network 4.26.1 */ @interface FacebookBannerCustomEvent : MPBannerCustomEvent diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/FacebookBannerCustomEvent.m b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookBannerCustomEvent.m similarity index 83% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/FacebookBannerCustomEvent.m rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookBannerCustomEvent.m index 06830d861d..6e08c85680 100755 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/FacebookBannerCustomEvent.m +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookBannerCustomEvent.m @@ -50,15 +50,18 @@ } - (void)requestAdWithSize:(CGSize)size customEventInfo:(NSDictionary *)info +{ + [self requestAdWithSize:size customEventInfo:info adMarkup:nil]; +} + +- (void)requestAdWithSize:(CGSize)size customEventInfo:(NSDictionary *)info adMarkup:(NSString *)adMarkup { /** * Facebook Banner ads can accept arbitrary widths for given heights of 50 and 90. We convert these sizes * to Facebook's constants and set the fbAdView's size to the intended size ("size" passed to this method). */ FBAdSize fbAdSize; - if (CGSizeEqualToSize(size, kFBAdSize320x50.size)) { - fbAdSize = kFBAdSize320x50; - } else if (size.height == kFBAdSizeHeight250Rectangle.size.height) { + if (size.height == kFBAdSizeHeight250Rectangle.size.height) { fbAdSize = kFBAdSizeHeight250Rectangle; } else if (size.height == kFBAdSizeHeight90Banner.size.height) { fbAdSize = kFBAdSizeHeight90Banner; @@ -96,8 +99,18 @@ CGRect fbAdFrame = self.fbAdView.frame; fbAdFrame.size = size; self.fbAdView.frame = fbAdFrame; - - [self.fbAdView loadAd]; + [FBAdSettings setMediationService:[NSString stringWithFormat:@"MOPUB_%@", MP_SDK_VERSION]]; + + // Load the advanced bid payload. + if (adMarkup != nil) { + MPLogInfo(@"Loading Facebook banner ad markup"); + [self.fbAdView loadAdWithBidPayload:adMarkup]; + } + // Request a banner ad. + else { + MPLogInfo(@"Requesting Facebook banner ad"); + [self.fbAdView loadAd]; + } } - (void)dealloc @@ -107,19 +120,24 @@ #pragma mark FBAdViewDelegate methods -- (void)adView:(FBAdView *)adView didFailWithError:(NSError *)error; +- (void)adView:(FBAdView *)adView didFailWithError:(NSError *)error { - MPLogInfo(@"Facebook banner failed to load with error: %@", error.description); + MPLogInfo(@"Facebook banner failed to load with error: %@", error.localizedDescription); [self.delegate bannerCustomEvent:self didFailToLoadAdWithError:error]; } -- (void)adViewDidLoad:(FBAdView *)adView; +- (void)adViewDidLoad:(FBAdView *)adView { MPLogInfo(@"Facebook banner ad did load"); - [self.delegate trackImpression]; [self.delegate bannerCustomEvent:self didLoadAd:adView]; } +- (void)adViewWillLogImpression:(FBAdView *)adView +{ + MPLogInfo(@"Facebook banner ad did log impression"); + [self.delegate trackImpression]; +} + - (void)adViewDidClick:(FBAdView *)adView { MPLogInfo(@"Facebook banner ad was clicked"); diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/FacebookInterstitialCustomEvent.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookInterstitialCustomEvent.h similarity index 53% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/FacebookInterstitialCustomEvent.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookInterstitialCustomEvent.h index 59c960c21e..e265ec0c04 100755 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/FacebookInterstitialCustomEvent.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookInterstitialCustomEvent.h @@ -6,14 +6,14 @@ // #if __has_include() - #import +#import #else - #import "MPInterstitialCustomEvent.h" +#import "MPInterstitialCustomEvent.h" + #endif /* - * Please reference the Supported Mediation Partner page at http://bit.ly/2mqsuFH for the - * latest version and ad format certifications. + * Certified with Facebook Audience Network 4.26 */ @interface FacebookInterstitialCustomEvent : MPInterstitialCustomEvent diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/FacebookInterstitialCustomEvent.m b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookInterstitialCustomEvent.m similarity index 62% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/FacebookInterstitialCustomEvent.m rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookInterstitialCustomEvent.m index 2a624ff52a..63f519e1a2 100755 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/FacebookInterstitialCustomEvent.m +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookInterstitialCustomEvent.m @@ -10,6 +10,11 @@ #import "MPInstanceProvider.h" #import "MPLogging.h" +#import "MPRealTimeTimer.h" + +//Timer to record the expiration interval +#define FB_ADS_EXPIRATION_INTERVAL 3600 + @interface MPInstanceProvider (FacebookInterstitials) @@ -33,12 +38,21 @@ @interface FacebookInterstitialCustomEvent () @property (nonatomic, strong) FBInterstitialAd *fbInterstitialAd; +@property (nonatomic, strong) MPRealTimeTimer *expirationTimer; +@property (nonatomic, assign) BOOL hasTrackedImpression; @end @implementation FacebookInterstitialCustomEvent +@synthesize hasTrackedImpression = _hasTrackedImpression; + - (void)requestInterstitialWithCustomEventInfo:(NSDictionary *)info +{ + [self requestInterstitialWithCustomEventInfo:info adMarkup:nil]; +} + +- (void)requestInterstitialWithCustomEventInfo:(NSDictionary *)info adMarkup:(NSString *)adMarkup { if (![info objectForKey:@"placement_id"]) { MPLogError(@"Placement ID is required for Facebook interstitial ad"); @@ -46,13 +60,21 @@ return; } - MPLogInfo(@"Requesting Facebook interstitial ad"); - self.fbInterstitialAd = [[MPInstanceProvider sharedProvider] buildFBInterstitialAdWithPlacementID:[info objectForKey:@"placement_id"] delegate:self]; - - [self.fbInterstitialAd loadAd]; + [FBAdSettings setMediationService:[NSString stringWithFormat:@"MOPUB_%@", MP_SDK_VERSION]]; + + // Load the advanced bid payload. + if (adMarkup != nil) { + MPLogInfo(@"Loading Facebook interstitial ad markup"); + [self.fbInterstitialAd loadAdWithBidPayload:adMarkup]; + } + // Request a interstitial ad. + else { + MPLogInfo(@"Requesting Facebook interstitial ad"); + [self.fbInterstitialAd loadAd]; + } } - (void)showInterstitialFromRootViewController:(UIViewController *)controller { @@ -79,11 +101,35 @@ { MPLogInfo(@"Facebook intersitital ad was loaded. Can present now"); [self.delegate interstitialCustomEvent:self didLoadAd:interstitialAd]; + + // introduce timer for 1 hour as per caching logic introduced by FB + + __weak __typeof__(self) weakSelf = self; + self.expirationTimer = [[MPRealTimeTimer alloc] initWithInterval:FB_ADS_EXPIRATION_INTERVAL block:^(MPRealTimeTimer *timer){ + __strong __typeof__(weakSelf) strongSelf = weakSelf; + if (strongSelf && !strongSelf.hasTrackedImpression) { + [self.delegate interstitialCustomEventDidExpire:self]; + MPLogInfo(@"Facebook intersitital ad expired as per the audience network's caching policy"); + //Delete the cached objects + self.fbInterstitialAd = nil; + } + [strongSelf.expirationTimer invalidate]; + }]; + [self.expirationTimer scheduleNow]; + +} + +- (void)interstitialAdWillLogImpression:(FBInterstitialAd *)interstitialAd +{ + MPLogInfo(@"Facebook intersitital ad is logging impressions for interstitials"); + //set the tracker to true when the ad is shown on the screen. So that the timer is invalidated. + _hasTrackedImpression = true; + [self.expirationTimer invalidate]; } - (void)interstitialAd:(FBInterstitialAd *)interstitialAd didFailWithError:(NSError *)error { - MPLogInfo(@"Facebook intersitital ad failed to load with error: %@", error.description); + MPLogInfo(@"Facebook intersitital ad failed to load with error: %@", error.localizedDescription); [self.delegate interstitialCustomEvent:self didFailToLoadAdWithError:nil]; } diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/FacebookNativeAdAdapter.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookNativeAdAdapter.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/FacebookNativeAdAdapter.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookNativeAdAdapter.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/FacebookNativeAdAdapter.m b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookNativeAdAdapter.m similarity index 89% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/FacebookNativeAdAdapter.m rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookNativeAdAdapter.m index fa2dc3cafa..269837f8b6 100755 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/FacebookNativeAdAdapter.m +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookNativeAdAdapter.m @@ -31,15 +31,6 @@ NSString *const kFBVideoAdsEnabledKey = @"video_enabled"; _fbNativeAd = fbNativeAd; _fbNativeAd.delegate = self; - NSNumber *starRating = nil; - - // Normalize star rating to 5 stars. - if (fbNativeAd.starRating.scale != 0) { - CGFloat ratio = 0.0f; - ratio = kUniversalStarRatingScale/fbNativeAd.starRating.scale; - starRating = [NSNumber numberWithFloat:ratio*fbNativeAd.starRating.value]; - } - NSMutableDictionary *properties; if (adProps) { properties = [NSMutableDictionary dictionaryWithDictionary:adProps]; @@ -47,11 +38,6 @@ NSString *const kFBVideoAdsEnabledKey = @"video_enabled"; properties = [NSMutableDictionary dictionary]; } - - if (starRating) { - [properties setObject:starRating forKey:kAdStarRatingKey]; - } - if (fbNativeAd.title) { [properties setObject:fbNativeAd.title forKey:kAdTitleKey]; } @@ -112,6 +98,15 @@ NSString *const kFBVideoAdsEnabledKey = @"video_enabled"; [self.fbNativeAd registerViewForInteraction:view withViewController:[self.delegate viewControllerForPresentingModalView]]; } +- (void)willAttachToView:(UIView *)view withAdContentViews:(NSArray *)adContentViews +{ + if ( adContentViews.count > 0 ) { + [self.fbNativeAd registerViewForInteraction:view withViewController:[self.delegate viewControllerForPresentingModalView] withClickableViews:adContentViews]; + } else { + [self willAttachToView:view]; + } +} + - (UIView *)privacyInformationIconView { return self.adChoicesView; diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/FacebookNativeCustomEvent.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookNativeCustomEvent.h similarity index 82% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/FacebookNativeCustomEvent.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookNativeCustomEvent.h index de3ad52763..a887c14b1f 100755 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/FacebookNativeCustomEvent.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookNativeCustomEvent.h @@ -12,8 +12,7 @@ #endif /* - * Please reference the Supported Mediation Partner page at http://bit.ly/2mqsuFH for the - * latest version and ad format certifications. + * Certified with Facebook Audience Network 4.26.1 */ @interface FacebookNativeCustomEvent : MPNativeCustomEvent diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/FacebookNativeCustomEvent.m b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookNativeCustomEvent.m similarity index 81% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/FacebookNativeCustomEvent.m rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookNativeCustomEvent.m index f21a8d80b2..e8b56e741a 100755 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/FacebookNativeCustomEvent.m +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookNativeCustomEvent.m @@ -4,7 +4,6 @@ // // Copyright (c) 2014 MoPub. All rights reserved. // - #import #import "FacebookNativeCustomEvent.h" #import "FacebookNativeAdAdapter.h" @@ -31,6 +30,11 @@ static BOOL gVideoEnabled = NO; } - (void)requestAdWithCustomEventInfo:(NSDictionary *)info +{ + [self requestAdWithCustomEventInfo:info adMarkup:nil]; +} + +- (void)requestAdWithCustomEventInfo:(NSDictionary *)info adMarkup:(NSString *)adMarkup { NSString *placementID = [info objectForKey:@"placement_id"]; @@ -43,7 +47,18 @@ static BOOL gVideoEnabled = NO; if (placementID) { _fbNativeAd = [[FBNativeAd alloc] initWithPlacementID:placementID]; self.fbNativeAd.delegate = self; - [self.fbNativeAd loadAd]; + [FBAdSettings setMediationService:[NSString stringWithFormat:@"MOPUB_%@", MP_SDK_VERSION]]; + + // Load the advanced bid payload. + if (adMarkup != nil) { + MPLogInfo(@"Loading Facebook native ad markup"); + [self.fbNativeAd loadAdWithBidPayload:adMarkup]; + } + // Request a banner ad. + else { + MPLogInfo(@"Requesting Facebook native ad"); + [self.fbNativeAd loadAd]; + } } else { [self.delegate nativeCustomEvent:self didFailToLoadAdWithError:MPNativeAdNSErrorForInvalidAdServerResponse(@"Invalid Facebook placement ID")]; } diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookRewardedVideoCustomEvent.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookRewardedVideoCustomEvent.h new file mode 100755 index 0000000000..88a04366f6 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookRewardedVideoCustomEvent.h @@ -0,0 +1,18 @@ +// +// FacebookRewardedVideoCustomEvent.h +// +// Copyright © 2017 MoPub. All rights reserved. +// + +#if __has_include() +#import +#else +#import "MPRewardedVideoCustomEvent.h" +#endif + +/* + * Certified with Facebook Audience Network 4.26.1 + */ +@interface FacebookRewardedVideoCustomEvent : MPRewardedVideoCustomEvent + +@end diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookRewardedVideoCustomEvent.m b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookRewardedVideoCustomEvent.m new file mode 100755 index 0000000000..01570c874c --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/FacebookRewardedVideoCustomEvent.m @@ -0,0 +1,231 @@ +// +// FacebookRewardedVideoCustomEvent.m +// +// Created by Mopub on 4/12/17. +// +#import +#import "FacebookRewardedVideoCustomEvent.h" + +#import "MPInstanceProvider.h" +#import "MPLogging.h" +#import "MoPub.h" +#import "MPRewardedVideoReward.h" +#import "MPRealTimeTimer.h" + +//Timer to record the expiration interval +#define FB_ADS_EXPIRATION_INTERVAL 3600 + +@interface MPInstanceProvider (FacebookRewardedVideos) + +- (FBRewardedVideoAd *)buildFBRewardedVideoAdWithPlacementID:(NSString *)placementID + delegate:(id)delegate; + +@end + +@implementation MPInstanceProvider (FacebookRewardedVideos) + +- (FBRewardedVideoAd *)buildFBRewardedVideoAdWithPlacementID:(NSString *)placementID + delegate:(id)delegate +{ + FBRewardedVideoAd *rewardedVideoAd = [[FBRewardedVideoAd alloc] initWithPlacementID:placementID]; + rewardedVideoAd.delegate = delegate; + return rewardedVideoAd; +} + +@end + + +@interface FacebookRewardedVideoCustomEvent () + +@property (nonatomic, strong) FBRewardedVideoAd *fbRewardedVideoAd; +@property (nonatomic, strong) MPRealTimeTimer *expirationTimer; +@property (nonatomic, assign) BOOL hasTrackedImpression; + +@end + +@implementation FacebookRewardedVideoCustomEvent + +@synthesize hasTrackedImpression = _hasTrackedImpression; + +- (void)initializeSdkWithParameters:(NSDictionary *)parameters { + // No SDK initialization method provided. +} + +- (void)requestRewardedVideoWithCustomEventInfo:(NSDictionary *)info { + [self requestRewardedVideoWithCustomEventInfo:info adMarkup:nil]; +} + +- (void)requestRewardedVideoWithCustomEventInfo:(NSDictionary *)info adMarkup:(NSString *)adMarkup { + if (![info objectForKey:@"placement_id"]) { + MPLogError(@"Placement ID is required for Facebook Rewarded Video ad"); + [self.delegate rewardedVideoDidFailToLoadAdForCustomEvent:self error:nil]; + return; + } + + self.fbRewardedVideoAd = + [[MPInstanceProvider sharedProvider] buildFBRewardedVideoAdWithPlacementID: [info objectForKey:@"placement_id"] delegate:self]; + + [FBAdSettings setMediationService:[NSString stringWithFormat:@"MOPUB_%@", MP_SDK_VERSION]]; + // Load the advanced bid payload. + if (adMarkup != nil) { + MPLogInfo(@"Loading Facebook rewarded video ad markup"); + [self.fbRewardedVideoAd loadAdWithBidPayload:adMarkup]; + } + // Request a rewarded video ad. + else { + MPLogInfo(@"Requesting Facebook rewarded video ad"); + [self.fbRewardedVideoAd loadAd]; + } +} + +//Verify that the rewarded video is precached +- (BOOL)hasAdAvailable +{ + return (self.fbRewardedVideoAd != nil && self.fbRewardedVideoAd.isAdValid); +} + +- (void)presentRewardedVideoFromViewController:(UIViewController *)viewController +{ + if(![self hasAdAvailable]) + { + MPLogError(@"Facebook rewarded video ad was not available"); + NSError *error = [NSError errorWithDomain:MoPubRewardedVideoAdsSDKDomain code:MPRewardedVideoAdErrorNoAdsAvailable userInfo:nil]; + [self.delegate rewardedVideoDidFailToPlayForCustomEvent:self error:error]; + } + else + { + MPLogInfo(@"Facebook rewarded video ad will be presented"); + [self.delegate rewardedVideoWillAppearForCustomEvent:self]; + [self.fbRewardedVideoAd showAdFromRootViewController:viewController]; + MPLogInfo(@"Facebook rewarded video ad was presented"); + [self.delegate rewardedVideoDidAppearForCustomEvent:self]; + } +} + +-(void)dealloc{ + _fbRewardedVideoAd.delegate = nil; +} + +#pragma mark FBRewardedVideoAdDelegate methods + +/*! + @method + + @abstract + Sent after an ad has been clicked by the person. + + @param rewardedVideoAd An FBRewardedVideoAd object sending the message. + */ +- (void)rewardedVideoAdDidClick:(FBRewardedVideoAd *)rewardedVideoAd +{ + MPLogInfo(@"Facebook rewarded video ad was clicked"); + [self.delegate rewardedVideoDidReceiveTapEventForCustomEvent:self ]; +} + +/*! + @method + + @abstract + Sent when an ad has been successfully loaded. + + @param rewardedVideoAd An FBRewardedVideoAd object sending the message. + */ +- (void)rewardedVideoAdDidLoad:(FBRewardedVideoAd *)rewardedVideoAd +{ + MPLogInfo(@"Facebook rewarded video ad was loaded. Can present now."); + [self.delegate rewardedVideoDidLoadAdForCustomEvent:self ]; + + // introduce timer for 1 hour as per caching logic introduced by FB + __weak __typeof__(self) weakSelf = self; + self.expirationTimer = [[MPRealTimeTimer alloc] initWithInterval:FB_ADS_EXPIRATION_INTERVAL block:^(MPRealTimeTimer *timer){ + __strong __typeof__(weakSelf) strongSelf = weakSelf; + if (strongSelf && !strongSelf.hasTrackedImpression) { + [self.delegate rewardedVideoDidExpireForCustomEvent:self]; + MPLogInfo(@"Facebook Rewarded Video ad expired as per the audience network's caching policy"); + self.fbRewardedVideoAd = nil; + } + [strongSelf.expirationTimer invalidate]; + }]; + [self.expirationTimer scheduleNow]; +} + +/*! + @method + + @abstract + Sent after an FBRewardedVideoAd object has been dismissed from the screen, returning control + to your application. + + @param rewardedVideoAd An FBRewardedVideoAd object sending the message. + */ +- (void)rewardedVideoAdDidClose:(FBRewardedVideoAd *)rewardedVideoAd +{ + MPLogInfo(@"Facebook rewarded video ad is dismissed."); + [self.delegate rewardedVideoDidDisappearForCustomEvent:self]; +} + +/*! + @method + + @abstract + Sent immediately before an FBRewardedVideoAd object will be dismissed from the screen. + + @param rewardedVideoAd An FBRewardedVideoAd object sending the message. + */ +- (void)rewardedVideoAdWillClose:(FBRewardedVideoAd *)rewardedVideoAd +{ + MPLogInfo(@"Facebook rewarded video ad will be dismissed."); + [self.delegate rewardedVideoWillDisappearForCustomEvent:self]; +} + +/*! + @method + + @abstract + Sent after an FBRewardedVideoAd fails to load the ad. + + @param rewardedVideoAd An FBRewardedVideoAd object sending the message. + @param error An error object containing details of the error. + */ +- (void)rewardedVideoAd:(FBRewardedVideoAd *)rewardedVideoAd didFailWithError:(NSError *)error +{ + MPLogInfo(@"Facebook rewarded video ad failed to load with error: %@", error.localizedDescription); + [self.delegate rewardedVideoDidFailToLoadAdForCustomEvent:self error:error]; +} + +/*! + @method + + @abstract + Sent after the FBRewardedVideoAd object has finished playing the video successfully. + Reward the user on this callback. + + @param rewardedVideoAd An FBRewardedVideoAd object sending the message. + */ +- (void)rewardedVideoAdVideoComplete:(FBRewardedVideoAd *)rewardedVideoAd +{ + MPLogInfo(@"Facebook rewarded video ad has finished playing successfully"); + + // Passing the reward type and amount as unspecified. Set the reward value in mopub UI. + [self.delegate rewardedVideoShouldRewardUserForCustomEvent:self reward:[[MPRewardedVideoReward alloc] initWithCurrencyAmount:@(kMPRewardedVideoRewardCurrencyAmountUnspecified)]]; +} + +/*! + @method + + @abstract + Sent immediately before the impression of an FBRewardedVideoAd object will be logged. + + @param rewardedVideoAd An FBRewardedVideoAd object sending the message. + */ +- (void)rewardedVideoAdWillLogImpression:(FBRewardedVideoAd *)rewardedVideoAd +{ + MPLogInfo(@"Facebook rewarded video has started playing and hence logging impression"); + //set the tracker to true when the ad is shown on the screen. So that the timer is invalidated. + _hasTrackedImpression = true; + [self.expirationTimer invalidate]; +} + +@end + + diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/MoPub-FacebookAudienceNetwork-Podspecs/LICENSE b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/MoPub-FacebookAudienceNetwork-Podspecs/LICENSE new file mode 100755 index 0000000000..e3ecb42aaf --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/MoPub-FacebookAudienceNetwork-Podspecs/LICENSE @@ -0,0 +1,3 @@ + The MoPub SDK License can be found at http://www.mopub.com/legal/sdk-license-agreement/ + + diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/MoPub-FacebookAudienceNetwork-Podspecs/MoPub-FacebookAudienceNetwork-Adapters.podspec b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/MoPub-FacebookAudienceNetwork-Podspecs/MoPub-FacebookAudienceNetwork-Adapters.podspec new file mode 100755 index 0000000000..1e80a6d5f8 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/MoPub-FacebookAudienceNetwork-Podspecs/MoPub-FacebookAudienceNetwork-Adapters.podspec @@ -0,0 +1,24 @@ +# +# Be sure to run `pod lib lint MoPub-Facebook-Adapters.podspec' to ensure this is a +# valid spec before submitting. +# + +Pod::Spec.new do |s| +s.name = 'MoPub-FacebookAudienceNetwork-Adapters' +s.version = '4.28.1.2' +s.summary = 'Facebook Adapters for mediating through MoPub.' +s.description = <<-DESC +Supported ad formats: Banners, Interstitial, Rewarded Video and Native.\n +To download and integrate the Facebook SDK, please check https://developers.facebook.com/docs/audience-network/ios/#sdk. \n\n +For inquiries and support, please visit https://developers.facebook.com/products/audience-network/faq/. \n +DESC +s.homepage = 'https://github.com/mopub/mopub-ios-mediation' +s.license = { :type => 'New BSD', :file => 'LICENSE' } +s.author = { 'MoPub' => 'support@mopub.com' } +s.source = { :git => 'https://github.com/mopub/mopub-ios-mediation.git', :commit => 'master' } +s.ios.deployment_target = '8.0' +s.static_framework = true +s.source_files = 'FacebookAudienceNetwork/*.{h,m}' +s.dependency 'mopub-ios-sdk', '~> 5.0' +s.dependency 'FBAudienceNetwork', '4.28.1' +end diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/README.md b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/README.md new file mode 100755 index 0000000000..2a7701fa24 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/README.md @@ -0,0 +1,7 @@ +## Overview + * This folder contains mediation adapters used to mediate Facebook AN. + * To download and integrate the Facebook AN SDK, please check [this tutorial](https://developers.facebook.com/docs/audience-network/ios/#sdk). + * For inquiries and support, please visit [support](https://developers.facebook.com/products/audience-network/faq/) forum. + +## Adapter integration + * To integrate adapters, please visit our [integration tutorial](https://developers.mopub.com/docs/ios/integrating-networks/). diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/FBAudienceNetwork b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/FBAudienceNetwork similarity index 74% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/FBAudienceNetwork rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/FBAudienceNetwork index abbf306c0e..4be0a79ac3 100644 Binary files a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/FBAudienceNetwork and b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/FBAudienceNetwork differ diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBAdChoicesView.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBAdChoicesView.h similarity index 94% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBAdChoicesView.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBAdChoicesView.h index e301adced9..f97e954b3a 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBAdChoicesView.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBAdChoicesView.h @@ -47,20 +47,20 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED */ @property (nonatomic, assign, readonly, getter=isExpandable) BOOL expandable; -/* +/** The native ad that provides AdChoices info, such as the image url, and click url. Setting this updates the nativeAd. */ @property (nonatomic, weak, readwrite, nullable) FBNativeAd *nativeAd; -/* +/** Affects background mask rendering. Setting this property updates the rendering. */ @property (nonatomic, assign, readwrite) UIRectCorner corner; -/* +/** The view controller to present the ad choices info from. If nil, the top view controller is used. */ -@property (nonatomic, weak, readwrite, null_resettable) UIViewController *viewController; +@property (nonatomic, weak, readwrite, null_resettable) UIViewController *rootViewController; /** Initialize this view with a given native ad. Configuration is pulled from the native ad. @@ -98,8 +98,10 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED Using the superview, this updates the frame of this view, positioning the icon in the corner specified. UIRectCornerAllCorners not supported. - Parameter corner: The corner to display this view from. + - Parameter insets: Insets to take into account when positioning the view. Only respective insets are applied to corners. */ - (void)updateFrameFromSuperview:(UIRectCorner)corner; +- (void)updateFrameFromSuperview:(UIRectCorner)corner insets:(UIEdgeInsets)insets; @end diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBAdDefines.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBAdDefines.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBAdDefines.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBAdDefines.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBAdSettings.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBAdSettings.h similarity index 83% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBAdSettings.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBAdSettings.h index 31c44856e0..0359343cb1 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBAdSettings.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBAdSettings.h @@ -23,9 +23,12 @@ NS_ASSUME_NONNULL_BEGIN /** - Audience Network error domains (returned in NSErrors generated by the SDK) + Audience Network error domain */ FB_EXPORT NSString * const FBAudienceNetworkErrorDomain; +/** + Audience Network error FBMediaView error domain + */ FB_EXPORT NSString * const FBAudienceNetworkMediaViewErrorDomain; /** @@ -66,31 +69,32 @@ typedef NS_ENUM(NSInteger, FBMediaViewRenderingMethod) { Test Ad type to be injected when test mode is on */ typedef NS_ENUM(NSInteger, FBAdTestAdType) { - // No specific ad type to be set. - // This will return a random ad type when test mode is on. + /// This will return a random ad type when test mode is on. FBAdTestAdType_Default, - // 16x9 image ad with app install CTA option + /// 16x9 image ad with app install CTA option FBAdTestAdType_Img_16_9_App_Install, - // 16x9 image ad with link CTA option + /// 16x9 image ad with link CTA option FBAdTestAdType_Img_16_9_Link, - // 16x9 HD video 46 sec ad with app install CTA option + /// 16x9 HD video 46 sec ad with app install CTA option FBAdTestAdType_Vid_HD_16_9_46s_App_Install, - // 16x9 HD video 46 sec ad with link CTA option + /// 16x9 HD video 46 sec ad with link CTA option FBAdTestAdType_Vid_HD_16_9_46s_Link, - // 16x9 HD video 15 sec ad with app install CTA option + /// 16x9 HD video 15 sec ad with app install CTA option FBAdTestAdType_Vid_HD_16_9_15s_App_Install, - // 16x9 HD video 15 sec ad with link CTA option + /// 16x9 HD video 15 sec ad with link CTA option FBAdTestAdType_Vid_HD_16_9_15s_Link, - // 9x16 HD video 39 sec ad with app install CTA option + /// 9x16 HD video 39 sec ad with app install CTA option FBAdTestAdType_Vid_HD_9_16_39s_App_Install, - // 9x16 HD video 39 sec ad with link CTA option + /// 9x16 HD video 39 sec ad with link CTA option FBAdTestAdType_Vid_HD_9_16_39s_Link, - // carousel ad with square image and app install CTA option + /// carousel ad with square image and app install CTA option FBAdTestAdType_Carousel_Img_Square_App_Install, - // carousel ad with square image and link CTA option + /// carousel ad with square image and link CTA option FBAdTestAdType_Carousel_Img_Square_Link }; +@protocol FBAdLoggingDelegate; + /** AdSettings contains global settings for all ad controls. */ @@ -110,6 +114,11 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED */ @property (class, nonatomic, assign) FBAdTestAdType testAdType; +/** + When this delegate is set, logs will be redirected to the delegate instead of being logged directly to the console with NSLog. + This can be used in combination with external logging frameworks. + */ +@property (class, nonatomic, weak, nullable) id loggingDelegate; /** Generates bidder token that needs to be included in the server side bid request to Facebook endpoint. @@ -217,4 +226,14 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED @end +@protocol FBAdLoggingDelegate + +- (void)logAtLevel:(FBAdLogLevel)level + withFileName:(NSString *)fileName + withLineNumber:(int)lineNumber + withThreadId:(long)threadId + withBody:(NSString *)body; + +@end + NS_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBAdSize.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBAdSize.h similarity index 98% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBAdSize.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBAdSize.h index 564872b16f..5ce4d22ae7 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBAdSize.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBAdSize.h @@ -25,6 +25,7 @@ NS_ASSUME_NONNULL_BEGIN /// Represents the ad size. struct FBAdSize { + /// Internal size CGSize size; }; diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBAdView.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBAdView.h similarity index 97% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBAdView.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBAdView.h index cae21c86e4..1f98ab0045 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBAdView.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBAdView.h @@ -41,7 +41,7 @@ FB_CLASS_EXPORT */ - (instancetype)initWithPlacementID:(NSString *)placementID adSize:(FBAdSize)adSize - rootViewController:(nullable UIViewController *)viewController NS_DESIGNATED_INITIALIZER; + rootViewController:(nullable UIViewController *)rootViewController NS_DESIGNATED_INITIALIZER; /** Begins loading the FBAdView content. @@ -142,7 +142,7 @@ FB_CLASS_EXPORT - Returns: A view controller that is used to present modal content. */ -@property (nonatomic, readonly, strong, nonnull) UIViewController *viewControllerForPresentingModalView; +@property (nonatomic, readonly, strong) UIViewController *viewControllerForPresentingModalView; @end diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBAudienceNetwork.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBAudienceNetwork.h similarity index 98% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBAudienceNetwork.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBAudienceNetwork.h index f0e7e71ada..07858208c0 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBAudienceNetwork.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBAudienceNetwork.h @@ -39,4 +39,4 @@ // NOTE: Any changes should also be made to the module.modulemap // to ensure comptability with Swift apps using Cocoapods -#define FB_AD_SDK_VERSION @"4.26.0" +#define FB_AD_SDK_VERSION @"4.28.1" diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBInstreamAdView.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBInstreamAdView.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBInstreamAdView.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBInstreamAdView.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBInterstitialAd.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBInterstitialAd.h similarity index 98% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBInterstitialAd.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBInterstitialAd.h index 5b1194ed84..b1617b55be 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBInterstitialAd.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBInterstitialAd.h @@ -36,7 +36,7 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED /** Typed access to the id of the ad placement. */ -@property (nonatomic, copy, readonly, nonnull) NSString *placementID; +@property (nonatomic, copy, readonly) NSString *placementID; /** the delegate */ diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBMediaView.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBMediaView.h similarity index 97% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBMediaView.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBMediaView.h index 7e6ec59144..c897ac8d22 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBMediaView.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBMediaView.h @@ -46,12 +46,12 @@ FB_CLASS_EXPORT /** the native ad, can be set again to reuse this view. */ -@property (nonatomic, strong, nonnull) FBNativeAd *nativeAd; +@property (nonatomic, strong) FBNativeAd *nativeAd; /** A custom FBMediaViewVideoRenderer instance, used to override the default user experience of video ads. */ -@property (nonatomic, strong, nonnull) FBMediaViewVideoRenderer *videoRenderer; +@property (nonatomic, strong) FBMediaViewVideoRenderer *videoRenderer; /** The current volume of the media view, ranging from 0.0 through 1.0. diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBMediaViewVideoRenderer.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBMediaViewVideoRenderer.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBMediaViewVideoRenderer.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBMediaViewVideoRenderer.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBNativeAd.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBNativeAd.h similarity index 95% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBNativeAd.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBNativeAd.h index d0454e4dec..d7bde27334 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBNativeAd.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBNativeAd.h @@ -45,7 +45,7 @@ typedef NS_OPTIONS(NSInteger, FBNativeAdsCachePolicy) { /** The FBNativeAd represents ad metadata to allow you to construct custom ad views. - See the NativeAdSample in the sample apps section of the Audience Network framework. + See the AdUnitsSample in the sample apps section of the Audience Network framework. */ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED @interface FBNativeAd : NSObject @@ -53,7 +53,7 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED /** Typed access to the id of the ad placement. */ -@property (nonatomic, copy, readonly, nonnull) NSString *placementID; +@property (nonatomic, copy, readonly) NSString *placementID; /** Typed access to the ad star rating. See `FBAdStarRating` for details. */ @@ -164,7 +164,7 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED - Parameter bidPayload: The payload of the ad bid. You can get your bid payload from Facebook bidder endpoint. */ -- (void)loadAdWithBidPayload:(nonnull NSString *)bidPayload; +- (void)loadAdWithBidPayload:(NSString *)bidPayload; /** Call isAdValid to check whether native ad is valid & internal consistent prior rendering using its properties. If @@ -230,7 +230,7 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED FB_EXPORT struct FBAdStarRating { /// The value of the star rating, X in X/5 CGFloat value; - // The total possible star rating, Y in 4/Y + /// The total possible star rating, Y in 4/Y NSInteger scale; } FBAdStarRating; @@ -243,7 +243,7 @@ FB_CLASS_EXPORT /** Typed access to the image url. */ -@property (nonatomic, copy, readonly, nonnull) NSURL *url; +@property (nonatomic, copy, readonly) NSURL *url; /** Typed access to the image width. */ @@ -287,12 +287,12 @@ FB_CLASS_EXPORT FB_DEPRECATED /** The color drawn for filled-in stars. Defaults to yellow. */ -@property (strong, nonatomic, nonnull) UIColor *primaryColor FB_DEPRECATED; +@property (strong, nonatomic) UIColor *primaryColor FB_DEPRECATED; /** The color drawn for empty stars. Defaults to gray. */ -@property (strong, nonatomic, nonnull) UIColor *secondaryColor FB_DEPRECATED; +@property (strong, nonatomic) UIColor *secondaryColor FB_DEPRECATED; /** Initializes a star rating view with a given frame and star rating. diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdCollectionViewAdProvider.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdCollectionViewAdProvider.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdCollectionViewAdProvider.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdCollectionViewAdProvider.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdCollectionViewCellProvider.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdCollectionViewCellProvider.h similarity index 96% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdCollectionViewCellProvider.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdCollectionViewCellProvider.h index 2e2d9c4248..6593f6743b 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdCollectionViewCellProvider.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdCollectionViewCellProvider.h @@ -58,7 +58,7 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED /** Helper method for implementors of UICollectionViewDelegate who would like to host native ad UICollectionViewCells in their collection view. */ -- (CGFloat)collectionView:(nonnull UICollectionView *)collectionView heightForRowAtIndexPath:(nonnull NSIndexPath *)indexPath; +- (CGFloat)collectionView:(UICollectionView *)collectionView heightForRowAtIndexPath:(NSIndexPath *)indexPath; @end diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdScrollView.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdScrollView.h similarity index 79% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdScrollView.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdScrollView.h index a4dd668e90..7209934716 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdScrollView.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdScrollView.h @@ -58,7 +58,7 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED /** A view controller that is used to present modal content. If nil, the view searches for a view controller. */ -@property (nonatomic, weak, nullable) UIViewController *viewController; +@property (nonatomic, weak, nullable) UIViewController *rootViewController; /** Passes delegate methods from FBNativeAd. Separate delegate calls will be made for each native ad contained. @@ -70,8 +70,8 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED - Parameter manager: An instance of FBNativeAdManager. Can be preloaded with ads. - Parameter type: The type of this native ad template. For more information, consult FBNativeAdViewType. */ -- (nonnull instancetype)initWithNativeAdsManager:(nonnull FBNativeAdsManager *)manager - withType:(FBNativeAdViewType)type; +- (instancetype)initWithNativeAdsManager:(FBNativeAdsManager *)manager + withType:(FBNativeAdViewType)type; /** @@ -80,9 +80,9 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED - Parameter type: The type of this native ad template. For more information, consult FBNativeAdViewType. - Parameter attributes: The layout of this native ad template. For more information, consult FBNativeAdViewLayout. */ -- (nonnull instancetype)initWithNativeAdsManager:(nonnull FBNativeAdsManager *)manager - withType:(FBNativeAdViewType)type - withAttributes:(nonnull FBNativeAdViewAttributes *)attributes; +- (instancetype)initWithNativeAdsManager:(FBNativeAdsManager *)manager + withType:(FBNativeAdViewType)type + withAttributes:(FBNativeAdViewAttributes *)attributes; /** Creates a native ad horizontal scroll view for a given native ads manager and native ad template. The manager can be preloaded with ads, and loadAds will use the preloaded ads from the manager. Otherwise, the scroll view uses the manager to load ads normally. @@ -91,10 +91,10 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED - Parameter attributes: The layout of this native ad template. For more information, consult FBNativeAdViewLayout. - Parameter maximumNativeAdCount: Maximum native ads to show at once. */ -- (nonnull instancetype)initWithNativeAdsManager:(nonnull FBNativeAdsManager *)manager - withType:(FBNativeAdViewType)type - withAttributes:(nonnull FBNativeAdViewAttributes *)attributes - withMaximum:(NSUInteger)maximumNativeAdCount; +- (instancetype)initWithNativeAdsManager:(FBNativeAdsManager *)manager + withType:(FBNativeAdViewType)type + withAttributes:(FBNativeAdViewAttributes *)attributes + withMaximum:(NSUInteger)maximumNativeAdCount; /** @@ -102,8 +102,8 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED - Parameter manager: An instance of FBNativeAdManager. Can be preloaded with ads. - Parameter childViewProvider: Block that creates new views for each loaded native ad. Must not reuse the same instance, but return a new view for each call. Views may be arbitrarily resized and should support resizing their content through Auto Layout constraints, autoresizing masks, or manual resizing. */ -- (nonnull instancetype)initWithNativeAdsManager:(nonnull FBNativeAdsManager *)manager - withViewProvider:(nonnull UIView * __nonnull(^)( FBNativeAd * __nonnull nativeAd, NSUInteger position))childViewProvider; +- (instancetype)initWithNativeAdsManager:(FBNativeAdsManager *)manager + withViewProvider:(UIView *(^)( FBNativeAd *nativeAd, NSUInteger position))childViewProvider; /** This is a method to create a native ad horizontal scroll view from a user provided view. @@ -111,9 +111,9 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED - Parameter childViewProvider: Block that creates new views for each loaded native ad. Must not reuse the same instance, but return a new view for each call. Views may be arbitrarily resized and should support resizing their content through Auto Layout constraints, autoresizing masks, or manual resizing. - Parameter maximumNativeAdCount: Maximum native ads to show at once. */ -- (nonnull instancetype)initWithNativeAdsManager:(nonnull FBNativeAdsManager *)manager - withViewProvider:(nonnull UIView * __nonnull(^)(FBNativeAd * __nonnull nativeAd, NSUInteger position))childViewProvider - withMaximum:(NSUInteger)maximumNativeAdCount NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithNativeAdsManager:(FBNativeAdsManager *)manager + withViewProvider:(UIView *(^)(FBNativeAd *nativeAd, NSUInteger position))childViewProvider + withMaximum:(NSUInteger)maximumNativeAdCount NS_DESIGNATED_INITIALIZER; @end diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdTableViewAdProvider.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdTableViewAdProvider.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdTableViewAdProvider.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdTableViewAdProvider.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdTableViewCellProvider.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdTableViewCellProvider.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdTableViewCellProvider.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdTableViewCellProvider.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdView.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdView.h similarity index 88% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdView.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdView.h index 323e3b8e96..df826d8113 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdView.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdView.h @@ -56,12 +56,12 @@ FB_CLASS_EXPORT - Parameter nativeAd: The native ad to use to create this view. - Parameter type: The type of this native ad template. For more information, consult FBNativeAdViewType. */ -+ (nonnull instancetype)nativeAdViewWithNativeAd:(nonnull FBNativeAd *)nativeAd withType:(FBNativeAdViewType)type; ++ (instancetype)nativeAdViewWithNativeAd:(FBNativeAd *)nativeAd withType:(FBNativeAdViewType)type; /** A view controller that is used to present modal content. If nil, the view searches for a view controller. */ -@property (nonatomic, weak, nullable) UIViewController *viewController; +@property (nonatomic, weak, nullable) UIViewController *rootViewController; /** This is a method to create a native ad template using the given placement id and type. @@ -69,7 +69,7 @@ FB_CLASS_EXPORT - Parameter type: The type of this native ad template. For more information, consult FBNativeAdViewType. - Parameter attributes: The attributes to render this native ad template with. */ -+ (nonnull instancetype)nativeAdViewWithNativeAd:(nonnull FBNativeAd *)nativeAd withType:(FBNativeAdViewType)type withAttributes:(nonnull FBNativeAdViewAttributes *)attributes; ++ (instancetype)nativeAdViewWithNativeAd:(FBNativeAd *)nativeAd withType:(FBNativeAdViewType)type withAttributes:(FBNativeAdViewAttributes *)attributes; @end @@ -81,7 +81,7 @@ FB_CLASS_EXPORT /** This is a method to create native ad view attributes with a dictionary */ -- (nonnull instancetype)initWithDictionary:(nonnull NSDictionary *) dict NS_DESIGNATED_INITIALIZER; +- (instancetype)initWithDictionary:(NSDictionary *) dict NS_DESIGNATED_INITIALIZER; /** Background color of the native ad view. @@ -129,7 +129,7 @@ FB_CLASS_EXPORT - Parameter type: The type for this layout. */ -+ (nonnull instancetype)defaultAttributesForType:(FBNativeAdViewType)type; ++ (instancetype)defaultAttributesForType:(FBNativeAdViewType)type; @end diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdsManager.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdsManager.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdsManager.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBNativeAdsManager.h diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBRewardedVideoAd.h b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBRewardedVideoAd.h similarity index 91% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBRewardedVideoAd.h rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBRewardedVideoAd.h index edfec52f7a..e33a2896ba 100644 --- a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Headers/FBRewardedVideoAd.h +++ b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Headers/FBRewardedVideoAd.h @@ -16,6 +16,7 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +#import #import #import @@ -37,6 +38,11 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED */ @property (nonatomic, copy, readonly) NSString *placementID; +/** + The duration of the video, as a CMTime value. Returns kCMTimeIndefinite if no video is loaded. + */ +@property (nonatomic, assign, readonly) CMTime duration; + /** the delegate */ @@ -69,20 +75,6 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED withUserID:(nullable NSString *)userID withCurrency:(nullable NSString *)currency; -/*! - This is a method to initialize an FBRewardedVideoAd matching the given placement id and allows the publisher to set - the reward to give to a user. - - - Parameter placementID The id of the ad placement. You can create your placement id from Facebook developers page. - - Parameter userID the id of the user - - Parameter currency reward currency type - - Parameter amount reward amount - */ -- (instancetype)initWithPlacementID:(NSString *)placementID - withUserID:(nullable NSString *)userID - withCurrency:(nullable NSString *)currency - withAmount:(NSInteger)amount; - /** Begins loading the FBRewardedVideoAd content. @@ -101,6 +93,17 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED */ - (void)loadAdWithBidPayload:(NSString *)bidPayload; +/** + This method allows the publisher to set the reward to give to a user. Returns NO if it was not able + to set Reward Data. + + - Parameter userID the id of the user + - Parameter currency reward currency type + */ + +- (BOOL)setRewardDataWithUserID:(NSString *)userID + withCurrency:(NSString *)currency; + /** Presents the rewarded video ad modally from the specified view controller. @@ -178,7 +181,7 @@ FB_CLASS_EXPORT FB_SUBCLASSING_RESTRICTED - Parameter rewardedVideoAd: An FBRewardedVideoAd object sending the message. */ -- (void)rewardedVideoAdComplete:(FBRewardedVideoAd *)rewardedVideoAd; +- (void)rewardedVideoAdVideoComplete:(FBRewardedVideoAd *)rewardedVideoAd; /** Sent immediately before the impression of an FBRewardedVideoAd object will be logged. diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Info.plist b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Info.plist similarity index 77% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Info.plist rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Info.plist index 08730d54c8..ce76579798 100644 Binary files a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Info.plist and b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Info.plist differ diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Modules/module.modulemap b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Modules/module.modulemap similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/Modules/module.modulemap rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/Modules/module.modulemap diff --git a/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/PkgInfo b/iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/PkgInfo similarity index 100% rename from iphone/Maps/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework/PkgInfo rename to iphone/Maps/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework/PkgInfo diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBannerAdManager.m b/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBannerAdManager.m index 73d6fa19c6..1b39ca2222 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBannerAdManager.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBannerAdManager.m @@ -14,6 +14,7 @@ #import "MPTimer.h" #import "MPConstants.h" #import "MPLogging.h" +#import "MPBannerCustomEventAdapter.h" @interface MPBannerAdManager () @@ -51,7 +52,7 @@ if (self) { self.delegate = delegate; - self.communicator = [[MPCoreInstanceProvider sharedProvider] buildMPAdServerCommunicatorWithDelegate:self]; + self.communicator = [[MPAdServerCommunicator alloc] initWithDelegate:self]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillEnterForeground) @@ -158,8 +159,8 @@ URL = (URL) ? URL : [MPAdServerURLBuilder URLWithAdUnitID:[self.delegate adUnitId] keywords:[self.delegate keywords] - location:[self.delegate location] - testing:[self.delegate isTesting]]; + userDataKeywords:[self.delegate userDataKeywords] + location:[self.delegate location]]; MPLogInfo(@"Banner view (%@) loading ad with MoPub server URL: %@", [self.delegate adUnitId], URL); @@ -199,43 +200,43 @@ #pragma mark - -- (void)communicatorDidReceiveAdConfiguration:(MPAdConfiguration *)configuration +- (void)communicatorDidReceiveAdConfigurations:(NSArray *)configurations { - self.requestingConfiguration = configuration; + self.requestingConfiguration = configurations.firstObject; MPLogInfo(@"Banner ad view is fetching ad network type: %@", self.requestingConfiguration.networkType); - if (configuration.adType == MPAdTypeUnknown) { + if (self.requestingConfiguration.adType == MPAdTypeUnknown) { [self didFailToLoadAdapterWithError:[MOPUBError errorWithCode:MOPUBErrorServerError]]; return; } - if (configuration.adType == MPAdTypeInterstitial) { + if (self.requestingConfiguration.adType == MPAdTypeInterstitial) { MPLogWarn(@"Could not load ad: banner object received an interstitial ad unit ID."); [self didFailToLoadAdapterWithError:[MOPUBError errorWithCode:MOPUBErrorAdapterInvalid]]; return; } - if (configuration.adUnitWarmingUp) { + if (self.requestingConfiguration.adUnitWarmingUp) { MPLogInfo(kMPWarmingUpErrorLogFormatWithAdUnitID, self.delegate.adUnitId); [self didFailToLoadAdapterWithError:[MOPUBError errorWithCode:MOPUBErrorAdUnitWarmingUp]]; return; } - if ([configuration.networkType isEqualToString:kAdTypeClear]) { + if ([self.requestingConfiguration.networkType isEqualToString:kAdTypeClear]) { MPLogInfo(kMPClearErrorLogFormatWithAdUnitID, self.delegate.adUnitId); [self didFailToLoadAdapterWithError:[MOPUBError errorWithCode:MOPUBErrorNoInventory]]; return; } - self.requestingAdapter = [[MPInstanceProvider sharedProvider] buildBannerAdapterForConfiguration:configuration - delegate:self]; + self.requestingAdapter = [[MPBannerCustomEventAdapter alloc] initWithConfiguration:self.requestingConfiguration + delegate:self]; if (!self.requestingAdapter) { [self loadAdWithURL:self.requestingConfiguration.failoverURL]; return; } - [self.requestingAdapter _getAdWithConfiguration:configuration containerSize:self.delegate.containerSize]; + [self.requestingAdapter _getAdWithConfiguration:self.requestingConfiguration containerSize:self.delegate.containerSize]; } - (void)communicatorDidFailWithError:(NSError *)error diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBannerAdManagerDelegate.h b/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBannerAdManagerDelegate.h index 406d99dbbb..b8a031ddf3 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBannerAdManagerDelegate.h +++ b/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBannerAdManagerDelegate.h @@ -18,8 +18,8 @@ - (id)bannerDelegate; - (CGSize)containerSize; - (NSString *)keywords; +- (NSString *)userDataKeywords; - (CLLocation *)location; -- (BOOL)isTesting; - (UIViewController *)viewControllerForPresentingModalView; - (void)invalidateContentView; diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBannerCustomEvent+Internal.h b/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBannerCustomEvent+Internal.h new file mode 100644 index 0000000000..bd6a5be352 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBannerCustomEvent+Internal.h @@ -0,0 +1,27 @@ +// +// MPBannerCustomEvent+Internal.h +// MoPubSampleApp +// +// Copyright © 2017 MoPub. All rights reserved. +// + +#import "MPBannerCustomEvent.h" + +@interface MPBannerCustomEvent (Internal) + +/** + * Track marketplace and 3rd party impressions. + * Extended class implements this method if necessary. + * Currently, only HTML and MRAID banners contain MPX and 3rd party trackers. + * Mediated networks don't contain MPX and 3rd party trackers. + */ + +- (void)trackMPXAndThirdPartyImpressions; + +/** + * Start viewability tracker. The default implementation of this method does nothing. + * Subclasses can override this method if necessary. + */ +- (void)startViewabilityTracker; + +@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBannerCustomEvent+Internal.m b/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBannerCustomEvent+Internal.m new file mode 100644 index 0000000000..2b88412dc5 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBannerCustomEvent+Internal.m @@ -0,0 +1,22 @@ +// +// MPBannerCustomEvent+Internal.m +// MoPubSampleApp +// +// Copyright © 2017 MoPub. All rights reserved. +// + +#import "MPBannerCustomEvent+Internal.h" + +@implementation MPBannerCustomEvent (Internal) + +- (void)trackMPXAndThirdPartyImpressions +{ + // no-op. +} + +- (void)startViewabilityTracker +{ + // no-op +} + +@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBannerCustomEventAdapter.h b/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBannerCustomEventAdapter.h index d8c5dea8b7..fd4fb092fd 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBannerCustomEventAdapter.h +++ b/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBannerCustomEventAdapter.h @@ -13,4 +13,6 @@ @interface MPBannerCustomEventAdapter : MPBaseBannerAdapter +- (instancetype)initWithConfiguration:(MPAdConfiguration *)configuration delegate:(id)delegate; + @end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBannerCustomEventAdapter.m b/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBannerCustomEventAdapter.m index e3a35ffe27..7f84e8c71b 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBannerCustomEventAdapter.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBannerCustomEventAdapter.m @@ -11,21 +11,31 @@ #import "MPBannerCustomEvent.h" #import "MPInstanceProvider.h" #import "MPLogging.h" +#import "MPAdImpressionTimer.h" +#import "MPBannerCustomEvent+Internal.h" -@interface MPBannerCustomEventAdapter () +@interface MPBannerCustomEventAdapter () @property (nonatomic, strong) MPBannerCustomEvent *bannerCustomEvent; @property (nonatomic, strong) MPAdConfiguration *configuration; @property (nonatomic, assign) BOOL hasTrackedImpression; @property (nonatomic, assign) BOOL hasTrackedClick; +@property (nonatomic) MPAdImpressionTimer *impressionTimer; +@property (nonatomic) UIView *adView; - (void)trackClickOnce; @end @implementation MPBannerCustomEventAdapter -@synthesize hasTrackedImpression = _hasTrackedImpression; -@synthesize hasTrackedClick = _hasTrackedClick; + +- (instancetype)initWithConfiguration:(MPAdConfiguration *)configuration delegate:(id)delegate +{ + if (!configuration.customEventClass) { + return nil; + } + return [self initWithDelegate:delegate]; +} - (void)unregisterDelegate { @@ -49,13 +59,17 @@ MPLogInfo(@"Looking for custom event class named %@.", configuration.customEventClass); self.configuration = configuration; - self.bannerCustomEvent = [[MPInstanceProvider sharedProvider] buildBannerCustomEventFromCustomClass:configuration.customEventClass - delegate:self]; - if (self.bannerCustomEvent) { - [self.bannerCustomEvent requestAdWithSize:size customEventInfo:configuration.customEventClassData]; - } else { + MPBannerCustomEvent *customEvent = [[configuration.customEventClass alloc] init]; + if (![customEvent isKindOfClass:[MPBannerCustomEvent class]]) { + MPLogError(@"**** Custom Event Class: %@ does not extend MPBannerCustomEvent ****", NSStringFromClass(configuration.customEventClass)); [self.delegate adapter:self didFailToLoadAdWithError:nil]; + return; } + + + self.bannerCustomEvent = customEvent; + self.bannerCustomEvent.delegate = self; + [self.bannerCustomEvent requestAdWithSize:size customEventInfo:configuration.customEventClassData adMarkup:configuration.advancedBidPayload]; } - (void)rotateToOrientation:(UIInterfaceOrientation)newOrientation @@ -65,14 +79,44 @@ - (void)didDisplayAd { - if ([self.bannerCustomEvent enableAutomaticImpressionAndClickTracking] && !self.hasTrackedImpression) { - self.hasTrackedImpression = YES; - [self trackImpression]; + if([self shouldTrackImpressionOnDisplay]) { + [self trackImpressionOnDisplay]; + } else if (self.configuration.visibleImpressionTrackingEnabled) { + [self startViewableTrackingTimer]; + } else { + // Mediated networks except Google AdMob + // no-op here. } [self.bannerCustomEvent didDisplayAd]; } +#pragma mark - 1px impression tracking methods + +- (void)trackImpressionOnDisplay +{ + self.hasTrackedImpression = YES; + [self trackImpression]; +} + +- (void)startViewableTrackingTimer +{ + self.impressionTimer = [[MPAdImpressionTimer alloc] initWithRequiredSecondsForImpression:self.configuration.impressionMinVisibleTimeInSec requiredViewVisibilityPixels:self.configuration.impressionMinVisiblePixels]; + self.impressionTimer.delegate = self; + [self.impressionTimer startTrackingView:self.adView]; +} + + +- (BOOL)shouldTrackImpressionOnDisplay { + if (self.configuration.visibleImpressionTrackingEnabled) { + return NO; + } + if([self.bannerCustomEvent enableAutomaticImpressionAndClickTracking] && !self.hasTrackedImpression) { + return YES; + } + return NO; +} + //////////////////////////////////////////////////////////////////////////////////////////////////// #pragma mark - MPPrivateBannerCustomEventDelegate @@ -101,6 +145,7 @@ { [self didStopLoading]; if (ad) { + self.adView = ad; [self.delegate adapter:self didFinishLoadingAd:ad]; } else { [self.delegate adapter:self didFailToLoadAdWithError:nil]; @@ -138,4 +183,16 @@ } } +#pragma mark - MPAdImpressionTimerDelegate + +- (void)adViewWillLogImpression:(UIView *)adView +{ + // Ads server impression + [self trackImpression]; + // MPX and other trackers; + [self.bannerCustomEvent trackMPXAndThirdPartyImpressions]; + // Start viewability tracking + [self.bannerCustomEvent startViewabilityTracker]; +} + @end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBaseBannerAdapter.h b/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBaseBannerAdapter.h index bc978eafce..f8460ea995 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBaseBannerAdapter.h +++ b/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBaseBannerAdapter.h @@ -14,15 +14,12 @@ @class MPAdConfiguration; @interface MPBaseBannerAdapter : NSObject -{ - id __weak _delegate; -} @property (nonatomic, weak) id delegate; @property (nonatomic, copy) NSURL *impressionTrackingURL; @property (nonatomic, copy) NSURL *clickTrackingURL; -- (id)initWithDelegate:(id)delegate; +- (instancetype)initWithDelegate:(id)delegate; /* * Sets the adapter's delegate to nil. diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBaseBannerAdapter.m b/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBaseBannerAdapter.m index 6520564d94..6bb16a7bed 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBaseBannerAdapter.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/Banners/MPBaseBannerAdapter.m @@ -28,11 +28,7 @@ @implementation MPBaseBannerAdapter -@synthesize delegate = _delegate; -@synthesize configuration = _configuration; -@synthesize timeoutTimer = _timeoutTimer; - -- (id)initWithDelegate:(id)delegate +- (instancetype)initWithDelegate:(id)delegate { if (self = [super init]) { self.delegate = delegate; diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAPIEndpoints.h b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAPIEndpoints.h index 0b53eb3f74..083854fbec 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAPIEndpoints.h +++ b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAPIEndpoints.h @@ -8,17 +8,17 @@ #import #define MOPUB_BASE_HOSTNAME @"ads.mopub.com" -#define MOPUB_BASE_HOSTNAME_FOR_TESTING @"testing.ads.mopub.com" #define MOPUB_API_PATH_AD_REQUEST @"/m/ad" -#define MOPUB_API_PATH_CONVERSION @"/m/open" #define MOPUB_API_PATH_NATIVE_POSITIONING @"/m/pos" -#define MOPUB_API_PATH_SESSION @"/m/open" +#define MOPUB_API_PATH_OPEN @"/m/open" +#define MOPUB_API_PATH_CONSENT_DIALOG @"/m/gdpr_consent_dialog" +#define MOPUB_API_PATH_CONSENT_SYNC @"/m/gdpr_sync" @interface MPAPIEndpoints : NSObject + (void)setUsesHTTPS:(BOOL)usesHTTPS; + (NSString *)baseURL; -+ (NSString *)baseURLStringWithPath:(NSString *)path testing:(BOOL)testing; ++ (NSString *)baseURLStringWithPath:(NSString *)path; @end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAPIEndpoints.m b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAPIEndpoints.m index 7ec0176830..61048b785e 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAPIEndpoints.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAPIEndpoints.m @@ -32,11 +32,11 @@ static BOOL sUsesHTTPS = YES; return sUsesHTTPS ? @"https://" : @"http://"; } -+ (NSString *)baseURLStringWithPath:(NSString *)path testing:(BOOL)testing ++ (NSString *)baseURLStringWithPath:(NSString *)path { return [NSString stringWithFormat:@"%@%@%@", [[self class] baseURLScheme], - testing ? MOPUB_BASE_HOSTNAME_FOR_TESTING : MOPUB_BASE_HOSTNAME, + MOPUB_BASE_HOSTNAME, path]; } diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPActivityViewControllerHelper.h b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPActivityViewControllerHelper.h index 8b865316c8..87d1377482 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPActivityViewControllerHelper.h +++ b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPActivityViewControllerHelper.h @@ -28,7 +28,7 @@ * Initializes the MPActivityViewControllerHelper and stores a weak reference * to the supplied delegate. * - * @param delegate + * @param delegate Optional callback delegate */ - (instancetype)initWithDelegate:(id)delegate; diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPActivityViewControllerHelper.m b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPActivityViewControllerHelper.m index ea8731c1ef..b43084cc90 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPActivityViewControllerHelper.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPActivityViewControllerHelper.m @@ -8,8 +8,6 @@ #import "MPActivityViewControllerHelper.h" #import "MPInstanceProvider.h" - -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000 /** * MPActivityItemProviderWithSubject subclasses UIActivityItemProvider * to provide a subject for email activity types. @@ -47,13 +45,10 @@ } @end -#endif @interface MPActivityViewControllerHelper() -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000 - (UIActivityViewController *)initializeActivityViewControllerWithSubject:(NSString *)subject body:(NSString *)body; -#endif @end @@ -68,7 +63,6 @@ return self; } -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000 - (UIActivityViewController *)initializeActivityViewControllerWithSubject:(NSString *)subject body:(NSString *)body { if (NSClassFromString(@"UIActivityViewController") && NSClassFromString(@"UIActivityItemProvider")) { @@ -76,31 +70,27 @@ [[MPActivityItemProviderWithSubject alloc] initWithSubject:subject body:body]; UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[activityItemProvider] applicationActivities:nil]; - activityViewController.completionHandler = ^ - (NSString* activityType, BOOL completed) { - if ([self.delegate respondsToSelector:@selector(activityViewControllerDidDismiss)]) { - [self.delegate activityViewControllerDidDismiss]; - } - }; + activityViewController.completionWithItemsHandler = ^(UIActivityType _Nullable activityType, BOOL completed, NSArray * _Nullable returnedItems, NSError * _Nullable activityError) { + if ([self.delegate respondsToSelector:@selector(activityViewControllerDidDismiss)]) { + [self.delegate activityViewControllerDidDismiss]; + } + }; return activityViewController; } else { return nil; } } -#endif - (BOOL)presentActivityViewControllerWithSubject:(NSString *)subject body:(NSString *)body { -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000 if (NSClassFromString(@"UIActivityViewController")) { UIActivityViewController *activityViewController = [self initializeActivityViewControllerWithSubject:subject body:body]; if (activityViewController) { if ([self.delegate respondsToSelector:@selector(activityViewControllerWillPresent)]) { [self.delegate activityViewControllerWillPresent]; } -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 - UIUserInterfaceIdiom userInterfaceIdiom = [[[MPCoreInstanceProvider sharedProvider] - sharedCurrentDevice] userInterfaceIdiom]; + + UIUserInterfaceIdiom userInterfaceIdiom = UIDevice.currentDevice.userInterfaceIdiom; // iPad must present as popover on iOS >= 8 if (userInterfaceIdiom == UIUserInterfaceIdiomPad) { if ([activityViewController respondsToSelector:@selector(popoverPresentationController)]) { @@ -108,7 +98,7 @@ [self.delegate viewControllerForPresentingActivityViewController].view; } } -#endif + UIViewController *viewController = [self.delegate viewControllerForPresentingActivityViewController]; [viewController presentViewController:activityViewController animated:YES @@ -116,7 +106,7 @@ return YES; } } -#endif + return NO; } diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdBrowserController.m b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdBrowserController.m index 2392c7ccd3..7308db9cc7 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdBrowserController.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdBrowserController.m @@ -8,44 +8,35 @@ #import "MPAdBrowserController.h" #import "MPLogging.h" -#import "MPLogEvent.h" -#import "MPLogEventRecorder.h" #import "MPAdConfiguration.h" -#import "MPAPIEndPoints.h" +#import "MPAPIEndpoints.h" #import "NSBundle+MPAdditions.h" +#import "MPURLRequest.h" static NSString * const kAdBrowserControllerNibName = @"MPAdBrowserController"; @interface MPAdBrowserController () +@property (weak, nonatomic) IBOutlet UINavigationBar *navigationBar; +@property (weak, nonatomic) IBOutlet NSLayoutConstraint *navigationBarYConstraint; + +@property (weak, nonatomic) IBOutlet UIToolbar *browserControlToolbar; +@property (weak, nonatomic) IBOutlet NSLayoutConstraint *browserControlToolbarBottomConstraint; + +@property (weak, nonatomic) IBOutlet NSLayoutConstraint *webViewTopConstraint; +@property (weak, nonatomic) IBOutlet NSLayoutConstraint *webViewLeadingConstraint; +@property (weak, nonatomic) IBOutlet NSLayoutConstraint *webViewTrailingConstraint; + @property (nonatomic, strong) UIActionSheet *actionSheet; @property (nonatomic, strong) NSString *HTMLString; @property (nonatomic, assign) int webViewLoadCount; -@property (nonatomic) MPLogEvent *dwellEvent; -@property (nonatomic) BOOL hasAppeared; - (void)dismissActionSheet; @end -//////////////////////////////////////////////////////////////////////////////////////////////////// - @implementation MPAdBrowserController -@synthesize webView = _webView; -@synthesize backButton = _backButton; -@synthesize forwardButton = _forwardButton; -@synthesize refreshButton = _refreshButton; -@synthesize safariButton = _safariButton; -@synthesize doneButton = _doneButton; -@synthesize spinnerItem = _spinnerItem; -@synthesize spinner = _spinner; -@synthesize actionSheet = _actionSheet; -@synthesize delegate = _delegate; -@synthesize URL = _URL; -@synthesize webViewLoadCount = _webViewLoadCount; -@synthesize HTMLString = _HTMLString; - #pragma mark - #pragma mark Lifecycle @@ -59,17 +50,11 @@ static NSString * const kAdBrowserControllerNibName = @"MPAdBrowserController"; MPLogDebug(@"Ad browser (%p) initialized with URL: %@", self, self.URL); - self.webView = [[MPWebView alloc] initWithFrame:CGRectZero]; - self.webView.autoresizingMask = UIViewAutoresizingFlexibleWidth | - UIViewAutoresizingFlexibleHeight; - self.spinner = [[UIActivityIndicatorView alloc] initWithFrame:CGRectZero]; [self.spinner sizeToFit]; self.spinner.hidesWhenStopped = YES; self.webViewLoadCount = 0; - - _hasAppeared = NO; } return self; } @@ -100,6 +85,39 @@ static NSString * const kAdBrowserControllerNibName = @"MPAdBrowserController"; self.forwardButton.title = nil; self.spinnerItem.customView = self.spinner; self.spinnerItem.title = nil; + + // If iOS 11, set up autolayout constraints so that the toolbar and web view stay within the safe area + // Note: The web view has to be constrained to the safe area on top for the notch in Portait and leading/trailing + // for the notch in Landscape. Only the bottom of the toolbar needs to be constrained because Apple will move + // the buttons into the safe area automatically in Landscape, and otherwise it's preferable for the toolbar to + // stretch the length of the unsafe area as well. + if (@available(iOS 11, *)) { + // Disable the old constraints + self.navigationBarYConstraint.active = NO; + self.browserControlToolbarBottomConstraint.active = NO; + self.webViewTopConstraint.active = NO; + self.webViewLeadingConstraint.active = NO; + self.webViewTrailingConstraint.active = NO; + + // Set new constraints based on the safe area layout guide + self.navigationBarYConstraint = [self.navigationBar.bottomAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor]; // put nav bar just above safe area + self.browserControlToolbarBottomConstraint = [self.browserControlToolbar.bottomAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.bottomAnchor]; + self.webViewTopConstraint = [self.webView.topAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor]; + self.webViewLeadingConstraint = [self.webView.leadingAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.leadingAnchor]; + self.webViewTrailingConstraint = [self.webView.trailingAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.trailingAnchor]; + + // Enable the new constraints + [NSLayoutConstraint activateConstraints:@[ + self.navigationBarYConstraint, + self.browserControlToolbarBottomConstraint, + self.webViewTopConstraint, + self.webViewLeadingConstraint, + self.webViewTrailingConstraint, + ]]; + } + + // Set web view background color to white so scrolling at extremes won't have a gray background + self.webView.backgroundColor = [UIColor whiteColor]; } - (void)viewWillAppear:(BOOL)animated @@ -117,20 +135,12 @@ static NSString * const kAdBrowserControllerNibName = @"MPAdBrowserController"; { [super viewDidAppear:animated]; - // Track when this view first appears so we can log the time the user stays in the view controller. Creating the event will mark the start of the dwell time. - // Make sure we don't create the event twice. - if (!self.hasAppeared) { - self.dwellEvent = [[MPLogEvent alloc] initWithEventCategory:MPLogEventCategoryAdInteractions eventName:MPLogEventNameClickthroughDwellTime]; - } - - self.hasAppeared = YES; - NSURL *baseURL = (self.URL != nil) ? self.URL : [NSURL URLWithString:[MPAPIEndpoints baseURL]]; if (self.HTMLString) { [self.webView loadHTMLString:self.HTMLString baseURL:baseURL]; } else { - [self.webView loadRequest:[NSURLRequest requestWithURL:self.URL]]; + [self.webView loadRequest:[MPURLRequest requestWithURL:self.URL]]; } } @@ -164,18 +174,6 @@ static NSString * const kAdBrowserControllerNibName = @"MPAdBrowserController"; } else { [self dismissViewControllerAnimated:MP_ANIMATED completion:nil]; } - - if ([self.delegate respondsToSelector:@selector(adConfiguration)]) { - MPAdConfiguration *configuration = [self.delegate adConfiguration]; - - if (configuration) { - MPAdConfigurationLogEventProperties *logProperties = [[MPAdConfigurationLogEventProperties alloc] initWithConfiguration:configuration]; - [self.dwellEvent setLogEventProperties:logProperties]; - [self.dwellEvent recordEndTime]; - - MPAddLogEvent(self.dwellEvent); - } - } } - (IBAction)back @@ -344,11 +342,4 @@ shouldStartLoadWithRequest:(NSURLRequest *)request return image; } -#pragma mark - - -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation -{ - return YES; -} - @end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdBrowserController.xib b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdBrowserController.xib index 661f11519b..f79f27b032 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdBrowserController.xib +++ b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdBrowserController.xib @@ -1,20 +1,31 @@ - - + + + + + - + + + + + + + + + @@ -22,9 +33,15 @@ - + + + + + + + + - @@ -59,13 +76,20 @@ - - - - - - + + + + + + + + + + + + + diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdConfiguration.h b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdConfiguration.h index acbe856dcb..e9a68972f7 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdConfiguration.h +++ b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdConfiguration.h @@ -27,7 +27,6 @@ extern NSString * const kCustomEventClassDataHeaderKey; extern NSString * const kFailUrlHeaderKey; extern NSString * const kHeightHeaderKey; extern NSString * const kImpressionTrackerHeaderKey; -extern NSString * const kInterceptLinksHeaderKey; extern NSString * const kLaunchpageHeaderKey; extern NSString * const kNativeSDKParametersHeaderKey; extern NSString * const kNetworkTypeHeaderKey; @@ -55,6 +54,13 @@ extern NSString * const kAdTypeClear; extern NSString * const kAdTypeNative; extern NSString * const kAdTypeNativeVideo; +extern NSString * const kClickthroughExperimentBrowserAgent; + +extern NSString * const kViewabilityDisableHeaderKey; + +extern NSString * const kBannerImpressionVisableMsHeaderKey; +extern NSString * const kBannerImpressionMinPixelHeaderKey; + @interface MPAdConfiguration : NSObject @property (nonatomic, assign) MPAdType adType; @@ -65,7 +71,6 @@ extern NSString * const kAdTypeNativeVideo; @property (nonatomic, strong) NSURL *impressionTrackingURL; @property (nonatomic, strong) NSURL *failoverURL; @property (nonatomic, strong) NSURL *interceptURLPrefix; -@property (nonatomic, assign) BOOL shouldInterceptLinks; @property (nonatomic, assign) BOOL scrollable; @property (nonatomic, assign) NSTimeInterval refreshInterval; @property (nonatomic, assign) NSTimeInterval adTimeoutInterval; @@ -83,8 +88,9 @@ extern NSString * const kAdTypeNativeVideo; @property (nonatomic, copy) NSString *headerAdType; @property (nonatomic, assign) NSInteger nativeVideoPlayVisiblePercent; @property (nonatomic, assign) NSInteger nativeVideoPauseVisiblePercent; -@property (nonatomic, assign) NSInteger nativeVideoImpressionMinVisiblePercent; -@property (nonatomic, assign) NSTimeInterval nativeVideoImpressionVisible; +@property (nonatomic, assign) CGFloat nativeImpressionMinVisiblePixels; +@property (nonatomic, assign) NSInteger nativeImpressionMinVisiblePercent; // The pixels header takes priority over percentage, but percentage is left for backwards compatibility +@property (nonatomic, assign) NSTimeInterval nativeImpressionMinVisibleTimeInterval; @property (nonatomic, assign) NSTimeInterval nativeVideoMaxBufferingTime; @property (nonatomic) NSDictionary *nativeVideoTrackers; @property (nonatomic, readonly) NSArray *availableRewards; @@ -92,8 +98,13 @@ extern NSString * const kAdTypeNativeVideo; @property (nonatomic, copy) NSString *rewardedVideoCompletionUrl; @property (nonatomic, assign) NSTimeInterval rewardedPlayableDuration; @property (nonatomic, assign) BOOL rewardedPlayableShouldRewardOnClick; -//TODO: Remove `forceUIWebView` once WKWebView is proven -@property (nonatomic, assign) BOOL forceUIWebView; +@property (nonatomic, copy) NSString *advancedBidPayload; + + +// viewable impression tracking experiment +@property (nonatomic) NSTimeInterval impressionMinVisibleTimeInSec; +@property (nonatomic) CGFloat impressionMinVisiblePixels; +@property (nonatomic) BOOL visibleImpressionTrackingEnabled; - (id)initWithHeaders:(NSDictionary *)headers data:(NSData *)data; diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdConfiguration.m b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdConfiguration.m index 038a3ba4e8..254fa8c597 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdConfiguration.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdConfiguration.m @@ -7,12 +7,19 @@ #import "MPAdConfiguration.h" +#import "MOPUBExperimentProvider.h" +#import "MPConsentAdServerKeys.h" +#import "MPConsentManager.h" #import "MPConstants.h" #import "MPLogging.h" -#import "math.h" -#import "NSJSONSerialization+MPAdditions.h" #import "MPRewardedVideoReward.h" +#import "MPViewabilityTracker.h" +#import "NSJSONSerialization+MPAdditions.h" +#import "NSString+MPAdditions.h" + +#if MP_HAS_NATIVE_PACKAGE #import "MPVASTTrackingEvent.h" +#endif NSString * const kAdTypeHeaderKey = @"X-Adtype"; NSString * const kAdUnitWarmingUpHeaderKey = @"X-Warmup"; @@ -24,7 +31,6 @@ NSString * const kCustomEventClassDataHeaderKey = @"X-Custom-Event-Class-Data"; NSString * const kFailUrlHeaderKey = @"X-Failurl"; NSString * const kHeightHeaderKey = @"X-Height"; NSString * const kImpressionTrackerHeaderKey = @"X-Imptracker"; -NSString * const kInterceptLinksHeaderKey = @"X-Interceptlinks"; NSString * const kLaunchpageHeaderKey = @"X-Launchpage"; NSString * const kNativeSDKParametersHeaderKey = @"X-Nativeparams"; NSString * const kNetworkTypeHeaderKey = @"X-Networktype"; @@ -35,19 +41,21 @@ NSString * const kWidthHeaderKey = @"X-Width"; NSString * const kDspCreativeIdKey = @"X-DspCreativeid"; NSString * const kPrecacheRequiredKey = @"X-PrecacheRequired"; NSString * const kIsVastVideoPlayerKey = @"X-VastVideoPlayer"; -//TODO: Remove `kForceUIWebViewKey` once WKWebView is proven -NSString * const kForceUIWebViewKey = @"X-ForceUIWebView"; NSString * const kInterstitialAdTypeHeaderKey = @"X-Fulladtype"; NSString * const kOrientationTypeHeaderKey = @"X-Orientation"; +NSString * const kNativeImpressionMinVisiblePixelsHeaderKey = @"X-Native-Impression-Min-Px"; // The pixels header takes priority over percentage, but percentage is left for backwards compatibility +NSString * const kNativeImpressionMinVisiblePercentHeaderKey = @"X-Impression-Min-Visible-Percent"; +NSString * const kNativeImpressionVisibleMsHeaderKey = @"X-Impression-Visible-Ms"; NSString * const kNativeVideoPlayVisiblePercentHeaderKey = @"X-Play-Visible-Percent"; NSString * const kNativeVideoPauseVisiblePercentHeaderKey = @"X-Pause-Visible-Percent"; -NSString * const kNativeVideoImpressionMinVisiblePercentHeaderKey = @"X-Impression-Min-Visible-Percent"; -NSString * const kNativeVideoImpressionVisibleMsHeaderKey = @"X-Impression-Visible-Ms"; NSString * const kNativeVideoMaxBufferingTimeMsHeaderKey = @"X-Max-Buffer-Ms"; NSString * const kNativeVideoTrackersHeaderKey = @"X-Video-Trackers"; +NSString * const kBannerImpressionVisableMsHeaderKey = @"X-Banner-Impression-Min-Ms"; +NSString * const kBannerImpressionMinPixelHeaderKey = @"X-Banner-Impression-Min-Pixels"; + NSString * const kAdTypeHtml = @"html"; NSString * const kAdTypeInterstitial = @"interstitial"; NSString * const kAdTypeMraid = @"mraid"; @@ -72,11 +80,19 @@ NSString * const kNativeVideoTrackerUrlsHeaderKey = @"urls"; NSString * const kNativeVideoTrackerEventDictionaryKey = @"event"; NSString * const kNativeVideoTrackerTextDictionaryKey = @"text"; +// clickthrough experiment +NSString * const kClickthroughExperimentBrowserAgent = @"X-Browser-Agent"; +static const NSInteger kMaximumVariantForClickthroughExperiment = 2; + +// viewability +NSString * const kViewabilityDisableHeaderKey = @"X-Disable-Viewability"; + @interface MPAdConfiguration () @property (nonatomic, copy) NSString *adResponseHTMLString; @property (nonatomic, strong, readwrite) NSArray *availableRewards; +@property (nonatomic) MOPUBDisplayAgentType clickthroughExperimentBrowserAgent; - (MPAdType)adTypeFromHeaders:(NSDictionary *)headers; - (NSString *)networkTypeFromHeaders:(NSDictionary *)headers; @@ -116,8 +132,6 @@ NSString * const kNativeVideoTrackerTextDictionaryKey = @"text"; self.interceptURLPrefix = [self URLFromHeaders:headers forKey:kLaunchpageHeaderKey]; - NSNumber *shouldInterceptLinks = [headers objectForKey:kInterceptLinksHeaderKey]; - self.shouldInterceptLinks = shouldInterceptLinks ? [shouldInterceptLinks boolValue] : YES; self.scrollable = [[headers objectForKey:kScrollableHeaderKey] boolValue]; self.refreshInterval = [self refreshIntervalFromHeaders:headers]; self.adTimeoutInterval = [self timeIntervalFromHeaders:headers forKey:kAdTimeoutHeaderKey]; @@ -139,8 +153,6 @@ NSString * const kNativeVideoTrackerTextDictionaryKey = @"text"; self.isVastVideoPlayer = [[headers objectForKey:kIsVastVideoPlayerKey] boolValue]; - self.forceUIWebView = [[headers objectForKey:kForceUIWebViewKey] boolValue]; - self.creationTimestamp = [NSDate date]; self.creativeId = [headers objectForKey:kCreativeIdHeaderKey]; @@ -151,14 +163,19 @@ NSString * const kNativeVideoTrackerTextDictionaryKey = @"text"; self.nativeVideoPauseVisiblePercent = [self percentFromHeaders:headers forKey:kNativeVideoPauseVisiblePercentHeaderKey]; - self.nativeVideoImpressionMinVisiblePercent = [self percentFromHeaders:headers forKey:kNativeVideoImpressionMinVisiblePercentHeaderKey]; + self.nativeImpressionMinVisiblePixels = [[self adAmountFromHeaders:headers key:kNativeImpressionMinVisiblePixelsHeaderKey] floatValue]; - self.nativeVideoImpressionVisible = [self timeIntervalFromMsHeaders:headers forKey:kNativeVideoImpressionVisibleMsHeaderKey]; + self.nativeImpressionMinVisiblePercent = [self percentFromHeaders:headers forKey:kNativeImpressionMinVisiblePercentHeaderKey]; + + self.nativeImpressionMinVisibleTimeInterval = [self timeIntervalFromMsHeaders:headers forKey:kNativeImpressionVisibleMsHeaderKey]; self.nativeVideoMaxBufferingTime = [self timeIntervalFromMsHeaders:headers forKey:kNativeVideoMaxBufferingTimeMsHeaderKey]; - +#if MP_HAS_NATIVE_PACKAGE self.nativeVideoTrackers = [self nativeVideoTrackersFromHeaders:headers key:kNativeVideoTrackersHeaderKey]; +#endif + self.impressionMinVisibleTimeInSec = [self timeIntervalFromMsHeaders:headers forKey:kBannerImpressionVisableMsHeaderKey]; + self.impressionMinVisiblePixels = [[self adAmountFromHeaders:headers key:kBannerImpressionMinPixelHeaderKey] floatValue]; // rewarded video @@ -199,6 +216,27 @@ NSString * const kNativeVideoTrackerTextDictionaryKey = @"text"; // rewarded playables self.rewardedPlayableDuration = [self timeIntervalFromHeaders:headers forKey:kRewardedPlayableDurationHeaderKey]; self.rewardedPlayableShouldRewardOnClick = [[headers objectForKey:kRewardedPlayableRewardOnClickHeaderKey] boolValue]; + + // clickthrough experiment + self.clickthroughExperimentBrowserAgent = [self clickthroughExperimentVariantFromHeaders:headers forKey:kClickthroughExperimentBrowserAgent]; + [MOPUBExperimentProvider setDisplayAgentFromAdServer:self.clickthroughExperimentBrowserAgent]; + + // viewability + NSString * disabledViewabilityValue = [headers objectForKey:kViewabilityDisableHeaderKey]; + NSNumber * disabledViewabilityVendors = disabledViewabilityValue != nil ? [disabledViewabilityValue safeIntegerValue] : nil; + if (disabledViewabilityVendors != nil && + [disabledViewabilityVendors integerValue] >= MPViewabilityOptionNone && + [disabledViewabilityVendors integerValue] <= MPViewabilityOptionAll) { + MPViewabilityOption vendorsToDisable = (MPViewabilityOption)([disabledViewabilityVendors integerValue]); + [MPViewabilityTracker disableViewability:vendorsToDisable]; + } + + // consent + [[MPConsentManager sharedManager] forceStatusShouldForceExplicitNo:[headers[kForceExplicitNoKey] boolValue] + shouldInvalidateConsent:[headers[kInvalidateConsentKey] boolValue] + shouldReacquireConsent:[headers[kReacquireConsentKey] boolValue] + consentChangeReason:headers[kConsentChangedReasonKey] + shouldBroadcast:YES]; } return self; } @@ -397,6 +435,7 @@ NSString * const kNativeVideoTrackerTextDictionaryKey = @"text"; } } +#if MP_HAS_NATIVE_PACKAGE - (NSDictionary *)nativeVideoTrackersFromHeaders:(NSDictionary *)headers key:(NSString *)key { NSDictionary *dictFromHeader = [self dictionaryFromHeaders:headers forKey:key]; @@ -434,6 +473,8 @@ NSString * const kNativeVideoTrackerTextDictionaryKey = @"text"; } } +#endif + - (NSArray *)parseAvailableRewardsFromHeaders:(NSDictionary *)headers { // The X-Rewarded-Currencies header key doesn't exist. This is probably // not a rewarded ad. @@ -463,4 +504,27 @@ NSString * const kNativeVideoTrackerTextDictionaryKey = @"text"; return availableRewards; } +- (MOPUBDisplayAgentType)clickthroughExperimentVariantFromHeaders:(NSDictionary *)headers forKey:(NSString *)key +{ + NSString *variantString = [headers objectForKey:key]; + NSInteger variant = 0; + if (variantString) { + int parsedInt = -1; + BOOL isNumber = [[NSScanner scannerWithString:variantString] scanInt:&parsedInt]; + if (isNumber && parsedInt >= 0 && parsedInt <= kMaximumVariantForClickthroughExperiment) { + variant = parsedInt; + } + } + + return variant; +} + +- (BOOL)visibleImpressionTrackingEnabled +{ + if (self.impressionMinVisibleTimeInSec < 0 || self.impressionMinVisiblePixels <= 0) { + return NO; + } + return YES; +} + @end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdDestinationDisplayAgent.h b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdDestinationDisplayAgent.h index ff7b3fb543..18721804a4 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdDestinationDisplayAgent.h +++ b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdDestinationDisplayAgent.h @@ -11,6 +11,7 @@ #import "MPProgressOverlayView.h" #import "MPAdBrowserController.h" #import "MPStoreKitProvider.h" +#import "MOPUBDisplayAgentType.h" @protocol MPAdDestinationDisplayAgentDelegate; @@ -22,6 +23,7 @@ @property (nonatomic, weak) id delegate; + (MPAdDestinationDisplayAgent *)agentWithDelegate:(id)delegate; ++ (BOOL)shouldUseSafariViewController; - (void)displayDestinationForURL:(NSURL *)URL; - (void)cancel; diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdDestinationDisplayAgent.m b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdDestinationDisplayAgent.m index 4ef1a35aae..27a0f8204f 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdDestinationDisplayAgent.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdDestinationDisplayAgent.m @@ -12,23 +12,25 @@ #import "NSURL+MPAdditions.h" #import "MPCoreInstanceProvider.h" #import "MPAnalyticsTracker.h" +#import "MOPUBExperimentProvider.h" +#import static NSString * const kDisplayAgentErrorDomain = @"com.mopub.displayagent"; //////////////////////////////////////////////////////////////////////////////////////////////////// -@interface MPAdDestinationDisplayAgent () +@interface MPAdDestinationDisplayAgent () @property (nonatomic, strong) MPURLResolver *resolver; @property (nonatomic, strong) MPURLResolver *enhancedDeeplinkFallbackResolver; @property (nonatomic, strong) MPProgressOverlayView *overlayView; @property (nonatomic, assign) BOOL isLoadingDestination; - -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= MP_IOS_6_0 +@property (nonatomic) MOPUBDisplayAgentType displayAgentType; @property (nonatomic, strong) SKStoreProductViewController *storeKitController; -#endif @property (nonatomic, strong) MPAdBrowserController *browserController; +@property (nonatomic, strong) SFSafariViewController *safariController; + @property (nonatomic, strong) MPTelephoneConfirmationController *telephoneConfirmationController; @property (nonatomic, strong) MPActivityViewControllerHelper *activityViewControllerHelper; @@ -53,6 +55,7 @@ static NSString * const kDisplayAgentErrorDomain = @"com.mopub.displayagent"; agent.delegate = delegate; agent.overlayView = [[MPProgressOverlayView alloc] initWithDelegate:agent]; agent.activityViewControllerHelper = [[MPActivityViewControllerHelper alloc] initWithDelegate:agent]; + agent.displayAgentType = [MOPUBExperimentProvider displayAgentType]; return agent; } @@ -61,13 +64,13 @@ static NSString * const kDisplayAgentErrorDomain = @"com.mopub.displayagent"; [self dismissAllModalContent]; self.overlayView.delegate = nil; -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= MP_IOS_6_0 + // XXX: If this display agent is deallocated while a StoreKit controller is still on-screen, // nil-ing out the controller's delegate would leave us with no way to dismiss the controller // in the future. Therefore, we change the controller's delegate to a singleton object which // implements SKStoreProductViewControllerDelegate and is always around. self.storeKitController.delegate = [MPLastResortDelegate sharedDelegate]; -#endif + self.browserController.delegate = nil; } @@ -88,15 +91,13 @@ static NSString * const kDisplayAgentErrorDomain = @"com.mopub.displayagent"; [self.resolver cancel]; [self.enhancedDeeplinkFallbackResolver cancel]; - __weak typeof(self) weakSelf = self; - self.resolver = [[MPCoreInstanceProvider sharedProvider] buildMPURLResolverWithURL:URL completion:^(MPURLActionInfo *suggestedAction, NSError *error) { - typeof(self) strongSelf = weakSelf; - if (strongSelf) { - if (error) { - [strongSelf failedToResolveURLWithError:error]; - } else { - [strongSelf handleSuggestedURLAction:suggestedAction isResolvingEnhancedDeeplink:NO]; - } + __weak __typeof__(self) weakSelf = self; + self.resolver = [MPURLResolver resolverWithURL:URL completion:^(MPURLActionInfo *suggestedAction, NSError *error) { + __typeof__(self) strongSelf = weakSelf; + if (error) { + [strongSelf failedToResolveURLWithError:error]; + } else { + [strongSelf handleSuggestedURLAction:suggestedAction isResolvingEnhancedDeeplink:NO]; } }]; @@ -124,8 +125,7 @@ static NSString * const kDisplayAgentErrorDomain = @"com.mopub.displayagent"; switch (actionInfo.actionType) { case MPURLActionTypeStoreKit: - [self showStoreKitProductWithParameter:actionInfo.iTunesItemIdentifier - fallbackURL:actionInfo.iTunesStoreFallbackURL]; + [self showStoreKitWithAction:actionInfo]; break; case MPURLActionTypeGenericDeeplink: [self openURLInApplication:actionInfo.deeplinkURL]; @@ -144,11 +144,10 @@ static NSString * const kDisplayAgentErrorDomain = @"com.mopub.displayagent"; [self openURLInApplication:actionInfo.safariDestinationURL]; break; case MPURLActionTypeOpenInWebView: - [self showWebViewWithHTMLString:actionInfo.HTTPResponseString - baseURL:actionInfo.webViewBaseURL]; + [self showWebViewWithHTMLString:actionInfo.HTTPResponseString baseURL:actionInfo.webViewBaseURL actionType:MPURLActionTypeOpenInWebView]; break; case MPURLActionTypeOpenURLInWebView: - [self showWebViewWithURL:actionInfo.originalURL]; + [self showWebViewWithHTMLString:actionInfo.HTTPResponseString baseURL:actionInfo.originalURL actionType:MPURLActionTypeOpenInWebView]; break; case MPURLActionTypeShare: [self openShareURL:actionInfo.shareURL]; @@ -179,46 +178,60 @@ static NSString * const kDisplayAgentErrorDomain = @"com.mopub.displayagent"; - (void)handleEnhancedDeeplinkFallbackForRequest:(MPEnhancedDeeplinkRequest *)request; { - __weak typeof(self) weakSelf = self; + __weak __typeof__(self) weakSelf = self; [self.enhancedDeeplinkFallbackResolver cancel]; - self.enhancedDeeplinkFallbackResolver = [[MPCoreInstanceProvider sharedProvider] buildMPURLResolverWithURL:request.fallbackURL completion:^(MPURLActionInfo *actionInfo, NSError *error) { - typeof(self) strongSelf = weakSelf; - if (strongSelf) { - if (error) { - // If the resolver fails, just treat the entire original URL as a regular deeplink. - [strongSelf openURLInApplication:request.originalURL]; - } else { - // Otherwise, the resolver will return us a URL action. We process that action - // normally with one exception: we don't follow any nested enhanced deeplinks. - BOOL success = [strongSelf handleSuggestedURLAction:actionInfo isResolvingEnhancedDeeplink:YES]; - if (success) { - [[[MPCoreInstanceProvider sharedProvider] sharedMPAnalyticsTracker] sendTrackingRequestForURLs:request.fallbackTrackingURLs]; - } + self.enhancedDeeplinkFallbackResolver = [MPURLResolver resolverWithURL:request.fallbackURL completion:^(MPURLActionInfo *actionInfo, NSError *error) { + __typeof__(self) strongSelf = weakSelf; + if (error) { + // If the resolver fails, just treat the entire original URL as a regular deeplink. + [strongSelf openURLInApplication:request.originalURL]; + } + else { + // Otherwise, the resolver will return us a URL action. We process that action + // normally with one exception: we don't follow any nested enhanced deeplinks. + BOOL success = [strongSelf handleSuggestedURLAction:actionInfo isResolvingEnhancedDeeplink:YES]; + if (success) { + [[[MPCoreInstanceProvider sharedProvider] sharedMPAnalyticsTracker] sendTrackingRequestForURLs:request.fallbackTrackingURLs]; } } }]; [self.enhancedDeeplinkFallbackResolver start]; } -- (void)showWebViewWithHTMLString:(NSString *)HTMLString baseURL:(NSURL *)URL -{ - self.browserController = [[MPAdBrowserController alloc] initWithURL:URL - HTMLString:HTMLString - delegate:self]; - [self showAdBrowserController:self.browserController]; +- (void)showWebViewWithHTMLString:(NSString *)HTMLString baseURL:(NSURL *)URL actionType:(MPURLActionType)actionType { + switch (self.displayAgentType) { + case MOPUBDisplayAgentTypeInApp: + case MOPUBDisplayAgentTypeSafariViewController: + if ([MPAdDestinationDisplayAgent shouldUseSafariViewController]) { + if (@available(iOS 9.0, *)) { + self.safariController = [[SFSafariViewController alloc] initWithURL:URL]; + self.safariController.delegate = self; + } + } else { + if (actionType == MPURLActionTypeOpenInWebView) { + self.browserController = [[MPAdBrowserController alloc] initWithURL:URL + HTMLString:HTMLString + delegate:self]; + } else { + self.browserController = [[MPAdBrowserController alloc] initWithURL:URL + delegate:self]; + } + } + [self showAdBrowserController]; + break; + case MOPUBDisplayAgentTypeNativeSafari: + [self openURLInApplication:URL]; + break; + } } -- (void)showWebViewWithURL:(NSURL *)URL { - self.browserController = [[MPAdBrowserController alloc] initWithURL:URL - delegate:self]; - [self showAdBrowserController:self.browserController]; -} - -- (void)showAdBrowserController:(MPAdBrowserController *)adBrowserController { +- (void)showAdBrowserController { [self hideOverlay]; - self.browserController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; - [[self.delegate viewControllerForPresentingModalView] presentViewController:self.browserController + UIViewController *browserViewController = self.safariController ? self.safariController : self.browserController; + + browserViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; + [[self.delegate viewControllerForPresentingModalView] presentViewController:browserViewController animated:MP_ANIMATED completion:nil]; } @@ -291,7 +304,6 @@ static NSString * const kDisplayAgentErrorDomain = @"com.mopub.displayagent"; - (void)presentStoreKitControllerWithItemIdentifier:(NSString *)identifier fallbackURL:(NSURL *)URL { -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= MP_IOS_6_0 self.storeKitController = [MPStoreKitProvider buildController]; self.storeKitController.delegate = self; @@ -301,7 +313,6 @@ static NSString * const kDisplayAgentErrorDomain = @"com.mopub.displayagent"; [self hideOverlay]; [[self.delegate viewControllerForPresentingModalView] presentViewController:self.storeKitController animated:MP_ANIMATED completion:nil]; -#endif } #pragma mark - @@ -329,6 +340,13 @@ static NSString * const kDisplayAgentErrorDomain = @"com.mopub.displayagent"; return nil; } +#pragma mark - + +- (void)safariViewControllerDidFinish:(SFSafariViewController *)controller { + self.isLoadingDestination = NO; + [self.delegate displayAgentDidDismissModal]; +} + #pragma mark - - (void)overlayCancelButtonPressed @@ -345,6 +363,16 @@ static NSString * const kDisplayAgentErrorDomain = @"com.mopub.displayagent"; }]; } ++ (BOOL)shouldUseSafariViewController +{ + MOPUBDisplayAgentType displayAgentType = [MOPUBExperimentProvider displayAgentType]; + if (@available(iOS 9.0, *)) { + return (displayAgentType == MOPUBDisplayAgentTypeSafariViewController); + } + + return NO; +} + - (void)hideOverlay { [self.overlayView hide]; @@ -369,4 +397,22 @@ static NSString * const kDisplayAgentErrorDomain = @"com.mopub.displayagent"; [self.delegate displayAgentDidDismissModal]; } +#pragma mark - Experiment with 3 display agent types: 0 -> keep existing, 1 -> use native safari, 2 -> use SafariViewController + +- (void)showStoreKitWithAction:(MPURLActionInfo *)actionInfo +{ + switch (self.displayAgentType) { + case MOPUBDisplayAgentTypeInApp: + case MOPUBDisplayAgentTypeSafariViewController: // It doesn't make sense to open store kit in SafariViewController so storeKitController is used here. + [self showStoreKitProductWithParameter:actionInfo.iTunesItemIdentifier + fallbackURL:actionInfo.iTunesStoreFallbackURL]; + break; + case MOPUBDisplayAgentTypeNativeSafari: + [self openURLInApplication:actionInfo.iTunesStoreFallbackURL]; + break; + default: + break; + } +} + @end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdImpressionTimer.h b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdImpressionTimer.h new file mode 100644 index 0000000000..6fc9d633a0 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdImpressionTimer.h @@ -0,0 +1,58 @@ +// +// MPAdImpressionTimer.h +// +// Copyright © 2017 MoPub. All rights reserved. +// + +#import +#import + +@protocol MPAdImpressionTimerDelegate + +@required + +/* + * Called when the required visibility time has been satisfied. This delegate method + * will only be called once for the lifetime of this object. + */ +- (void)adViewWillLogImpression:(UIView *)adView; + +@end + +@interface MPAdImpressionTimer : NSObject + +@property (nonatomic, weak) id delegate; + +/* + * Initializes and returns an object that will tell its delegate certain number of pixels of the view + * has been visible for a given amount of time. + * + * requiredSecondsForImpression represents the number of seconds a view needs to be visible for impression counting. Range of the value: [0, infinite). + * visibilityPixels is a float number, ranging from [0, infinite) . For example, 1 represents 1 pixel. + */ +- (instancetype)initWithRequiredSecondsForImpression:(NSTimeInterval)requiredSecondsForImpression requiredViewVisibilityPixels:(CGFloat)visibilityPixels NS_DESIGNATED_INITIALIZER; + +/* + * Initializes and returns an `MPAdImpressionTimer` instance which will alert its delegate when the given + * percentage of a view (given by `startTrackingView`) has been visible for the given amount of time. + * + * requiredSecondsForImpression represents the number of seconds a view needs to be visible to count an impression. Range of the value: [0, infinite). + * visibilityPercentage is a float number, ranging from [0, 1]. 0 represents 0%, and 1 represents 100%. + */ +- (instancetype)initWithRequiredSecondsForImpression:(NSTimeInterval)requiredSecondsForImpression requiredViewVisibilityPercentage:(CGFloat)visibilityPercentage NS_DESIGNATED_INITIALIZER; + +/* + * Starts tracking a view based on the rules given in `initWithRequiredSecondsForImpression:requiredViewVisibilityPixels` + * or `initWithRequiredSecondsForImpression:requiredViewVisibilityPercentage`. Calls `adViewWillLogImpression:` on the + * delegate when an impression has been tracked. + * + * view is the view to track + */ +- (void)startTrackingView:(UIView *)view; + +/** + * `init` is not available. + */ +- (instancetype)init __attribute__((unavailable("init not available"))); + +@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdImpressionTimer.m b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdImpressionTimer.m new file mode 100644 index 0000000000..a9ffe04c0a --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdImpressionTimer.m @@ -0,0 +1,122 @@ +// +// MPAdImpressionTimer.m +// +// Copyright © 2017 MoPub. All rights reserved. +// + +#import "MPAdImpressionTimer.h" +#import "MPTimer.h" +#import "MPGlobal.h" +#import "MPLogging.h" + +@interface MPAdImpressionTimer () + +@property (nonatomic) UIView *adView; +@property (nonatomic) MPTimer *viewVisibilityTimer; +@property (nonatomic) NSTimeInterval firstVisibilityTimestamp; +@property (nonatomic) CGFloat pixelsRequiredForViewVisibility; +@property (nonatomic) CGFloat percentageRequiredForViewVisibility; +@property (nonatomic) NSTimeInterval requiredSecondsForImpression; + +@end + +@implementation MPAdImpressionTimer + +static const CGFloat kImpressionTimerInterval = 0.1; +static const NSTimeInterval kFirstVisibilityTimestampNone = -1; +static const CGFloat kDefaultPixelCountWhenUsingPercentage = CGFLOAT_MIN; + +- (instancetype)initWithRequiredSecondsForImpression:(NSTimeInterval)requiredSecondsForImpression requiredViewVisibilityPixels:(CGFloat)visibilityPixels +{ + if (self = [super init]) { + _viewVisibilityTimer = [MPTimer timerWithTimeInterval:kImpressionTimerInterval target:self selector:@selector(tick:) repeats:YES]; + _viewVisibilityTimer.runLoopMode = NSRunLoopCommonModes; + _requiredSecondsForImpression = requiredSecondsForImpression; + _pixelsRequiredForViewVisibility = visibilityPixels; + _firstVisibilityTimestamp = kFirstVisibilityTimestampNone; + } + + return self; +} + +- (instancetype)initWithRequiredSecondsForImpression:(NSTimeInterval)requiredSecondsForImpression requiredViewVisibilityPercentage:(CGFloat)visibilityPercentage +{ + if (self = [super init]) { + // Set `pixelsRequiredForViewVisibility` to a default invalid value so that we know to use the percent directly instead. + _pixelsRequiredForViewVisibility = kDefaultPixelCountWhenUsingPercentage; + + _viewVisibilityTimer = [MPTimer timerWithTimeInterval:kImpressionTimerInterval target:self selector:@selector(tick:) repeats:YES]; + _viewVisibilityTimer.runLoopMode = NSRunLoopCommonModes; + _requiredSecondsForImpression = requiredSecondsForImpression; + _percentageRequiredForViewVisibility = visibilityPercentage; + _firstVisibilityTimestamp = kFirstVisibilityTimestampNone; + } + + return self; +} + +- (void)dealloc +{ + [_viewVisibilityTimer invalidate]; + _delegate = nil; + _viewVisibilityTimer = nil; +} + +- (void)startTrackingView:(UIView *)view +{ + if (!view) { + MPLogError(@"Cannot track empty view"); + return; + } + + if (self.viewVisibilityTimer.isScheduled) { + MPLogWarn(@"viewVisibilityTimer is already started."); + return; + } + + [self.viewVisibilityTimer scheduleNow]; + self.adView = view; +} + +#pragma mark - MPTimer + +- (void)tick:(MPTimer *)timer +{ + CGFloat adViewArea = CGRectGetWidth(self.adView.bounds) * CGRectGetHeight(self.adView.bounds); + if (adViewArea == 0) { + MPLogError(@"ad view area cannot be 0"); + return; + } + + // If using pixels, recalculate the percent of the view that the pixels take up in case the view has resized + // since the previous tick. If using percent, this is irrelevant. + if (self.pixelsRequiredForViewVisibility != kDefaultPixelCountWhenUsingPercentage) { + // The following comment explains the meaning of Ads visible. + // Assume adView frame: (0, 0, 10, 10), self.requiredViewVisibilityPixels = 1. + // We get adViewArea = 10 * 10 = 100. percentVisible = (1 * 1) / 100 = 0.01 + // In this case, adView is considerated to be visible when the ratio of adView's intersection area with it's parent window is >= 0.01. + self.percentageRequiredForViewVisibility = (self.pixelsRequiredForViewVisibility * self.pixelsRequiredForViewVisibility) / adViewArea; + } + + // Calculate visibility based on percent + BOOL visible = MPViewIsVisible(self.adView) && MPViewIntersectsParentWindowWithPercent(self.adView, self.percentageRequiredForViewVisibility) && ([[UIApplication sharedApplication] applicationState] == UIApplicationStateActive); + + if (visible) { + NSTimeInterval now = [[NSDate date] timeIntervalSinceReferenceDate]; + + if (self.firstVisibilityTimestamp == kFirstVisibilityTimestampNone) { + self.firstVisibilityTimestamp = now; + } else if (now - self.firstVisibilityTimestamp >= self.requiredSecondsForImpression) { + // Invalidate the timer and tell the delegate it should track an impression. + self.firstVisibilityTimestamp = kFirstVisibilityTimestampNone; + [self.viewVisibilityTimer invalidate]; + self.viewVisibilityTimer = nil; + + [self.delegate adViewWillLogImpression:self.adView]; + } + } else { + self.firstVisibilityTimestamp = kFirstVisibilityTimestampNone; + } +} + +@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdServerCommunicator.h b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdServerCommunicator.h index ce4bdf016d..7ca853a411 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdServerCommunicator.h +++ b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdServerCommunicator.h @@ -14,7 +14,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// -@interface MPAdServerCommunicator : NSObject +@interface MPAdServerCommunicator : NSObject @property (nonatomic, weak) id delegate; @property (nonatomic, assign, readonly) BOOL loading; @@ -31,7 +31,7 @@ @protocol MPAdServerCommunicatorDelegate @required -- (void)communicatorDidReceiveAdConfiguration:(MPAdConfiguration *)configuration; +- (void)communicatorDidReceiveAdConfigurations:(NSArray *)configurations; - (void)communicatorDidFailWithError:(NSError *)error; @end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdServerCommunicator.m b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdServerCommunicator.m index 74837e168b..07a11246b4 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdServerCommunicator.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdServerCommunicator.m @@ -7,27 +7,41 @@ #import "MPAdServerCommunicator.h" +#import "MoPub.h" #import "MPAdConfiguration.h" -#import "MPLogging.h" +#import "MPAPIEndpoints.h" #import "MPCoreInstanceProvider.h" -#import "MPLogEvent.h" -#import "MPLogEventRecorder.h" +#import "MPError.h" +#import "MPHTTPNetworkSession.h" +#import "MPLogging.h" +#import "MPURLRequest.h" -const NSTimeInterval kRequestTimeoutInterval = 10.0; +// Ad response header +static NSString * const kAdResponseTypeHeaderKey = @"X-Ad-Response-Type"; +static NSString * const kAdResponseTypeMultipleResponse = @"multi"; + +// Multiple response JSON fields +static NSString * const kMultiAdResponsesKey = @"ad-responses"; +static NSString * const kMultiAdResponsesHeadersKey = @"headers"; +static NSString * const kMultiAdResponsesBodyKey = @"body"; +static NSString * const kMultiAdResponsesAdMarkupKey = @"adm"; //////////////////////////////////////////////////////////////////////////////////////////////////// @interface MPAdServerCommunicator () @property (nonatomic, assign, readwrite) BOOL loading; -@property (nonatomic, copy) NSURL *URL; -@property (nonatomic, strong) NSURLConnection *connection; -@property (nonatomic, strong) NSMutableData *responseData; -@property (nonatomic, strong) NSDictionary *responseHeaders; -@property (nonatomic, strong) MPLogEvent *adRequestLatencyEvent; +@property (nonatomic, strong) NSURLSessionTask * task; -- (NSError *)errorForStatusCode:(NSInteger)statusCode; -- (NSURLRequest *)adRequestForURL:(NSURL *)URL; +@end + +@interface MPAdServerCommunicator (Consent) + +/** + Removes all ads.mopub.com cookies that are presently saved in NSHTTPCookieStorage to avoid inadvertently + sending personal data across the wire via cookies. This method is expected to be called every ad request. + */ +- (void)removeAllMoPubCookies; @end @@ -35,13 +49,6 @@ const NSTimeInterval kRequestTimeoutInterval = 10.0; @implementation MPAdServerCommunicator -@synthesize delegate = _delegate; -@synthesize URL = _URL; -@synthesize connection = _connection; -@synthesize responseData = _responseData; -@synthesize responseHeaders = _responseHeaders; -@synthesize loading = _loading; - - (id)initWithDelegate:(id)delegate { self = [super init]; @@ -53,8 +60,7 @@ const NSTimeInterval kRequestTimeoutInterval = 10.0; - (void)dealloc { - [self.connection cancel]; - + [self.task cancel]; } #pragma mark - Public @@ -62,83 +68,120 @@ const NSTimeInterval kRequestTimeoutInterval = 10.0; - (void)loadURL:(NSURL *)URL { [self cancel]; - self.URL = URL; - // Start tracking how long it takes to successfully or unsuccessfully retrieve an ad. - self.adRequestLatencyEvent = [[MPLogEvent alloc] initWithEventCategory:MPLogEventCategoryRequests eventName:MPLogEventNameAdRequest]; - self.adRequestLatencyEvent.requestURI = URL.absoluteString; + // Delete any cookies previous creatives have set before starting the load + [self removeAllMoPubCookies]; + + // Check to be sure the SDK is initialized before starting the request + if (!MoPub.sharedInstance.isSdkInitialized) { + [self failLoadForSDKInit]; + } + + // Generate request + MPURLRequest * request = [[MPURLRequest alloc] initWithURL:URL]; + + __weak __typeof__(self) weakSelf = self; + self.task = [MPHTTPNetworkSession startTaskWithHttpRequest:request responseHandler:^(NSData * data, NSHTTPURLResponse * response) { + // Capture strong self for the duration of this block. + __typeof__(self) strongSelf = weakSelf; + + // Status code indicates an error. + if (response.statusCode >= 400) { + [strongSelf didFailWithError:[strongSelf errorForStatusCode:response.statusCode]]; + return; + } + + // Handle the response. + [strongSelf didFinishLoadingWithData:data headers:response.allHeaderFields]; + + } errorHandler:^(NSError * error) { + // Capture strong self for the duration of this block. + __typeof__(self) strongSelf = weakSelf; + + // Handle the error. + [strongSelf didFailWithError:error]; + }]; - self.connection = [NSURLConnection connectionWithRequest:[self adRequestForURL:URL] - delegate:self]; self.loading = YES; } - (void)cancel { - self.adRequestLatencyEvent = nil; self.loading = NO; - [self.connection cancel]; - self.connection = nil; - self.responseData = nil; - self.responseHeaders = nil; + [self.task cancel]; + self.task = nil; } -#pragma mark - NSURLConnection delegate (NSURLConnectionDataDelegate in iOS 5.0+) - -- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response -{ - if ([response respondsToSelector:@selector(statusCode)]) { - NSInteger statusCode = [(NSHTTPURLResponse *)response statusCode]; - if (statusCode >= 400) { - // Do not record a logging event if we failed to make a connection. - self.adRequestLatencyEvent = nil; - - [connection cancel]; - self.loading = NO; - [self.delegate communicatorDidFailWithError:[self errorForStatusCode:statusCode]]; - return; - } - } - - self.responseData = [NSMutableData data]; - self.responseHeaders = [(NSHTTPURLResponse *)response allHeaderFields]; +- (void)failLoadForSDKInit { + MPLogError(@"Warning: Ad requested before initializing MoPub SDK. MoPub SDK 5.2.0 will require initializeSdkWithConfiguration:completion: to be called on MoPub.sharedInstance before attempting to load ads. Please update your integration as soon as possible."); } -- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data -{ - [self.responseData appendData:data]; -} - -- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error -{ - // Do not record a logging event if we failed to make a connection. - self.adRequestLatencyEvent = nil; +#pragma mark - Handlers +- (void)didFailWithError:(NSError *)error { + // Do not record a logging event if we failed. self.loading = NO; [self.delegate communicatorDidFailWithError:error]; } -- (void)connectionDidFinishLoading:(NSURLConnection *)connection -{ - [self.adRequestLatencyEvent recordEndTime]; - self.adRequestLatencyEvent.requestStatusCode = 200; +- (void)didFinishLoadingWithData:(NSData *)data headers:(NSDictionary *)headers { + NSArray *configurations; + // Single ad response + if (![headers[kAdResponseTypeHeaderKey] isEqualToString:kAdResponseTypeMultipleResponse]) { + MPAdConfiguration *configuration = [[MPAdConfiguration alloc] initWithHeaders:headers + data:data]; + configurations = @[configuration]; + } + // Multiple ad responses + else { + // The response data is a JSON payload conforming to the structure: + // ad-responses: [ + // { + // headers: { x-adtype: html, ... }, + // body: " ... ", + // adm: "some ad markup" + // }, + // ... + // ] + NSError * error = nil; + NSDictionary * json = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&error]; + if (error) { + MPLogError(@"Failed to parse multiple ad response JSON: %@", error.localizedDescription); + self.loading = NO; + [self.delegate communicatorDidFailWithError:error]; + return; + } - MPAdConfiguration *configuration = [[MPAdConfiguration alloc] - initWithHeaders:self.responseHeaders - data:self.responseData]; - MPAdConfigurationLogEventProperties *logEventProperties = - [[MPAdConfigurationLogEventProperties alloc] initWithConfiguration:configuration]; + NSArray * responses = json[kMultiAdResponsesKey]; + if (responses == nil) { + MPLogError(@"No ad responses"); + self.loading = NO; + [self.delegate communicatorDidFailWithError:[MOPUBError errorWithCode:MOPUBErrorUnableToParseJSONAdResponse]]; + return; + } - // Do not record ads that are warming up. - if (configuration.adUnitWarmingUp) { - self.adRequestLatencyEvent = nil; - } else { - [self.adRequestLatencyEvent setLogEventProperties:logEventProperties]; - MPAddLogEvent(self.adRequestLatencyEvent); + MPLogInfo(@"There are %ld ad responses", responses.count); + + NSMutableArray * responseConfigurations = [NSMutableArray arrayWithCapacity:responses.count]; + for (NSDictionary * responseJson in responses) { + NSDictionary * headers = responseJson[kMultiAdResponsesHeadersKey]; + NSData * body = [responseJson[kMultiAdResponsesBodyKey] dataUsingEncoding:NSUTF8StringEncoding]; + + MPAdConfiguration * configuration = [[MPAdConfiguration alloc] initWithHeaders:headers data:body]; + if (configuration) { + configuration.advancedBidPayload = responseJson[kMultiAdResponsesAdMarkupKey]; + [responseConfigurations addObject:configuration]; + } + else { + MPLogInfo(@"Failed to generate configuration from\nheaders:\n%@\nbody:\n%@", headers, responseJson[kMultiAdResponsesBodyKey]); + } + } + + configurations = [NSArray arrayWithArray:responseConfigurations]; } self.loading = NO; - [self.delegate communicatorDidReceiveAdConfiguration:configuration]; + [self.delegate communicatorDidReceiveAdConfigurations:configurations]; } #pragma mark - Internal @@ -154,12 +197,21 @@ const NSTimeInterval kRequestTimeoutInterval = 10.0; return [NSError errorWithDomain:@"mopub.com" code:statusCode userInfo:errorInfo]; } -- (NSURLRequest *)adRequestForURL:(NSURL *)URL -{ - NSMutableURLRequest *request = [[MPCoreInstanceProvider sharedProvider] buildConfiguredURLRequestWithURL:URL]; - [request setCachePolicy:NSURLRequestReloadIgnoringCacheData]; - [request setTimeoutInterval:kRequestTimeoutInterval]; - return request; +@end + +#pragma mark - Consent + +@implementation MPAdServerCommunicator (Consent) + +- (void)removeAllMoPubCookies { + // Make NSURL from base URL + NSURL *moPubBaseURL = [NSURL URLWithString:[MPAPIEndpoints baseURL]]; + + // Get array of cookies with the base URL, and delete each one + NSArray * cookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookiesForURL:moPubBaseURL]; + for (NSHTTPCookie * cookie in cookies) { + [[NSHTTPCookieStorage sharedHTTPCookieStorage] deleteCookie:cookie]; + } } @end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdServerURLBuilder.h b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdServerURLBuilder.h index 2e11954eaa..8d1b968ce4 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdServerURLBuilder.h +++ b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdServerURLBuilder.h @@ -12,24 +12,56 @@ + (NSURL *)URLWithAdUnitID:(NSString *)adUnitID keywords:(NSString *)keywords - location:(CLLocation *)location - testing:(BOOL)testing; + userDataKeywords:(NSString *)userDataKeywords + location:(CLLocation *)location; + (NSURL *)URLWithAdUnitID:(NSString *)adUnitID keywords:(NSString *)keywords + userDataKeywords:(NSString *)userDataKeywords location:(CLLocation *)location - versionParameterName:(NSString *)versionParameterName - version:(NSString *)version - testing:(BOOL)testing - desiredAssets:(NSArray *)assets; - -+ (NSURL *)URLWithAdUnitID:(NSString *)adUnitID - keywords:(NSString *)keywords - location:(CLLocation *)location - versionParameterName:(NSString *)versionParameterName - version:(NSString *)version - testing:(BOOL)testing desiredAssets:(NSArray *)assets - adSequence:(NSInteger)adSequence; + viewability:(BOOL)viewability; + ++ (NSURL *)URLWithAdUnitID:(NSString *)adUnitID + keywords:(NSString *)keywords + userDataKeywords:(NSString *)userDataKeywords + location:(CLLocation *)location + desiredAssets:(NSArray *)assets + adSequence:(NSInteger)adSequence + viewability:(BOOL)viewability; + +@end + +@interface MPAdServerURLBuilder (OpenEndpoint) + +/** + Constructs the conversion tracking URL using current consent state, SDK state, and @c appID parameter. + @param appID The App ID to be included in the URL. + @returns URL to the open endpoint configuring for conversion tracking. + */ ++ (NSURL *)conversionTrackingURLForAppID:(NSString *)appID; + +/** + Constructs the session tracking URL using current consent state and SDK state. + @returns URL to the open endpoint configuring for session tracking. + */ ++ (NSURL *)sessionTrackingURL; + +@end + +@interface MPAdServerURLBuilder (Consent) + +/** + Constructs the consent synchronization endpoint URL using the current consent manager + state. + @returns URL to the consent synchronization endpoint. + */ ++ (NSURL *)consentSynchronizationUrl; + +/** + Constructs the URL to fetch the consent dialog using the current consent manager state. + @returns URL to the consent dialog endpoint + */ ++ (NSURL *)consentDialogURL; @end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdServerURLBuilder.m b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdServerURLBuilder.m index a986462234..bbe041a6a2 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdServerURLBuilder.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPAdServerURLBuilder.m @@ -7,24 +7,38 @@ #import "MPAdServerURLBuilder.h" +#import "MPAdvancedBiddingManager.h" +#import "MPConsentAdServerKeys.h" #import "MPConstants.h" #import "MPGeolocationProvider.h" #import "MPGlobal.h" -#import "MPKeywordProvider.h" #import "MPIdentityProvider.h" #import "MPCoreInstanceProvider.h" #import "MPReachability.h" #import "MPAPIEndpoints.h" +#import "MPViewabilityTracker.h" +#import "NSString+MPAdditions.h" +#import "NSString+MPConsentStatus.h" +#import "MPConsentManager.h" static NSString * const kMoPubInterfaceOrientationPortrait = @"p"; static NSString * const kMoPubInterfaceOrientationLandscape = @"l"; static NSInteger const kAdSequenceNone = -1; +// Ad Server URL Keys +static NSString * const kServerAPIVersionKey = @"v"; +static NSString * const kApplicationVersionKey = @"av"; + +// Open Endpoint-specific Keys +static NSString * const kOpenEndpointIDKey = @"id"; +static NSString * const kOpenEndpointSessionTrackingKey = @"st"; + //////////////////////////////////////////////////////////////////////////////////////////////////// @interface MPAdServerURLBuilder () + (NSString *)queryParameterForKeywords:(NSString *)keywords; ++ (NSString *)queryParameterForUserDataKeywords:(NSString *)userDataKeywords; + (NSString *)queryParameterForOrientation; + (NSString *)queryParameterForScaleFactor; + (NSString *)queryParameterForTimeZone; @@ -43,8 +57,12 @@ static NSInteger const kAdSequenceNone = -1; + (NSString *)queryParameterForPhysicalScreenSize; + (NSString *)queryParameterForBundleIdentifier; + (NSString *)queryParameterForAppTransportSecurity; ++ (NSString *)queryParameterForConsent; + (BOOL)advertisingTrackingEnabled; +// Helper methods ++ (NSString *)URLEncodedApplicationVersion; + @end //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -53,59 +71,53 @@ static NSInteger const kAdSequenceNone = -1; + (NSURL *)URLWithAdUnitID:(NSString *)adUnitID keywords:(NSString *)keywords + userDataKeywords:(NSString *)userDataKeywords location:(CLLocation *)location - testing:(BOOL)testing { return [self URLWithAdUnitID:adUnitID keywords:keywords + userDataKeywords:userDataKeywords location:location - versionParameterName:@"nv" - version:MP_SDK_VERSION - testing:testing - desiredAssets:nil]; + desiredAssets:nil + viewability:YES]; } + (NSURL *)URLWithAdUnitID:(NSString *)adUnitID keywords:(NSString *)keywords + userDataKeywords:(NSString *)userDataKeywords location:(CLLocation *)location - versionParameterName:(NSString *)versionParameterName - version:(NSString *)version - testing:(BOOL)testing desiredAssets:(NSArray *)assets + viewability:(BOOL)viewability { return [self URLWithAdUnitID:adUnitID keywords:keywords + userDataKeywords:userDataKeywords location:location - versionParameterName:versionParameterName - version:version - testing:testing desiredAssets:assets - adSequence:kAdSequenceNone]; + adSequence:kAdSequenceNone + viewability:viewability]; } + (NSURL *)URLWithAdUnitID:(NSString *)adUnitID keywords:(NSString *)keywords + userDataKeywords:(NSString *)userDataKeywords location:(CLLocation *)location - versionParameterName:(NSString *)versionParameterName - version:(NSString *)version - testing:(BOOL)testing desiredAssets:(NSArray *)assets adSequence:(NSInteger)adSequence + viewability:(BOOL)viewability { - NSString *URLString = [NSString stringWithFormat:@"%@?v=%@&udid=%@&id=%@&%@=%@", - [MPAPIEndpoints baseURLStringWithPath:MOPUB_API_PATH_AD_REQUEST testing:testing], + NSString *URLString = [NSString stringWithFormat:@"%@?%@=%@&udid=%@&id=%@&nv=%@", + [MPAPIEndpoints baseURLStringWithPath:MOPUB_API_PATH_AD_REQUEST], + kServerAPIVersionKey, MP_SERVER_VERSION, [MPIdentityProvider identifier], [adUnitID stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding], - versionParameterName, version]; - - URLString = [URLString stringByAppendingString:[self queryParameterForKeywords:keywords]]; + MP_SDK_VERSION]; URLString = [URLString stringByAppendingString:[self queryParameterForOrientation]]; URLString = [URLString stringByAppendingString:[self queryParameterForScaleFactor]]; URLString = [URLString stringByAppendingString:[self queryParameterForTimeZone]]; - URLString = [URLString stringByAppendingString:[self queryParameterForLocation:location]]; URLString = [URLString stringByAppendingString:[self queryParameterForMRAID]]; URLString = [URLString stringByAppendingString:[self queryParameterForDNT]]; URLString = [URLString stringByAppendingString:[self queryParameterForConnectionType]]; @@ -121,36 +133,59 @@ static NSInteger const kAdSequenceNone = -1; URLString = [URLString stringByAppendingString:[self queryParameterForBundleIdentifier]]; URLString = [URLString stringByAppendingString:[self queryParameterForAppTransportSecurity]]; + if ([MPConsentManager sharedManager].canCollectPersonalInfo) { + URLString = [URLString stringByAppendingString:[self queryParameterForLocation:location]]; + } + + // If a user is in GDPR region and MoPub doesn't obtain consent from the user, personal keywords won't be sent + // to the server. It's handled in `queryParameterForKeywords` method. + URLString = [URLString stringByAppendingString:[self queryParameterForKeywords:keywords]]; + URLString = [URLString stringByAppendingString:[self queryParameterForUserDataKeywords:userDataKeywords]]; + + if (viewability) { + URLString = [URLString stringByAppendingString:[self queryParameterForViewability]]; + } + + NSString * advancedBiddingQueryParameter = [self queryParameterForAdvancedBidding]; + if (advancedBiddingQueryParameter) { + URLString = [URLString stringByAppendingString:advancedBiddingQueryParameter]; + } + + URLString = [URLString stringByAppendingString:[self queryParameterForConsent]]; + + // In the event that the `adUnitIdUsedForConsent` from `MPConsentManager` is still `nil`, + // we should populate it with this `adUnitId`. This is to cover the edge case where the + // publisher does not explcitily initialize the SDK via `initializeSdkWithConfiguration:completion:`. + if (adUnitID != nil && MPConsentManager.sharedManager.adUnitIdUsedForConsent == nil) { + MPConsentManager.sharedManager.adUnitIdUsedForConsent = adUnitID; + } + return [NSURL URLWithString:URLString]; } ++ (NSString *)queryParameterForUserDataKeywords:(NSString *)userDataKeywords +{ + if (![MPConsentManager sharedManager].canCollectPersonalInfo) { + return @""; + } + return [MPAdServerURLBuilder queryParameterForKeywords:userDataKeywords key:@"user_data_q"]; +} + + (NSString *)queryParameterForKeywords:(NSString *)keywords { - NSMutableArray *keywordsArray = [NSMutableArray array]; + return [MPAdServerURLBuilder queryParameterForKeywords:keywords key:@"q"]; +} + ++ (NSString *)queryParameterForKeywords:(NSString *)keywords key:(NSString *)key +{ NSString *trimmedKeywords = [keywords stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceCharacterSet]]; if ([trimmedKeywords length] > 0) { - [keywordsArray addObject:trimmedKeywords]; - } - - // Append the Facebook attribution keyword (if available). - Class fbKeywordProviderClass = NSClassFromString(@"MPFacebookKeywordProvider"); - if ([fbKeywordProviderClass conformsToProtocol:@protocol(MPKeywordProvider)]) - { - NSString *fbAttributionKeyword = [(Class) fbKeywordProviderClass keyword]; - if ([fbAttributionKeyword length] > 0) { - [keywordsArray addObject:fbAttributionKeyword]; - } - } - - if ([keywordsArray count] == 0) { - return @""; - } else { - NSString *keywords = [[keywordsArray componentsJoinedByString:@","] - stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; - return [NSString stringWithFormat:@"&q=%@", keywords]; + NSString *keywords = [trimmedKeywords stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + return [NSString stringWithFormat:@"&%@=%@", key, keywords]; } + return @""; } + (NSString *)queryParameterForOrientation @@ -233,9 +268,7 @@ static NSInteger const kAdSequenceNone = -1; + (NSString *)queryParameterForApplicationVersion { - NSString *applicationVersion = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]; - return [NSString stringWithFormat:@"&av=%@", - [applicationVersion mp_URLEncodedString]]; + return [NSString stringWithFormat:@"&%@=%@", kApplicationVersionKey, [self URLEncodedApplicationVersion]]; } + (NSString *)queryParameterForCarrierName @@ -298,9 +331,222 @@ static NSInteger const kAdSequenceNone = -1; return [NSString stringWithFormat:@"&ats=%@", @([[MPCoreInstanceProvider sharedProvider] appTransportSecuritySettings])]; } ++ (NSString *)queryParameterForViewability { + return [NSString stringWithFormat:@"&vv=%d", (int)[MPViewabilityTracker enabledViewabilityVendors]]; +} + ++ (NSString *)queryParameterForAdvancedBidding { + // Opted out of advanced bidding, no query parameter should be sent. + if (![MPAdvancedBiddingManager sharedManager].advancedBiddingEnabled) { + return nil; + } + + // No JSON at this point means that no advanced bidders were initialized. + NSString * tokens = MPAdvancedBiddingManager.sharedManager.bidderTokensJson; + if (tokens == nil) { + return nil; + } + + // URL encode the JSON string + NSString * urlEncodedTokens = [tokens mp_URLEncodedString]; + if (urlEncodedTokens == nil) { + return nil; + } + + return [NSString stringWithFormat:@"&abt=%@", urlEncodedTokens]; +} + ++ (NSString *)queryParameterForConsent { + MPConsentManager * manager = MPConsentManager.sharedManager; + + // Consent state + NSString * consent = [NSString stringFromConsentStatus:manager.currentStatus]; + NSMutableString * consentQuery = [NSMutableString stringWithFormat:@"&%@=%@", kCurrentConsentStatusKey, consent]; + + // GDPR applicable state + if (manager.isGDPRApplicable != MPBoolUnknown) { + NSString * gdprBoolValue = manager.isGDPRApplicable > 0 ? @"1" : @"0"; + [consentQuery appendFormat:@"&%@=%@", kGDPRAppliesKey, gdprBoolValue]; + } + + // User consented versions + if (manager.consentedPrivacyPolicyVersion != nil) { + [consentQuery appendFormat:@"&%@=%@", kConsentedPrivacyPolicyVersionKey, manager.consentedPrivacyPolicyVersion]; + } + + if (manager.consentedVendorListVersion != nil) { + [consentQuery appendFormat:@"&%@=%@", kConsentedVendorListVersionKey, manager.consentedVendorListVersion]; + } + + return consentQuery; +} + + (BOOL)advertisingTrackingEnabled { return [MPIdentityProvider advertisingTrackingEnabled]; } ++ (NSString *)URLEncodedApplicationVersion { + static NSString * gApplicationVersion; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + gApplicationVersion = [[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] mp_URLEncodedString]; + }); + + return gApplicationVersion; +} + @end + +@interface MPAdServerURLBuilder (Helper) + ++ (NSURL *)URLWithEndpointPath:(NSString *)endpointPath queryParameters:(NSDictionary *)parameters; + ++ (NSString *)queryItemForKey:(NSString *)key value:(NSString *)value; + +@end + +@implementation MPAdServerURLBuilder (Helper) + ++ (NSURL *)URLWithEndpointPath:(NSString *)endpointPath queryParameters:(NSDictionary *)parameters { + // Build the full URL string + NSString * baseURLString = [MPAPIEndpoints baseURLStringWithPath:endpointPath]; + + NSMutableArray * queryItems = [NSMutableArray array]; + [parameters enumerateKeysAndObjectsUsingBlock:^(NSString * _Nonnull key, NSString * _Nonnull value, BOOL * _Nonnull stop) { + NSString * queryItem = [self queryItemForKey:key value:value]; + [queryItems addObject:queryItem]; + }]; + + NSString * queryParameters = [queryItems componentsJoinedByString:@"&"]; + NSString * url = [NSString stringWithFormat:@"%@?%@", baseURLString, queryParameters]; + + return [NSURL URLWithString:url]; +} + ++ (NSString *)queryItemForKey:(NSString *)key value:(NSString *)value { + if (key == nil || value == nil) { + return nil; + } + + NSString * encodedValue = [value mp_URLEncodedString]; + return [NSString stringWithFormat:@"%@=%@", key, encodedValue]; +} + +@end + +@implementation MPAdServerURLBuilder (OpenEndpoint) + ++ (NSURL *)conversionTrackingURLForAppID:(NSString *)appID { + return [self openEndpointURLWithIDParameter:appID isSessionTracking:NO]; +} + ++ (NSURL *)sessionTrackingURL { + NSString *bundleIdentifier = [[[NSBundle mainBundle] bundleIdentifier] mp_URLEncodedString]; + return [self openEndpointURLWithIDParameter:bundleIdentifier isSessionTracking:YES]; +} + ++ (NSURL *)openEndpointURLWithIDParameter:(NSString *)idParameter isSessionTracking:(BOOL)isSessionTracking { + MPConsentManager * manager = MPConsentManager.sharedManager; + + NSMutableDictionary * queryParameters = [NSMutableDictionary dictionary]; + + // REQUIRED: IDFA + queryParameters[kIdfaKey] = [MPIdentityProvider identifier]; + + // REQUIRED: ID Parameter (used for different things depending on which URL, take from method parameter) + queryParameters[kOpenEndpointIDKey] = idParameter; + + // REQUIRED: Server API Version + queryParameters[kServerAPIVersionKey] = MP_SERVER_VERSION; + + // REQUIRED: SDK Version + queryParameters[kSDKVersionKey] = MP_SDK_VERSION; + + // REQUIRED: Application Version + queryParameters[kApplicationVersionKey] = [self URLEncodedApplicationVersion]; + + // OPTIONAL: Include Session Tracking Parameter if needed + if (isSessionTracking) { + queryParameters[kOpenEndpointSessionTrackingKey] = @"1"; + } + + // REQUIRED: GDPR region applicable + if (manager.isGDPRApplicable != MPBoolUnknown) { + queryParameters[kGDPRAppliesKey] = manager.isGDPRApplicable > 0 ? @"1" : @"0"; + } + + // REQUIRED: Current consent status + queryParameters[kCurrentConsentStatusKey] = [NSString stringFromConsentStatus:manager.currentStatus]; + + // OPTIONAL: Consented versions + queryParameters[kConsentedPrivacyPolicyVersionKey] = manager.consentedPrivacyPolicyVersion; + queryParameters[kConsentedVendorListVersionKey] = manager.consentedVendorListVersion; + + return [self URLWithEndpointPath:MOPUB_API_PATH_OPEN queryParameters:queryParameters]; +} + +@end + +@implementation MPAdServerURLBuilder (Consent) + +#pragma mark - Consent URLs + ++ (NSURL *)consentSynchronizationUrl { + MPConsentManager * manager = MPConsentManager.sharedManager; + + // REQUIRED: Ad unit ID for consent may be empty if the publisher + // never initialized the SDK. + NSMutableDictionary * queryParameters = [NSMutableDictionary dictionary]; + queryParameters[kAdUnitIdKey] = manager.adUnitIdUsedForConsent; + + // REQUIRED: SDK version, DNT, Bundle + queryParameters[kSDKVersionKey] = MP_SDK_VERSION; + queryParameters[kDoNotTrackIdKey] = [MPIdentityProvider advertisingTrackingEnabled] ? nil : @"1"; + queryParameters[kBundleKey] = [[[NSBundle mainBundle] bundleIdentifier] mp_URLEncodedString]; + + // REQUIRED: Current consent status + queryParameters[kCurrentConsentStatusKey] = [NSString stringFromConsentStatus:manager.currentStatus]; + + // REQUIRED: GDPR region applicable + if (manager.isGDPRApplicable != MPBoolUnknown) { + queryParameters[kGDPRAppliesKey] = manager.isGDPRApplicable > 0 ? @"1" : @"0"; + } + + // OPTIONAL: IFA for consent, last synchronized consent status, last changed reason, + // last changed timestamp in milliseconds + queryParameters[kIdfaKey] = manager.ifaForConsent; + queryParameters[kLastSynchronizedConsentStatusKey] = manager.lastSynchronizedStatus; + queryParameters[kConsentChangedReasonKey] = manager.lastChangedReason; + queryParameters[kLastChangedMsKey] = manager.lastChangedTimestampInMilliseconds > 0 ? [NSString stringWithFormat:@"%llu", (unsigned long long)manager.lastChangedTimestampInMilliseconds] : nil; + + // OPTIONAL: Consented versions + queryParameters[kConsentedPrivacyPolicyVersionKey] = manager.consentedPrivacyPolicyVersion; + queryParameters[kConsentedVendorListVersionKey] = manager.consentedVendorListVersion; + queryParameters[kCachedIabVendorListHashKey] = manager.iabVendorListHash; + + // OPTIONAL: Server extras + queryParameters[kExtrasKey] = manager.extras; + + return [self URLWithEndpointPath:MOPUB_API_PATH_CONSENT_SYNC queryParameters:queryParameters]; +} + ++ (NSURL *)consentDialogURL { + MPConsentManager * manager = MPConsentManager.sharedManager; + + // REQUIRED: Ad unit ID for consent may be empty if the publisher + // never initialized the SDK. + NSMutableDictionary * queryParameters = [NSMutableDictionary dictionary]; + queryParameters[kAdUnitIdKey] = manager.adUnitIdUsedForConsent; + + // REQUIRED: SDK version, DNT, Bundle, Language + queryParameters[kSDKVersionKey] = MP_SDK_VERSION; + queryParameters[kDoNotTrackIdKey] = [MPIdentityProvider advertisingTrackingEnabled] ? nil : @"1"; + queryParameters[kBundleKey] = [[[NSBundle mainBundle] bundleIdentifier] mp_URLEncodedString]; + queryParameters[kLanguageKey] = manager.currentLanguageCode; + + return [self URLWithEndpointPath:MOPUB_API_PATH_CONSENT_DIALOG queryParameters:queryParameters]; +} + +@end + diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPClosableView.h b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPClosableView.h index d683d1abd9..c506b3cf5f 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPClosableView.h +++ b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPClosableView.h @@ -42,6 +42,7 @@ CGRect MPClosableViewCustomCloseButtonFrame(CGSize size, MPClosableViewCloseButt @property (nonatomic, assign) MPClosableViewCloseButtonType closeButtonType; @property (nonatomic, assign) MPClosableViewCloseButtonLocation closeButtonLocation; @property (nonatomic, readonly) BOOL wasTapped; +@property (nonatomic, strong, readonly) UIButton *closeButton; - (instancetype)initWithFrame:(CGRect)frame closeButtonType:(MPClosableViewCloseButtonType)closeButtonType; diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPClosableView.m b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPClosableView.m index 0b7719ab58..09a671cad9 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPClosableView.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPClosableView.m @@ -51,7 +51,7 @@ CGRect MPClosableViewCustomCloseButtonFrame(CGSize size, MPClosableViewCloseButt @interface MPClosableView () -@property (nonatomic, strong) UIButton *closeButton; +@property (nonatomic, strong, readwrite) UIButton *closeButton; @property (nonatomic, strong) UIImage *closeButtonImage; @property (nonatomic, strong) MPUserInteractionGestureRecognizer *userInteractionRecognizer; @property (nonatomic, assign) BOOL wasTapped; @@ -99,7 +99,55 @@ CGRect MPClosableViewCustomCloseButtonFrame(CGSize size, MPClosableViewCloseButt - (void)layoutSubviews { - self.closeButton.frame = MPClosableViewCustomCloseButtonFrame(self.bounds.size, self.closeButtonLocation); + if (@available(iOS 11, *)) { + self.closeButton.translatesAutoresizingMaskIntoConstraints = NO; + + NSMutableArray *constraints = [NSMutableArray arrayWithObjects: + [self.closeButton.widthAnchor constraintEqualToConstant:kCloseRegionWidth], + [self.closeButton.heightAnchor constraintEqualToConstant:kCloseRegionHeight], + nil]; + + switch (self.closeButtonLocation) { + case MPClosableViewCloseButtonLocationTopRight: + [constraints addObject:[self.closeButton.trailingAnchor constraintEqualToAnchor:self.safeAreaLayoutGuide.trailingAnchor]]; + [constraints addObject:[self.closeButton.topAnchor constraintEqualToAnchor:self.safeAreaLayoutGuide.topAnchor]]; + break; + case MPClosableViewCloseButtonLocationTopLeft: + [constraints addObject:[self.closeButton.leadingAnchor constraintEqualToAnchor:self.safeAreaLayoutGuide.leadingAnchor]]; + [constraints addObject:[self.closeButton.topAnchor constraintEqualToAnchor:self.safeAreaLayoutGuide.topAnchor]]; + break; + case MPClosableViewCloseButtonLocationTopCenter: + [constraints addObject:[self.closeButton.topAnchor constraintEqualToAnchor:self.safeAreaLayoutGuide.topAnchor]]; + [constraints addObject:[self.closeButton.centerXAnchor constraintEqualToAnchor:self.centerXAnchor]]; + break; + case MPClosableViewCloseButtonLocationBottomRight: + [constraints addObject:[self.closeButton.trailingAnchor constraintEqualToAnchor:self.safeAreaLayoutGuide.trailingAnchor]]; + [constraints addObject:[self.closeButton.bottomAnchor constraintEqualToAnchor:self.safeAreaLayoutGuide.bottomAnchor]]; + break; + case MPClosableViewCloseButtonLocationBottomLeft: + [constraints addObject:[self.closeButton.leadingAnchor constraintEqualToAnchor:self.safeAreaLayoutGuide.leadingAnchor]]; + [constraints addObject:[self.closeButton.bottomAnchor constraintEqualToAnchor:self.safeAreaLayoutGuide.bottomAnchor]]; + break; + case MPClosableViewCloseButtonLocationBottomCenter: + [constraints addObject:[self.closeButton.bottomAnchor constraintEqualToAnchor:self.safeAreaLayoutGuide.bottomAnchor]]; + [constraints addObject:[self.closeButton.centerXAnchor constraintEqualToAnchor:self.centerXAnchor]]; + break; + case MPClosableViewCloseButtonLocationCenter: + [constraints addObject:[self.closeButton.centerXAnchor constraintEqualToAnchor:self.centerXAnchor]]; + [constraints addObject:[self.closeButton.centerYAnchor constraintEqualToAnchor:self.centerYAnchor]]; + break; + default: + // Top-right default + [constraints addObject:[self.closeButton.trailingAnchor constraintEqualToAnchor:self.safeAreaLayoutGuide.trailingAnchor]]; + [constraints addObject:[self.closeButton.topAnchor constraintEqualToAnchor:self.safeAreaLayoutGuide.topAnchor]]; + break; + } + + [NSLayoutConstraint activateConstraints:constraints]; + } else { + self.closeButton.frame = MPClosableViewCustomCloseButtonFrame(self.bounds.size, self.closeButtonLocation); + } + [self bringSubviewToFront:self.closeButton]; } diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPFacebookKeywordProvider.h b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPFacebookKeywordProvider.h deleted file mode 100644 index 7e92b65a18..0000000000 --- a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPFacebookKeywordProvider.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// MPFacebookAttributionIdProvider.h -// MoPub -// -// Copyright (c) 2012 MoPub, Inc. All rights reserved. -// - -#import -#import "MPKeywordProvider.h" - -/* - * This class enables the MoPub SDK to deliver targeted ads from Facebook via MoPub Marketplace - * (MoPub's real-time bidding ad exchange) as part of a test program. This class sends an identifier - * to Facebook so Facebook can select the ad MoPub will serve in your app through MoPub Marketplace. - * If this class is removed from the SDK, your application will not receive targeted ads from - * Facebook. - */ - -@interface MPFacebookKeywordProvider : NSObject - -@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPFacebookKeywordProvider.m b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPFacebookKeywordProvider.m deleted file mode 100644 index de1a01f37a..0000000000 --- a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPFacebookKeywordProvider.m +++ /dev/null @@ -1,28 +0,0 @@ -// -// MPFacebookAttributionIdProvider.m -// MoPub -// -// Copyright (c) 2012 MoPub, Inc. All rights reserved. -// - -#import "MPFacebookKeywordProvider.h" -#import - -static NSString *kFacebookAttributionIdPasteboardKey = @"fb_app_attribution"; -static NSString *kFacebookAttributionIdPrefix = @"FBATTRID:"; - -@implementation MPFacebookKeywordProvider - -#pragma mark - MPKeywordProvider - -+ (NSString *)keyword { - NSString *facebookAttributionId = [[UIPasteboard pasteboardWithName:kFacebookAttributionIdPasteboardKey - create:NO] string]; - if (!facebookAttributionId) { - return nil; - } - - return [NSString stringWithFormat:@"%@%@", kFacebookAttributionIdPrefix, facebookAttributionId]; -} - -@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPKeywordProvider.h b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPKeywordProvider.h deleted file mode 100644 index fa96647c64..0000000000 --- a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPKeywordProvider.h +++ /dev/null @@ -1,14 +0,0 @@ -// -// MPKeywordProvider.h -// MoPub -// -// Copyright (c) 2012 MoPub, Inc. All rights reserved. -// - -#import - -@protocol MPKeywordProvider - -+ (NSString *)keyword; - -@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPLastResortDelegate.h b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPLastResortDelegate.h index 8f277d806a..852e38f989 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPLastResortDelegate.h +++ b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPLastResortDelegate.h @@ -8,10 +8,7 @@ #import #import -@interface MPLastResortDelegate : NSObject -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000 - -#endif +@interface MPLastResortDelegate : NSObject + (id)sharedDelegate; diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPLastResortDelegate.m b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPLastResortDelegate.m index dfaacc8e36..3df4d1ef05 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPLastResortDelegate.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPLastResortDelegate.m @@ -27,11 +27,9 @@ [(UIViewController *)controller dismissViewControllerAnimated:MP_ANIMATED completion:nil]; } -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000 - (void)productViewControllerDidFinish:(SKStoreProductViewController *)viewController { [viewController dismissViewControllerAnimated:MP_ANIMATED completion:nil]; } -#endif @end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPRealTimeTimer.h b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPRealTimeTimer.h new file mode 100644 index 0000000000..11a9f31a44 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPRealTimeTimer.h @@ -0,0 +1,41 @@ +// +// MPRealTimeTimer.h +// MoPubSampleApp +// +// Copyright © 2017 MoPub. All rights reserved. +// + +#import + +/*** + * MPRealTimeTimer is a class meant for situations in which one may want to disaptch an event for later without + * any regard for application state. Backgrounding and suspension will not affect time keeping. MPRealTimeTimer will NOT + * fire while the application is backgrounded or suspended, but will fire immediately upon foregrounding if the + * application is not foregrounded when the time interval elapses. + * + * Note: MPRealTimeTimer uses NSTimer as a base and as such perfect accuracy is not guaranteed. + ***/ + +@interface MPRealTimeTimer : NSObject + +// Initializer which takes in a time interval (from when `scheduleNow` is called) and a block to execute when firing. +- (instancetype)initWithInterval:(NSTimeInterval)interval + block:(void(^)(MPRealTimeTimer *))block NS_DESIGNATED_INITIALIZER; + +// Returns `YES` if the timer is currently keeping time; `NO` if it's waiting to be scheduled. +@property (nonatomic, assign, readonly) BOOL isScheduled; + +// Schedules the MPRealTimeTimer instance to fire at `interval` seconds from now. Calling `scheduleNow` while +// `isScheduled` is set to `YES` will do nothing. +- (void)scheduleNow; + +// Executes `block` and stops all time keeping. +- (void)fire; + +// Stops all time keeping without executing anything. +- (void)invalidate; + +// Use of `init` is not supported. +- (instancetype)init NS_UNAVAILABLE; + +@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPRealTimeTimer.m b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPRealTimeTimer.m new file mode 100644 index 0000000000..e536d41f47 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPRealTimeTimer.m @@ -0,0 +1,112 @@ +// +// MPRealTimeTimer.m +// MoPubSampleApp +// +// Copyright © 2017 MoPub. All rights reserved. +// + +#import "MPRealTimeTimer.h" +#import "MPTimer.h" + +@interface MPRealTimeTimer () + +@property (strong, nonatomic) MPTimer *timer; +@property (copy, nonatomic) void (^block)(MPRealTimeTimer *); +@property (assign, nonatomic) NSTimeInterval interval; +@property (assign, nonatomic, readwrite) BOOL isScheduled; + +@property (copy, nonatomic) NSDate *fireDate; +@property (assign, nonatomic) NSTimeInterval currentTimeInterval; + +@end + +@implementation MPRealTimeTimer + +- (instancetype)initWithInterval:(NSTimeInterval)interval + block:(void(^)(MPRealTimeTimer *))block { + if (self = [super init]) { + _interval = interval; + _block = block; + } + + return self; +} + +- (void)scheduleNow { + if (!self.isScheduled) { + [self addNotificationCenterObservers]; + self.currentTimeInterval = self.interval; + [self setTimerWithCurrentTimeInterval]; + self.isScheduled = YES; + } +} + +- (void)invalidate { + [self.timer invalidate]; + self.timer = nil; + + [[NSNotificationCenter defaultCenter] removeObserver:self]; + self.isScheduled = NO; + self.fireDate = nil; +} + +- (void)fire { + [self invalidate]; + [self runBlock]; +} + +#pragma mark - Internal Methods + +- (void)runBlock { + if (self.block) { + self.block(self); + } +} + +- (void)setTimerWithCurrentTimeInterval { + self.timer = [MPTimer timerWithTimeInterval:self.currentTimeInterval + target:self + selector:@selector(fire) + repeats:NO]; + self.timer.runLoopMode = NSRunLoopCommonModes; + [self.timer scheduleNow]; + if (!self.fireDate) { + self.fireDate = [NSDate dateWithTimeIntervalSinceNow:self.currentTimeInterval]; + } +} + +- (void)didEnterBackground { + // invalidate timer (don't invalidate self because we're still keeping time) + [self.timer invalidate]; +} + +- (void)willEnterForeground { + // check if date has passed and fire if needed + NSComparisonResult result = [[NSDate date] compare:self.fireDate]; + if (result == NSOrderedSame || result == NSOrderedDescending) { + [self fire]; + return; + } + + // update time interval and schedule a new timer if it's not yet time to fire + self.currentTimeInterval = [self.fireDate timeIntervalSinceNow]; + [self setTimerWithCurrentTimeInterval]; +} + +- (void)addNotificationCenterObservers { + // Set up notifications to react to backgrounding/foregrounding + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(didEnterBackground) + name:UIApplicationDidEnterBackgroundNotification + object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(willEnterForeground) + name:UIApplicationWillEnterForegroundNotification + object:nil]; +} + +- (void)dealloc { + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPURLResolver.h b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPURLResolver.h index a162b42a2a..8e2dc99261 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPURLResolver.h +++ b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPURLResolver.h @@ -11,7 +11,7 @@ typedef void (^MPURLResolverCompletionBlock)(MPURLActionInfo *actionInfo, NSError *error); -@interface MPURLResolver : NSObject +@interface MPURLResolver : NSObject + (instancetype)resolverWithURL:(NSURL *)URL completion:(MPURLResolverCompletionBlock)completion; - (void)start; diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPURLResolver.m b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPURLResolver.m index 141bd1f1a4..f80c3a8470 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Common/MPURLResolver.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/Common/MPURLResolver.m @@ -7,23 +7,28 @@ #import #import "MPURLResolver.h" +#import "MPHTTPNetworkSession.h" #import "NSURL+MPAdditions.h" #import "NSHTTPURLResponse+MPAdditions.h" #import "MPInstanceProvider.h" #import "MPLogging.h" #import "MPCoreInstanceProvider.h" +#import "MOPUBExperimentProvider.h" +#import "NSURL+MPAdditions.h" +#import "MPURLRequest.h" static NSString * const kMoPubSafariScheme = @"mopubnativebrowser"; static NSString * const kMoPubSafariNavigateHost = @"navigate"; static NSString * const kResolverErrorDomain = @"com.mopub.resolver"; +static NSString * const kWebviewClickthroughHost = @"ads.mopub.com"; +static NSString * const kWebviewClickthroughPath = @"/m/aclk"; +static NSString * const kRedirectURLQueryStringKey = @"r"; @interface MPURLResolver () @property (nonatomic, strong) NSURL *originalURL; @property (nonatomic, strong) NSURL *currentURL; -@property (nonatomic, strong) NSURLConnection *connection; -@property (nonatomic, strong) NSMutableData *responseData; -@property (nonatomic, assign) NSStringEncoding responseEncoding; +@property (nonatomic, strong) NSURLSessionTask *task; @property (nonatomic, copy) MPURLResolverCompletionBlock completion; - (MPURLActionInfo *)actionInfoFromURL:(NSURL *)URL error:(NSError **)error; @@ -37,12 +42,6 @@ static NSString * const kResolverErrorDomain = @"com.mopub.resolver"; @implementation MPURLResolver -@synthesize originalURL = _originalURL; -@synthesize currentURL = _currentURL; -@synthesize connection = _connection; -@synthesize responseData = _responseData; -@synthesize completion = _completion; - + (instancetype)resolverWithURL:(NSURL *)URL completion:(MPURLResolverCompletionBlock)completion { return [[MPURLResolver alloc] initWithURL:URL completion:completion]; @@ -60,7 +59,7 @@ static NSString * const kResolverErrorDomain = @"com.mopub.resolver"; - (void)start { - [self.connection cancel]; + [self.task cancel]; self.currentURL = self.originalURL; NSError *error = nil; @@ -68,29 +67,73 @@ static NSString * const kResolverErrorDomain = @"com.mopub.resolver"; if (info) { [self safeInvokeAndNilCompletionBlock:info error:nil]; + } else if ([self shouldEnableClickthroughExperiment]) { + info = [MPURLActionInfo infoWithURL:self.originalURL webViewBaseURL:self.currentURL]; + [self safeInvokeAndNilCompletionBlock:info error:nil]; } else if (error) { [self safeInvokeAndNilCompletionBlock:nil error:error]; } else { - NSURLRequest *request = [[MPCoreInstanceProvider sharedProvider] buildConfiguredURLRequestWithURL:self.originalURL]; - self.responseData = [NSMutableData data]; - self.responseEncoding = NSUTF8StringEncoding; - self.connection = [NSURLConnection connectionWithRequest:request delegate:self]; + MPURLRequest *request = [[MPURLRequest alloc] initWithURL:self.originalURL]; + self.task = [self httpTaskWithRequest:request]; } } +- (NSURLSessionTask *)httpTaskWithRequest:(MPURLRequest *)request { + __weak __typeof__(self) weakSelf = self; + NSURLSessionTask * task = [MPHTTPNetworkSession startTaskWithHttpRequest:request responseHandler:^(NSData * _Nonnull data, NSHTTPURLResponse * _Nonnull response) { + __typeof__(self) strongSelf = weakSelf; + + // Set the response content type + NSStringEncoding responseEncoding = NSUTF8StringEncoding; + NSDictionary *headers = [response allHeaderFields]; + NSString *contentType = [headers objectForKey:kMoPubHTTPHeaderContentType]; + if (contentType != nil) { + responseEncoding = [response stringEncodingFromContentType:contentType]; + } + + NSString *responseString = [[NSString alloc] initWithData:data encoding:responseEncoding]; + MPURLActionInfo *info = [MPURLActionInfo infoWithURL:strongSelf.originalURL HTTPResponseString:responseString webViewBaseURL:strongSelf.currentURL]; + [strongSelf safeInvokeAndNilCompletionBlock:info error:nil]; + + } errorHandler:^(NSError * _Nonnull error) { + __typeof__(self) strongSelf = weakSelf; + [strongSelf safeInvokeAndNilCompletionBlock:nil error:error]; + } shouldRedirectWithNewRequest:^BOOL(NSURLSessionTask * _Nonnull task, NSURLRequest * _Nonnull newRequest) { + __typeof__(self) strongSelf = weakSelf; + + // First, check to see if the redirect URL matches any of our suggested actions. + NSError * actionInfoError = nil; + MPURLActionInfo * info = [strongSelf actionInfoFromURL:newRequest.URL error:&actionInfoError]; + + if (info) { + [task cancel]; + [strongSelf safeInvokeAndNilCompletionBlock:info error:nil]; + return NO; + } else { + // The redirected URL didn't match any actions, so we should continue with loading the URL. + strongSelf.currentURL = newRequest.URL; + return YES; + } + }]; + + return task; +} + - (void)cancel { - [self.connection cancel]; - self.connection = nil; + [self.task cancel]; + self.task = nil; self.completion = nil; } - (void)safeInvokeAndNilCompletionBlock:(MPURLActionInfo *)info error:(NSError *)error { - if (self.completion != nil) { - self.completion(info, error); - self.completion = nil; - } + dispatch_async(dispatch_get_main_queue(), ^{ + if (self.completion != nil) { + self.completion(info, error); + self.completion = nil; + } + }); } #pragma mark - Handling Application/StoreKit URLs @@ -225,7 +268,7 @@ static NSString * const kResolverErrorDomain = @"com.mopub.resolver"; NSString *charset = [contentType substringWithRange:[charsetResult range]]; // ensure that charset is not deallocated early - CFStringRef cfCharset = CFBridgingRetain(charset); + CFStringRef cfCharset = (CFStringRef)CFBridgingRetain(charset); CFStringEncoding cfEncoding = CFStringConvertIANACharSetNameToEncoding(cfCharset); CFBridgingRelease(cfCharset); @@ -238,49 +281,38 @@ static NSString * const kResolverErrorDomain = @"com.mopub.resolver"; return encoding; } -#pragma mark - +#pragma mark - Check if it's necessary to include a URL in the clickthrough experiment. +// There are two types of clickthrough URL sources: from webviews and from non-web views. +// The ones from webviews start with (https|http)://ads.mopub.com/m/aclk +// For webviews, in order for a URL to be included in the clickthrough experiment, redirect URL scheme needs to be http/https. -- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data +- (BOOL)shouldEnableClickthroughExperiment { - [self.responseData appendData:data]; -} - -- (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)response -{ - // First, check to see if the redirect URL matches any of our suggested actions. - NSError *error = nil; - MPURLActionInfo *info = [self actionInfoFromURL:request.URL error:&error]; - - if (info) { - [connection cancel]; - [self safeInvokeAndNilCompletionBlock:info error:nil]; - return nil; - } else { - // The redirected URL didn't match any actions, so we should continue with loading the URL. - self.currentURL = request.URL; - return request; + if (!self.currentURL) { + return NO; } -} -- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response -{ - NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response; + // If redirect URL isn't http/https, do not include it in the clickthrough experiment. + if (![self URLIsHTTPOrHTTPS:self.currentURL]) { + return NO; + } - NSDictionary *headers = [httpResponse allHeaderFields]; - NSString *contentType = [headers objectForKey:kMoPubHTTPHeaderContentType]; - self.responseEncoding = [httpResponse stringEncodingFromContentType:contentType]; -} + // Clickthroughs from webviews + if ([self.currentURL.host isEqualToString:kWebviewClickthroughHost] && + [self.currentURL.path isEqualToString:kWebviewClickthroughPath]) { -- (void)connectionDidFinishLoading:(NSURLConnection *)connection -{ - NSString *responseString = [[NSString alloc] initWithData:self.responseData encoding:self.responseEncoding]; - MPURLActionInfo *info = [MPURLActionInfo infoWithURL:self.originalURL HTTPResponseString:responseString webViewBaseURL:self.currentURL]; - [self safeInvokeAndNilCompletionBlock:info error:nil]; -} + NSString *redirectURLStr = [self.currentURL mp_queryParameterForKey:kRedirectURLQueryStringKey]; + if (!redirectURLStr || ![self URLIsHTTPOrHTTPS:[NSURL URLWithString:redirectURLStr]]) { + return NO; + } + } -- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error -{ - [self safeInvokeAndNilCompletionBlock:nil error:error]; + // Check experiment variant is in test group. + if ([MPAdDestinationDisplayAgent shouldUseSafariViewController] || + [MOPUBExperimentProvider displayAgentType] == MOPUBDisplayAgentTypeNativeSafari) { + return YES; + } + return NO; } @end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPLogEvent+NativeVideo.h b/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPLogEvent+NativeVideo.h deleted file mode 100644 index 28ec396027..0000000000 --- a/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPLogEvent+NativeVideo.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// MPLogEvent+NativeVideo.h -// MoPubSDK -// -// Copyright (c) 2015 MoPub. All rights reserved. -// - -#import - -#import "MPLogEvent.h" - -typedef NS_ENUM(NSInteger, MPNativeVideoEventType) { - MPNativeVideoEventTypeDownloadStart, - MPNativeVideoEventTypeVideoReady, - MPNativeVideoEventTypeBuffering, - MPNativeVideoEventTypeDownloadFinished, - MPNativeVideoEventTypeErrorFailedToPlay, - MPNativeVideoEventTypeErrorDuringPlayback, -}; - -@interface MPLogEvent (NativeVideo) - -- (instancetype)initWithLogEventProperties:(MPAdConfigurationLogEventProperties *)logEventProperties nativeVideoEventType:(MPNativeVideoEventType)nativeVideoEventType; - -@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPLogEvent+NativeVideo.m b/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPLogEvent+NativeVideo.m deleted file mode 100644 index 9fd1281b81..0000000000 --- a/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPLogEvent+NativeVideo.m +++ /dev/null @@ -1,39 +0,0 @@ -// -// MPLogEvent+NativeVideo.m -// MoPubSDK -// -// Copyright (c) 2015 MoPub. All rights reserved. -// - -#import "MPLogEvent+NativeVideo.h" - -static NSDictionary *nativeVideoLogEventTypeToString = nil; - -NSString *const MPNativeVideoEventTypeDownloadStartString = @"download_start"; -NSString *const MPNativeVideoEventTypeVideoReadyString = @"download_video_ready"; -NSString *const MPNativeVideoEventTypeBufferingString = @"download_buffering"; -NSString *const MPNativeVideoEventTypeDownloadFinishedString = @"download_finished"; -NSString *const MPNativeVideoEventTypeErrorFailedToPlayString = @"error_failed_to_play"; -NSString *const MPNativeVideoEventTypeErrorDuringPlaybackString = @"error_during_playback"; - -@implementation MPLogEvent (NativeVideo) - -- (instancetype)initWithLogEventProperties:(MPAdConfigurationLogEventProperties *)logEventProperties nativeVideoEventType:(MPNativeVideoEventType)nativeVideoEventType -{ - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - nativeVideoLogEventTypeToString = @{@(MPNativeVideoEventTypeDownloadStart): MPNativeVideoEventTypeDownloadStartString, - @(MPNativeVideoEventTypeVideoReady): MPNativeVideoEventTypeVideoReadyString, - @(MPNativeVideoEventTypeBuffering): MPNativeVideoEventTypeBufferingString, - @(MPNativeVideoEventTypeDownloadFinished): MPNativeVideoEventTypeDownloadFinishedString, - @(MPNativeVideoEventTypeErrorDuringPlayback): MPNativeVideoEventTypeErrorDuringPlaybackString, - @(MPNativeVideoEventTypeErrorFailedToPlay): MPNativeVideoEventTypeErrorFailedToPlayString}; - }); - - if (self = [[MPLogEvent alloc] initWithEventCategory:MPLogEventCategoryNativeVideo eventName:[nativeVideoLogEventTypeToString objectForKey:@(nativeVideoEventType)]]) { - [self setLogEventProperties:logEventProperties]; - } - return self; -} - -@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPLogEvent.h b/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPLogEvent.h deleted file mode 100644 index 20ce150e16..0000000000 --- a/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPLogEvent.h +++ /dev/null @@ -1,260 +0,0 @@ -// -// MPLogEvent.h -// MoPubSDK -// -// Copyright (c) 2015 MoPub. All rights reserved. -// - -#import -#import "MPAdConfiguration.h" - -#ifndef NS_ENUM -#define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type -#endif - -typedef NS_ENUM(NSInteger, MPLogEventScribeCategory) { - MPExchangeClientEventCategory, - MPExchangeClientErrorCategory, -}; - -typedef NS_ENUM(NSInteger, MPLogEventNetworkType) { - MPLogEventNetworkTypeUnknown, - MPLogEventNetworkTypeEthernet, - MPLogEventNetworkTypeWifi, - MPLogEventNetworkTypeMobile, -}; - -/* - * Event names. - */ -extern NSString *const MPLogEventNameAdRequest; -extern NSString *const MPLogEventNameClickthroughDwellTime; - -/* - * Event categories. - */ -extern NSString *const MPLogEventCategoryRequests; -extern NSString *const MPLogEventCategoryNativeVideo; -extern NSString *const MPLogEventCategoryAdInteractions; - -/* MPAdConfigurationLogEventProperties - * - * Convenience struct class for keeping track of the log event properties - * that are parsed off the MPAdConfiguration. - */ -@interface MPAdConfigurationLogEventProperties : NSObject - -@property (nonatomic, copy) NSString *adType; -@property (nonatomic, copy) NSString *adCreativeId; -@property (nonatomic, copy) NSString *dspCreativeId; -@property (nonatomic, copy) NSString *adNetworkType; -@property (nonatomic) CGSize adSize; -@property (nonatomic, copy) NSString *requestId; -@property (nonatomic, copy) NSString *adUnitId; - -- (instancetype)initWithConfiguration:(MPAdConfiguration *)configuration; - -@end - -@interface MPLogEvent : NSObject - -#pragma mark - Public properties - -/* Event details */ - -/** - * The event or error name. Examples include "ad_request", "ad_impression", "ad_click", - * "json_missing_required_fields", "invalid_url", "invalid_positioning_data". - */ -@property (nonatomic, copy) NSString *eventName; - -/** - * The event or error category. This is typically set to the component in which the event - * or error occurred. Examples include "network", "mraid_video", "mopub_native", "facebook_banner", - * "server_positioning", "client_positioning". - */ -@property (nonatomic, copy) NSString *eventCategory; - -/** - * Creation time of the object. - */ -@property (nonatomic, readonly) NSDate *timestamp; - -/** - * The scribe category that the log event will be bucketed into. - */ -@property (nonatomic, readonly) MPLogEventScribeCategory scribeCategory; - - -/* Ad details */ - -/** - * The MoPub AdUnit ID string that is associated with the event. - */ -@property (nonatomic, copy) NSString *adUnitId; - -/** - * The MoPub Creative ID string that is associated with the event. - */ -@property (nonatomic, copy) NSString *adCreativeId; - -/** - * The DSP Creative ID string that is associated with the event. - */ -@property (nonatomic, copy) NSString *dspCreativeId; - -/** - * Identifier for a class of ad. Examples include "html", "mraid", "interstitial", "json", - * "custom", "clear". - */ -@property (nonatomic, copy) NSString *adType; - -/** - * Identifier for an ad network type. Examples include "admob", "custom", "custom_native", "mojiva", - * "huntmads", "millennial". - */ -@property (nonatomic, copy) NSString *adNetworkType; - -/** - * The ad's size in device independent pixels (dips). - */ -@property (nonatomic) CGSize adSize; - -/* App details */ - -/** - * The name of the app the SDK is being included in - */ -@property (nonatomic, copy) NSString *appName; - -/** - * The app store identifier for the app the SDK is being included in - */ -@property (nonatomic, copy) NSString *appStoreId; - -/** - * The app store identifier for the app the SDK is being included in - */ -@property (nonatomic, copy) NSString *appBundleId; - -/** - * The version of the client app the SDK is included in - */ -@property (nonatomic, copy) NSString *appVersion; - - -/* Performance details */ - -/** - * Time taken in ms to perform a request or action - */ -@property (nonatomic, readonly) NSUInteger performanceDurationMs; - - -/* Request details */ - -/** - * The unique ID created by the MoPub ad server for the ad request - */ -@property (nonatomic, copy) NSString *requestId; - -/** - * The status code of the request from the MoPub ad server - */ -@property (nonatomic) NSUInteger requestStatusCode; - -/** - * The full URI for the request to the adserver - */ -@property (nonatomic, copy) NSString *requestURI; - -/** - * The number of retries made in the request. - */ -@property (nonatomic) NSUInteger requestRetries; - - -/** SDK details */ - -/** - * The current MoPub SDK version, e.g. "3.1.0" - */ -@property (nonatomic, copy, readonly) NSString *sdkVersion; - - -/* Device details */ - -/** - * The name of the device, e.g. iPhone, iPad, iPod - */ -@property (nonatomic, copy, readonly) NSString *deviceModel; - -/** - * The version of iOS running on the device, e.g. 8.0.1, 6.2.1, etc - */ -@property (nonatomic, copy, readonly) NSString *deviceOSVersion; - -/** - * The device's screen size in device independent pixels (dips). - */ -@property (nonatomic, readonly) CGSize deviceSize; - -/* Geo details */ - -/** - * Latitude and longitude - */ -@property (nonatomic, readonly) double geoLat; -@property (nonatomic, readonly) double geoLon; - -/** - * The radius of the circle in meters of the estimated accuracy of the latitude and longitude - */ -@property (nonatomic, readonly) double geoAccuracy; - - -/* Network/Carrier details */ - -@property (nonatomic, readonly) MPLogEventNetworkType networkType; -@property (nonatomic, copy, readonly) NSString *networkOperatorCode; -@property (nonatomic, copy, readonly) NSString *networkOperatorName; -@property (nonatomic, copy, readonly) NSString *networkISOCountryCode; -@property (nonatomic, copy, readonly) NSString *networkSIMCode; -@property (nonatomic, copy, readonly) NSString *networkSIMOperatorName; -@property (nonatomic, copy, readonly) NSString *networkSimISOCountryCode; - -/* Client details */ - -/** - * User specific, unique, resettable ID for advertising, i.e. IFA. - */ -@property (nonatomic, copy, readonly) NSString *clientAdvertisingId; - -/** - * Whether or not the user has limited ad tracking. - */ - -@property (nonatomic, readonly) BOOL clientDoNotTrack; - -- (instancetype)initWithEventCategory:(NSString *)eventCategory eventName:(NSString *)eventName; - -- (NSString *)serialize; -- (NSDictionary *)asDictionary; - -/** - * Current timestamp in ms since January 1, 1970 00:00:00.0 UTC (aka epoch time) - */ -- (NSUInteger)timestampAsEpoch; - -/** - * Record the end time for a timed event. The start time will be the event's timestamp, which is - * set on object creation. This will set the performanceDurationMs property with the timestamp - end time. - */ -- (void)recordEndTime; - -/** - * Convenience method to set common properties with the MPAdConfigurationLogEventProperties. - */ -- (void)setLogEventProperties:(MPAdConfigurationLogEventProperties *)logEventProperties; - -@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPLogEvent.m b/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPLogEvent.m deleted file mode 100644 index 66a8a632e9..0000000000 --- a/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPLogEvent.m +++ /dev/null @@ -1,294 +0,0 @@ -// -// MPLogEvent.m -// MoPubSDK -// -// Copyright (c) 2015 MoPub. All rights reserved. -// - -#import "MPLogEvent.h" -#import "MPIdentityProvider.h" -#import "MPInternalUtils.h" -#import "MPCoreInstanceProvider.h" -#import "MPConstants.h" -#import "MPReachability.h" -#import "MPGeolocationProvider.h" - -NSUInteger const IOS_APP_PLATFORM_ID = 1; -NSUInteger const IOS_SDK_PRODUCT_ID = 0; -NSString * const IOS_MANUFACTURER_NAME = @"Apple"; - -/* - * Event names. - */ -NSString * const MPLogEventNameAdRequest = @"ad_request"; -NSString * const MPLogEventNameClickthroughDwellTime = @"clickthrough_dwell_time"; - -/* - * Event categories. - */ -NSString * const MPLogEventCategoryRequests = @"requests"; -NSString * const MPLogEventCategoryNativeVideo = @"native_video"; -NSString * const MPLogEventCategoryAdInteractions = @"ad_interactions"; - -@interface MPAdConfigurationLogEventProperties () - -@end - -@implementation MPAdConfigurationLogEventProperties - -- (instancetype)initWithConfiguration:(MPAdConfiguration *)configuration -{ - if (self = [super init]) { - _adType = configuration.headerAdType; - _adCreativeId = configuration.creativeId; - _dspCreativeId = configuration.dspCreativeId; - _adNetworkType = configuration.networkType; - _adSize = configuration.preferredSize; - - NSDictionary *failURLQueryParameters = MPDictionaryFromQueryString([configuration.failoverURL query]); - _requestId = failURLQueryParameters[@"request_id"]; - _adUnitId = failURLQueryParameters[@"id"]; - } - return self; -} - -@end - - -#pragma mark - Private properties - -@interface MPLogEvent () - -@property (nonatomic, readwrite) NSDate *timestamp; -@property (nonatomic, readwrite) MPLogEventScribeCategory scribeCategory; -@property (nonatomic, copy, readwrite) NSString *sdkVersion; -@property (nonatomic, copy, readwrite) NSString *deviceModel; -@property (nonatomic, copy, readwrite) NSString *deviceOSVersion; -@property (nonatomic, readwrite) CGSize deviceSize; -@property (nonatomic, readwrite) double geoLat; -@property (nonatomic, readwrite) double geoLon; -@property (nonatomic, readwrite) double geoAccuracy; -@property (nonatomic, readwrite) MPLogEventNetworkType networkType; -@property (nonatomic, copy, readwrite) NSString *networkOperatorCode; -@property (nonatomic, copy, readwrite) NSString *networkOperatorName; -@property (nonatomic, copy, readwrite) NSString *networkISOCountryCode; -@property (nonatomic, readwrite) NSUInteger performanceDurationMs; -@property (nonatomic, copy, readwrite) NSString *networkSIMCode; -@property (nonatomic, copy, readwrite) NSString *networkSIMOperatorName; -@property (nonatomic, copy, readwrite) NSString *networkSimISOCountryCode; -@property (nonatomic, copy, readwrite) NSString *clientAdvertisingId; -@property (nonatomic, readwrite) BOOL clientDoNotTrack; - -@end - - -@implementation MPLogEvent - -- (instancetype)initWithEventCategory:(NSString *)eventCategory eventName:(NSString *)eventName -{ - if (self = [super init]) { - - MPCoreInstanceProvider *provider = [MPCoreInstanceProvider sharedProvider]; - - [self setEventName:eventName]; - [self setEventCategory:eventCategory]; - - [self setTimestamp:[NSDate date]]; - [self setScribeCategory:MPExchangeClientEventCategory]; - - // SDK Info - [self setSdkVersion:MP_SDK_VERSION]; - - // Device info - UIDevice *device = [UIDevice currentDevice]; - [self setDeviceModel:[device model]]; - [self setDeviceOSVersion:[device systemVersion]]; - - [self setDeviceSize:MPScreenBounds().size]; - - // Geolocation info - CLLocation *location = [[[MPCoreInstanceProvider sharedProvider] sharedMPGeolocationProvider] lastKnownLocation]; - [self setGeoLat:location.coordinate.latitude]; - [self setGeoLon:location.coordinate.longitude]; - [self setGeoAccuracy:location.horizontalAccuracy]; - - // Client info - [self setClientDoNotTrack:![MPIdentityProvider advertisingTrackingEnabled]]; - // Note: we've chosen at this time to never send the real IDFA. - [self setClientAdvertisingId:[MPIdentityProvider obfuscatedIdentifier]]; - - - // Network/Carrier info - if ([provider sharedMPReachability].hasWifi) { - [self setNetworkType:MPLogEventNetworkTypeWifi]; - } else if ([provider sharedMPReachability].hasCellular) { - [self setNetworkType:MPLogEventNetworkTypeMobile]; - - NSDictionary *carrierInfo = [[MPCoreInstanceProvider sharedProvider] sharedCarrierInfo]; - NSString *networkOperatorName = carrierInfo[@"carrierName"]; - NSString *mcc = carrierInfo[@"mobileCountryCode"]; - NSString *mnc = carrierInfo[@"mobileNetworkCode"]; - NSString *networkOperatorCode = [NSString stringWithFormat:@"%@%@", mcc, mnc]; - NSString *isoCountryCode = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode]; - - [self setNetworkOperatorName:networkOperatorName]; - [self setNetworkSIMOperatorName:networkOperatorName]; - - [self setNetworkSIMCode:networkOperatorCode]; - [self setNetworkOperatorCode:networkOperatorCode]; - - [self setNetworkISOCountryCode:isoCountryCode]; - [self setNetworkSimISOCountryCode:isoCountryCode]; - - } else { - [self setNetworkType:MPLogEventNetworkTypeUnknown]; - } - - } - - return self; -} - -- (void)setRequestURI:(NSString *)requestURI -{ - // We don't pass up the advertising identifier so we obfuscate it. - _requestURI = [requestURI stringByReplacingOccurrencesOfString:[MPIdentityProvider identifier] - withString:[MPIdentityProvider obfuscatedIdentifier]]; -} - -- (NSUInteger)appPlatform -{ - return IOS_APP_PLATFORM_ID; -} - -- (NSUInteger)sdkProduct -{ - return IOS_SDK_PRODUCT_ID; -} - -- (NSString *)deviceManufacturer -{ - return IOS_MANUFACTURER_NAME; -} - -/** - * Current timestamp in ms since January 1, 1970 00:00:00.0 UTC (aka epoch time) - */ -- (NSUInteger)timestampAsEpoch -{ - return [[self timestamp] timeIntervalSince1970]; -} - -- (NSString *)eventCategoryAsString -{ - return @"exchange_client_event"; -} - -- (NSUInteger)networkTypeAsInteger -{ - switch ([self networkType]) { - case MPLogEventNetworkTypeUnknown: - return 0; - break; - case MPLogEventNetworkTypeEthernet: - return 1; - break; - case MPLogEventNetworkTypeWifi: - return 2; - break; - case MPLogEventNetworkTypeMobile: - return 3; - break; - default: - return 0; - break; - } -} - -- (NSDictionary *)asDictionary -{ - NSMutableDictionary *d = [[NSMutableDictionary alloc] init]; - - [d mp_safeSetObject:[self eventCategoryAsString] forKey:@"_category_"]; - [d mp_safeSetObject:[self eventName] forKey:@"name"]; - [d mp_safeSetObject:[self eventCategory] forKey:@"name_category"]; - - [d mp_safeSetObject:@([self sdkProduct]) forKey:@"sdk_product"]; - [d mp_safeSetObject:[self sdkVersion] forKey:@"sdk_version"]; - - [d mp_safeSetObject:[self adUnitId] forKey:@"ad_unit_id"]; - [d mp_safeSetObject:[self adCreativeId] forKey:@"ad_creative_id"]; - [d mp_safeSetObject:[self dspCreativeId] forKey:@"dsp_creative_id"]; - [d mp_safeSetObject:[self adType] forKey:@"ad_type"]; - [d mp_safeSetObject:[self adNetworkType] forKey:@"ad_network_type"]; - [d mp_safeSetObject:@(self.adSize.width) forKey:@"ad_width_px"]; - [d mp_safeSetObject:@(self.adSize.height) forKey:@"ad_height_px"]; - - [d mp_safeSetObject:@([self appPlatform]) forKey:@"app_platform"]; - [d mp_safeSetObject:[self appName] forKey:@"app_name"]; - [d mp_safeSetObject:[self appStoreId] forKey:@"app_appstore_id"]; - [d mp_safeSetObject:[self appBundleId] forKey:@"app_bundle_id"]; - [d mp_safeSetObject:[self appVersion] forKey:@"app_version"]; - - [d mp_safeSetObject:[self clientAdvertisingId] forKey:@"client_advertising_id"]; - [d mp_safeSetObject:@([self clientDoNotTrack]) forKey:@"client_do_not_track"]; - - [d mp_safeSetObject:[self deviceManufacturer] forKey:@"device_manufacturer"]; - [d mp_safeSetObject:[self deviceModel] forKey:@"device_model"]; - [d mp_safeSetObject:[self deviceModel] forKey:@"device_product"]; - [d mp_safeSetObject:[self deviceOSVersion] forKey:@"device_os_version"]; - [d mp_safeSetObject:@(self.deviceSize.width) forKey:@"device_screen_width_px"]; - [d mp_safeSetObject:@(self.deviceSize.height) forKey:@"device_screen_height_px"]; - - [d mp_safeSetObject:@([self geoLat]) forKey:@"geo_lat"]; - [d mp_safeSetObject:@([self geoLon]) forKey:@"geo_lon"]; - [d mp_safeSetObject:@([self geoAccuracy]) forKey:@"geo_accuracy_radius_meters"]; - - [d mp_safeSetObject:@([self performanceDurationMs]) forKey:@"perf_duration_ms"]; - - [d mp_safeSetObject:@([self networkType]) forKey:@"network_type"]; - [d mp_safeSetObject:[self networkOperatorCode] forKey:@"network_operator_code"]; - [d mp_safeSetObject:[self networkOperatorName] forKey:@"network_operator_name"]; - [d mp_safeSetObject:[self networkISOCountryCode] forKey:@"network_iso_country_code"]; - [d mp_safeSetObject:[self networkSimISOCountryCode] forKey:@"network_sim_iso_country_code"]; - - [d mp_safeSetObject:[self requestId] forKey:@"req_id"]; - [d mp_safeSetObject:@([self requestStatusCode]) forKey:@"req_status_code"]; - [d mp_safeSetObject:[self requestURI] forKey:@"req_uri"]; - [d mp_safeSetObject:@([self requestRetries]) forKey:@"req_retries"]; - - [d mp_safeSetObject:@([self timestampAsEpoch]) forKey:@"timestamp_client"]; - - return d; -} - -- (NSString *)serialize -{ - NSData *data = [NSJSONSerialization dataWithJSONObject:[self asDictionary] options:0 error:nil]; - NSString *jsonString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; - - return jsonString; -} - -- (void)recordEndTime -{ - NSDate *currentTime = [NSDate date]; - NSTimeInterval durationMs = [currentTime timeIntervalSinceDate:self.timestamp] * 1000.0; - - self.performanceDurationMs = durationMs; -} - -- (void)setLogEventProperties:(MPAdConfigurationLogEventProperties *)logEventProperties -{ - if (logEventProperties) { - [self setAdType:logEventProperties.adType]; - [self setAdCreativeId:logEventProperties.adCreativeId]; - [self setDspCreativeId:logEventProperties.dspCreativeId]; - [self setAdNetworkType:logEventProperties.adNetworkType]; - [self setAdSize:logEventProperties.adSize]; - [self setRequestId:logEventProperties.requestId]; - [self setAdUnitId:logEventProperties.adUnitId]; - } -} - -@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPLogEventCommunicator.h b/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPLogEventCommunicator.h deleted file mode 100644 index 5f3995a3dd..0000000000 --- a/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPLogEventCommunicator.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// MPLogEventCommunicator.h -// MoPubSDK -// -// Copyright (c) 2015 MoPub. All rights reserved. -// - -#import - -@interface MPLogEventCommunicator : NSObject - -- (void)sendEvents:(NSArray *)events; -- (BOOL)isOverLimit; - -@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPLogEventCommunicator.m b/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPLogEventCommunicator.m deleted file mode 100644 index af9ec75ac2..0000000000 --- a/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPLogEventCommunicator.m +++ /dev/null @@ -1,94 +0,0 @@ -// -// MPLogEventCommunicator.m -// MoPubSDK -// -// Copyright (c) 2015 MoPub. All rights reserved. -// - -#import "MPLogEventCommunicator.h" -#import "MPLogging.h" -#import "MPLogEvent.h" -#import "MPRetryingHTTPOperation.h" -#import "MPNetworkManager.h" -#import "MPCoreInstanceProvider.h" - -static NSString *const kAnalyticsURL = @"https://analytics.mopub.com/i/jot/exchange_client_event"; - -static const NSInteger MAX_CONCURRENT_CONNECTIONS = 1; - -@interface MPLogEventCommunicator () - -#if !OS_OBJECT_USE_OBJC -@property (nonatomic, assign) dispatch_queue_t eventProcessingQueue; -#else -@property (nonatomic, strong) dispatch_queue_t eventProcessingQueue; -#endif - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////// - -@implementation MPLogEventCommunicator - -- (instancetype)init -{ - if (self = [super init]) { - _eventProcessingQueue = dispatch_queue_create("com.mopub.eventProcessingQueue", DISPATCH_QUEUE_SERIAL); - } - - return self; -} - -- (void)dealloc -{ -#if !OS_OBJECT_USE_OBJC - dispatch_release(_eventProcessingQueue); -#endif -} - -- (void)sendEvents:(NSArray *)events -{ - if (events && [events count]) { - dispatch_async(self.eventProcessingQueue, ^{ - NSURLRequest *request = [self buildRequestWithEvents:events]; - MPRetryingHTTPOperation *operation = [[MPRetryingHTTPOperation alloc] initWithRequest:request]; - [[[MPCoreInstanceProvider sharedProvider] sharedNetworkManager] addNetworkTransferOperation:operation]; - }); - } -} - -- (BOOL)isOverLimit -{ - if ([[[MPCoreInstanceProvider sharedProvider] sharedNetworkManager] networkTransferOperationCount] >= MAX_CONCURRENT_CONNECTIONS) { - return YES; - } - return NO; -} - -- (NSURLRequest *)buildRequestWithEvents:(NSArray *)events -{ - NSURL *URL = [NSURL URLWithString:kAnalyticsURL]; - NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:URL]; - [request setHTTPMethod:@"POST"]; - - NSString *POSTBodyString = [self makeParamStringForEvents:events]; - [request setHTTPBody:[POSTBodyString dataUsingEncoding:NSUTF8StringEncoding]]; - - return request; -} - -- (NSString *)makeParamStringForEvents:(NSArray *)events -{ - NSMutableArray *serializedEvents = [[NSMutableArray alloc] init]; - for (id event in events) { - [serializedEvents addObject:[event asDictionary]]; - } - NSData *jsonData = [NSJSONSerialization dataWithJSONObject:serializedEvents options:0 error:nil]; - - NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; - NSString *paramString = [NSString stringWithFormat:@"log=%@", [jsonString mp_URLEncodedString]]; - - return paramString; -} - -@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPLogEventRecorder.h b/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPLogEventRecorder.h deleted file mode 100644 index d32f3baddc..0000000000 --- a/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPLogEventRecorder.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// MPLogEventRecorder.h -// MoPubSDK -// -// Copyright (c) 2015 MoPub. All rights reserved. -// - -#import - -@class MPLogEvent; - -void MPAddLogEvent(MPLogEvent *event); - -@interface MPLogEventRecorder : NSObject - -- (void)addEvent:(MPLogEvent *)event; - -@end \ No newline at end of file diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPLogEventRecorder.m b/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPLogEventRecorder.m deleted file mode 100644 index 164bb06be9..0000000000 --- a/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPLogEventRecorder.m +++ /dev/null @@ -1,204 +0,0 @@ -// -// MPLogEventRecorder.m -// MoPubSDK - -// Copyright (c) 2015 MoPub. All rights reserved. -// - -#include -#import "MPLogEventRecorder.h" -#import "MPLogEvent.h" -#import "MPLogging.h" -#import "MPLogEventCommunicator.h" -#import "MPCoreInstanceProvider.h" -#import "MPTimer.h" - -void MPAddLogEvent(MPLogEvent *event) -{ - [[[MPCoreInstanceProvider sharedProvider] sharedLogEventRecorder] addEvent:event]; -} - -/** - * The max number of events allowed in the event queue. - */ -static const NSInteger QUEUE_LIMIT = 1000; - -/** - * The max number of events sent per request. - */ -static const NSInteger EVENT_SEND_THRESHOLD = 25; - -/** - * A number between 0 and 1 that represents the ratio at which events will be added - * to the event queue. For example, if SAMPLE_RATE is set to 0.2, then 20% of all - * events reported to the MPLogEventRecorder will be communicated to scribe. - */ -static const double SAMPLE_RATE = 0.1; - -/** - * The delay in seconds to wait until sending the next batch of events. - */ -static const NSTimeInterval POLL_DELAY_INTERVAL = 2 * 60; - -/** - * The maximum size of the requestIDLoggingCache. Note: since this is an - * NSCache, this is not a strict limit. - */ -static const NSInteger MAX_REQUEST_ID_CACHE_SIZE = 100; - -/////////////////////////////////////////////////////////////////////////// - -@interface MPLogEventRecorder () - -/** - * IMPORTANT: All access to self.events should be performed inside a block on self.dispatchQueue. - * This is to prevent concurrent access issues to the event array. - */ -@property (nonatomic) dispatch_queue_t dispatchQueue; -@property (nonatomic) NSMutableArray *events; -@property (nonatomic) NSCache *requestIDLoggingCache; - -@property (nonatomic) MPLogEventCommunicator *communicator; -@property (nonatomic) MPTimer *sendTimer; - -@end - -/////////////////////////////////////////////////////////////////////////// - -@implementation MPLogEventRecorder - -#pragma mark - Public methods - -- (instancetype)init -{ - if (self = [super init]) { - _events = [NSMutableArray array]; - _dispatchQueue = dispatch_queue_create("com.mopub.MPLogEventRecorder", NULL); - _communicator = [[MPLogEventCommunicator alloc] init]; - _sendTimer = [MPTimer timerWithTimeInterval:POLL_DELAY_INTERVAL - target:self - selector:@selector(sendEvents) - repeats:YES]; - [_sendTimer scheduleNow]; - _requestIDLoggingCache = [[NSCache alloc] init]; - _requestIDLoggingCache.countLimit = MAX_REQUEST_ID_CACHE_SIZE; - } - - return self; -} - -- (void)dealloc -{ - [self.sendTimer invalidate]; -} - -- (void)addEvent:(MPLogEvent *)event -{ - if (event) { - dispatch_async(self.dispatchQueue, ^{ - - // We only add the event to the queue if it's been selected for sampling. - if (![self sampleWithLogEvent:event]) { - MPLogDebug(@"RECORDER: Skipped adding log event to the queue because it failed the sample test."); - return; - } - - if ([self overQueueLimit]) { - MPLogDebug(@"RECORDER: Skipped adding log event to the queue because the event queue is over its size limit."); - return; - } - - [self.events addObject:event]; - MPLogDebug([NSString stringWithFormat:@"RECORDER: Event added. There are now %lu events in the queue.", (unsigned long)[self.events count]]); - }); - } -} - -#pragma mark - Private methods - -- (void)sendEvents -{ - dispatch_async(self.dispatchQueue, ^{ - MPLogDebug([NSString stringWithFormat:@"RECORDER: -sendEvents dispatched with %lu events in the queue.", (unsigned long)[self.events count]]); - - if ([self.communicator isOverLimit]) { - MPLogDebug(@"RECORDER: Skipped sending events because the communicator has too many active connections."); - return; - } - - if ([self.events count] == 0) { - return; - } - - if ([self.events count] > EVENT_SEND_THRESHOLD) { - MPLogDebug(@"RECORDER: Enqueueing a portion of events to be scribed."); - - // If we have more events than we can send at once, then send only the first slice. - NSRange sendRange; - sendRange.location = 0; - sendRange.length = EVENT_SEND_THRESHOLD; - NSArray *eventsToSend = [self.events subarrayWithRange:sendRange]; - - // Don't flush the event array in this case, because we'll have more to send in the - // future. - NSRange unSentRange; - unSentRange.location = sendRange.length; - unSentRange.length = [self.events count] - sendRange.length; - NSArray *unSentEvents = [self.events subarrayWithRange:unSentRange]; - - [self.communicator sendEvents:eventsToSend]; - self.events = [unSentEvents mutableCopy]; - } else { - MPLogDebug(@"RECORDER: Enqueueing all events to be scribed."); - [self.communicator sendEvents:[NSArray arrayWithArray:self.events]]; - [self.events removeAllObjects]; - } - - MPLogDebug([NSString stringWithFormat:@"RECORDER: There are now %lu events in the queue.", (unsigned long)[self.events count]]); - }); -} - -/** - * IMPORTANT: This method should only be called inside a block on the object's dispatch queue. - */ -- (BOOL)overQueueLimit -{ - return [self.events count] >= QUEUE_LIMIT; -} - -/* - Using this sampling method will ensure sampling decision remains constant for each request id. - */ -- (BOOL)sampleWithLogEvent:(MPLogEvent *)event -{ - BOOL samplingResult; - if (!event.requestId) { - samplingResult = [self sample]; - } else { - NSNumber *existingSampleAsNumber = [self.requestIDLoggingCache objectForKey:event.requestId]; - if (existingSampleAsNumber) { - samplingResult = [existingSampleAsNumber boolValue]; - } else { - samplingResult = [self sample]; - [self.requestIDLoggingCache setObject:[NSNumber numberWithBool:samplingResult] forKey:event.requestId]; - } - } - return samplingResult; -} - -- (BOOL)sample -{ - NSUInteger diceRoll = arc4random_uniform(100); - return [self shouldSampleForRate:SAMPLE_RATE diceRoll:diceRoll]; -} - -/** - * IMPORTANT: This method takes a sample rate between 0 and 1, and the diceRoll is intended to be between 0 and 100. It has been separated from the -(BOOL)sample method for easier testing. - */ -- (BOOL)shouldSampleForRate:(CGFloat)sampleRate diceRoll:(NSUInteger)diceRoll -{ - NSUInteger sample = (NSUInteger)(sampleRate*100); - return diceRoll < sample; -} - -@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPNetworkManager.h b/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPNetworkManager.h deleted file mode 100644 index 55e955864a..0000000000 --- a/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPNetworkManager.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// MPNetworkManager.h -// MoPub -// -// Copyright (c) 2015 MoPub. All rights reserved. -// - -#import - -// Adapted from NetworkManager in Apple's MVCNetworking sample code. - -// The shared instance of this class provides a way for clients to execute network-related -// operations while minimizing the impact to tasks executing on the main thread. In order to do -// this, it manages a single dedicated networking thread. - -@interface MPNetworkManager : NSObject - -@property (assign, readonly) NSUInteger networkTransferOperationCount; - -// Returns the network manager shared instance. -+ (instancetype)sharedNetworkManager; - -// Adds the specified operation object to an internal operation queue reserved for network transfer -// operations. -// -// If the specified operation supports the `runLoopThread` property and the value of that property -// is nil, this method sets the run loop thread of the operation to the dedicated networking thread. -// Any callbacks from an asynchronous network request will then run on the networking thread's -// run loop, rather than the main run loop. -- (void)addNetworkTransferOperation:(NSOperation *)operation; - -// Cancels the specified operation. -- (void)cancelOperation:(NSOperation *)operation; - -@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPNetworkManager.m b/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPNetworkManager.m deleted file mode 100644 index 478ef6c284..0000000000 --- a/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPNetworkManager.m +++ /dev/null @@ -1,93 +0,0 @@ -// -// MPNetworkManager.m -// MoPub -// -// Copyright (c) 2015 MoPub. All rights reserved. -// - -#import "MPNetworkManager.h" - -#import "MPCoreInstanceProvider.h" -#import "MPRetryingHTTPOperation.h" - -static const double kNetworkThreadPriority = 0.3; - -//////////////////////////////////////////////////////////////////////////////////////////////////// - -@interface MPNetworkManager () - -@property (strong) NSThread *networkThread; -@property (strong, readwrite) NSOperationQueue *networkTransferQueue; - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////// - -@implementation MPNetworkManager - -+ (instancetype)sharedNetworkManager -{ - static MPNetworkManager *sNetworkManager = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - sNetworkManager = [[[self class] alloc] init]; - [sNetworkManager startNetworkThread]; - }); - return sNetworkManager; -} - -- (instancetype)init -{ - self = [super init]; - if (self) { - _networkThread = [[NSThread alloc] initWithTarget:self selector:@selector(networkThreadMain) object:nil]; - _networkThread.name = @"com.mopub.MPNetworkManager"; - _networkThread.threadPriority = kNetworkThreadPriority; - - _networkTransferQueue = [[NSOperationQueue alloc] init]; - _networkTransferQueue.maxConcurrentOperationCount = 1; - } - return self; -} - -- (void)startNetworkThread -{ - [self.networkThread start]; -} - -- (void)networkThreadMain -{ - NSAssert(![NSThread isMainThread], @"The network thread should not be the main thread."); - - @autoreleasepool { - // Add a dummy input source to prevent the run loop from exiting immediately. - NSRunLoop *runLoop = [NSRunLoop currentRunLoop]; - [runLoop addPort:[NSMachPort port] forMode:NSDefaultRunLoopMode]; - [runLoop run]; - } -} - -#pragma mark - Public - -- (void)addNetworkTransferOperation:(NSOperation *)operation -{ - if ([operation respondsToSelector:@selector(setRunLoopThread:)]) { - if (![(id)operation runLoopThread]) { - [(id)operation setRunLoopThread:self.networkThread]; - } - } - - [self.networkTransferQueue addOperation:operation]; -} - -- (void)cancelOperation:(NSOperation *)operation -{ - [operation cancel]; -} - -- (NSUInteger)networkTransferOperationCount -{ - return [self.networkTransferQueue operationCount]; -} - -@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPQRunLoopOperation.h b/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPQRunLoopOperation.h deleted file mode 100644 index f57e4cfa21..0000000000 --- a/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPQRunLoopOperation.h +++ /dev/null @@ -1,117 +0,0 @@ -// -// MPQRunLoopOperation.h -// MoPub -// -// Copyright (c) 2015 MoPub. All rights reserved. -// - -/* - File: QRunLoopOperation.h - Contains: An abstract subclass of NSOperation for async run loop based operations. - Written by: DTS - Copyright: Copyright (c) 2010 Apple Inc. All Rights Reserved. - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc. - ("Apple") in consideration of your agreement to the following - terms, and your use, installation, modification or - redistribution of this Apple software constitutes acceptance of - these terms. If you do not agree with these terms, please do - not use, install, modify or redistribute this Apple software. - In consideration of your agreement to abide by the following - terms, and subject to these terms, Apple grants you a personal, - non-exclusive license, under Apple's copyrights in this - original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or - without modifications, in source and/or binary forms; provided - that if you redistribute the Apple Software in its entirety and - without modifications, you must retain this notice and the - following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks - or logos of Apple Inc. may be used to endorse or promote - products derived from the Apple Software without specific prior - written permission from Apple. Except as expressly stated in - this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any - patent rights that may be infringed by your derivative works or - by other works in which the Apple Software may be incorporated. - The Apple Software is provided by Apple on an "AS IS" basis. - APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING - WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING - THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, - INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY - OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY - OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR - OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. -*/ - -#import - -typedef enum { - MPQRunLoopOperationStateInited, - MPQRunLoopOperationStateExecuting, - MPQRunLoopOperationStateFinished -} MPQRunLoopOperationState; - -//////////////////////////////////////////////////////////////////////////////////////////////////// - -// Adapted from QRunLoopOperation in Apple's MVCNetworking sample code. - -@interface MPQRunLoopOperation : NSOperation - -// Things you can configure before queuing the operation. - -// IMPORTANT: Do not change these after queuing the operation; it's very likely that -// bad things will happen if you do. - -@property (strong) NSThread *runLoopThread; -@property (copy) NSSet *runLoopModes; - -// Things that are only meaningful after the operation is finished. - -@property (copy, readonly) NSError *error; - -// Things you can only alter implicitly. - -@property (assign, readonly) MPQRunLoopOperationState state; -@property (strong, readonly) NSThread *actualRunLoopThread; -@property (assign, readonly) BOOL isActualRunLoopThread; -@property (copy, readonly) NSSet *actualRunLoopModes; - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////// - -@interface MPQRunLoopOperation (SubClassSupport) - -// Override points - -// A subclass will probably need to override -operationDidStart and -operationWillFinish -// to set up and tear down its run loop sources, respectively. These are always called -// on the actual run loop thread. -// -// Note that -operationWillFinish will be called even if the operation is cancelled. -// -// -operationWillFinish can check the error property to see whether the operation was -// successful. error will be NSCocoaErrorDomain/NSUserCancelledError on cancellation. -// -// -operationDidStart is allowed to call -finishWithError:. - -- (void)operationDidStart; -- (void)operationWillFinish; - -// Support methods - -// A subclass should call finishWithError: when the operation is complete, passing nil -// for no error and an error otherwise. It must call this on the actual run loop thread. -// -// Note that this will call -operationWillFinish before returning. - -- (void)finishWithError:(NSError *)error; - -@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPQRunLoopOperation.m b/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPQRunLoopOperation.m deleted file mode 100644 index e431d97274..0000000000 --- a/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPQRunLoopOperation.m +++ /dev/null @@ -1,265 +0,0 @@ -// -// MPQRunLoopOperation.m -// MoPub -// -// Copyright (c) 2015 MoPub. All rights reserved. -// - -/* - File: QRunLoopOperation.m - Contains: An abstract subclass of NSOperation for async run loop based operations. - Written by: DTS - Copyright: Copyright (c) 2010 Apple Inc. All Rights Reserved. - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc. - ("Apple") in consideration of your agreement to the following - terms, and your use, installation, modification or - redistribution of this Apple software constitutes acceptance of - these terms. If you do not agree with these terms, please do - not use, install, modify or redistribute this Apple software. - In consideration of your agreement to abide by the following - terms, and subject to these terms, Apple grants you a personal, - non-exclusive license, under Apple's copyrights in this - original Apple software (the "Apple Software"), to use, - reproduce, modify and redistribute the Apple Software, with or - without modifications, in source and/or binary forms; provided - that if you redistribute the Apple Software in its entirety and - without modifications, you must retain this notice and the - following text and disclaimers in all such redistributions of - the Apple Software. Neither the name, trademarks, service marks - or logos of Apple Inc. may be used to endorse or promote - products derived from the Apple Software without specific prior - written permission from Apple. Except as expressly stated in - this notice, no other rights or licenses, express or implied, - are granted by Apple herein, including but not limited to any - patent rights that may be infringed by your derivative works or - by other works in which the Apple Software may be incorporated. - The Apple Software is provided by Apple on an "AS IS" basis. - APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING - WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING - THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, - INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY - OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION - OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY - OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR - OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. -*/ - -#import "MPQRunLoopOperation.h" - -@interface MPQRunLoopOperation () - -@property (assign, readwrite) MPQRunLoopOperationState state; -@property (copy, readwrite) NSError *error; - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////// - -@implementation MPQRunLoopOperation - -// Necessary since auto-synthesize doesn't happen when we manually implement both getter / setter. -@synthesize state = _state; - -- (instancetype)init -{ - self = [super init]; - if (self) { - NSAssert(_state == MPQRunLoopOperationStateInited, @"MPQRunLoopOperation must be in the inited state upon initialization."); - } - return self; -} - -#pragma mark - Properties - -// Returns the effective run loop thread, that is, the one set by the user -// or, if that's not set, the main thread. -- (NSThread *)actualRunLoopThread -{ - return self.runLoopThread ?: [NSThread mainThread]; -} - -// Returns YES if the current thread is the actual run loop thread. -- (BOOL)isActualRunLoopThread -{ - return [[NSThread currentThread] isEqual:[self actualRunLoopThread]]; -} - -// Returns the run loop modes in which this operation can be executed. If the user provides a set -// of run loop modes, this method will return that set; otherwise, it will return a set containing -// the default run loop mode. -- (NSSet *)actualRunLoopModes -{ - return ([self.runLoopModes count] != 0) ? self.runLoopModes : [NSSet setWithObject:NSDefaultRunLoopMode]; -} - -#pragma mark - Core state transitions - -- (MPQRunLoopOperationState)state -{ - return _state; -} - -- (void)setState:(MPQRunLoopOperationState)newState -{ - @synchronized(self) { - MPQRunLoopOperationState oldState; - - // The following check is really important. The state can only go forward, and there - // should be no redundant changes to the state (that is, newState must never be - // equal to _state). - - assert(newState > _state); - - // inited -> executing = update isExecuting - // inited -> finished = update isFinished - // executing -> finished = update both isExecuting and isFinished - - oldState = _state; - - if ((newState == MPQRunLoopOperationStateExecuting) || (oldState == MPQRunLoopOperationStateExecuting)) { - [self willChangeValueForKey:@"isExecuting"]; - } - if (newState == MPQRunLoopOperationStateFinished) { - [self willChangeValueForKey:@"isFinished"]; - } - - _state = newState; - - if (newState == MPQRunLoopOperationStateFinished) { - [self didChangeValueForKey:@"isFinished"]; - } - if ((newState == MPQRunLoopOperationStateExecuting) || (oldState == MPQRunLoopOperationStateExecuting)) { - [self didChangeValueForKey:@"isExecuting"]; - } - } -} - -- (void)startOnRunLoopThread -{ - NSAssert([self isActualRunLoopThread], @"-startOnRunLoopThread must be called on the run loop thread."); - NSAssert(self.state == MPQRunLoopOperationStateExecuting, @"The operation should be in the executing state."); - - if (self.isCancelled) { - // We were cancelled before we even got running. Flip the finished state immediately. - [self finishWithError:[NSError errorWithDomain:NSCocoaErrorDomain code:NSUserCancelledError userInfo:nil]]; - } else { - [self operationDidStart]; - } -} - -- (void)cancelOnRunLoopThread -{ - NSAssert([self isActualRunLoopThread], @"-cancelOnRunLoopThread must be called on the run loop thread."); - - // We know that a) state was kQRunLoopOperationStateExecuting when we were - // scheduled (that's enforced by -cancel), and b) the state can't go - // backwards (that's enforced by -setState), so we know the state must - // either be kQRunLoopOperationStateExecuting or kQRunLoopOperationStateFinished. - // We also know that the transition from executing to finished always - // happens on the run loop thread. Thus, we don't need to lock here. - // We can look at state and, if we're executing, trigger a cancellation. - - if (self.state == MPQRunLoopOperationStateExecuting) { - [self finishWithError:[NSError errorWithDomain:NSCocoaErrorDomain code:NSUserCancelledError userInfo:nil]]; - } -} - -- (void)finishWithError:(NSError *)error -{ - NSAssert([self isActualRunLoopThread], @"-finishWithError: must be called on the run loop thread."); - - // `error` may be nil, since this method serves as the "exit" point for the operation and will - // get called in both the success and the failure cases. - - if (!self.error) { - self.error = error; - } - - [self operationWillFinish]; - - self.state = MPQRunLoopOperationStateFinished; -} - -#pragma mark - Subclass override points - -- (void)operationDidStart -{ - NSAssert([self isActualRunLoopThread], @"-operationDidStart must be called on the run loop thread."); -} - -- (void)operationWillFinish -{ - NSAssert([self isActualRunLoopThread], @"-operationWillFinish must be called on the run loop thread."); -} - -#pragma mark - NSOperation overrides - -/* - * All of the following overridden methods must be thread-safe. - */ - -- (BOOL)isConcurrent -{ - return YES; -} - -- (BOOL)isExecuting -{ - return self.state == MPQRunLoopOperationStateExecuting; -} - -- (BOOL)isFinished -{ - return self.state == MPQRunLoopOperationStateFinished; -} - -- (void)start -{ - NSAssert(self.state == MPQRunLoopOperationStateInited, @"-start cannot be called on an executing or finished operation."); - - // We have to change the state here, otherwise isExecuting won't necessarily return - // true by the time we return from -start. Also, we don't test for cancellation - // here because that would a) result in us sending isFinished notifications on a - // thread that isn't our run loop thread, and b) confuse the core cancellation code, - // which expects to run on our run loop thread. Finally, we don't have to worry - // about races with other threads calling -start. Only one thread is allowed to - // start us at a time - - self.state = MPQRunLoopOperationStateExecuting; - [self performSelector:@selector(startOnRunLoopThread) onThread:self.actualRunLoopThread withObject:nil waitUntilDone:NO modes:[self.actualRunLoopModes allObjects]]; -} - -- (void)cancel -{ - BOOL shouldRunCancelOnRunLoopThread; - BOOL wasAlreadyCancelled; - - // We need to synchronise here to avoid state changes to isCancelled and state - // while we're running. - - @synchronized(self) { - wasAlreadyCancelled = self.isCancelled; - - // Call our super class so that isCancelled starts returning true immediately. - [super cancel]; - - // If we were the one to set isCancelled (that is, we won the race with regards - // other threads calling -cancel) and we're actually running (that is, we lost - // the race with other threads calling -start and the run loop thread finishing), - // we schedule to run on the run loop thread. - - shouldRunCancelOnRunLoopThread = !wasAlreadyCancelled && self.state == MPQRunLoopOperationStateExecuting; - } - - if (shouldRunCancelOnRunLoopThread) { - [self performSelector:@selector(cancelOnRunLoopThread) onThread:[self actualRunLoopThread] withObject:nil waitUntilDone:NO modes:[self.actualRunLoopModes allObjects]]; - } -} - -@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPRetryingHTTPOperation.h b/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPRetryingHTTPOperation.h deleted file mode 100644 index 0cde2fbe97..0000000000 --- a/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPRetryingHTTPOperation.h +++ /dev/null @@ -1,34 +0,0 @@ -// -// MPRetryingHTTPOperation.h -// MoPub -// -// Copyright (c) 2015 MoPub. All rights reserved. -// - -#import - -#import "MPQRunLoopOperation.h" - -extern NSString * const MPRetryingHTTPOperationErrorDomain; - -typedef enum { - MPRetryingHTTPOperationReceivedNonRetryResponse = -1000, - MPRetryingHTTPOperationExceededRetryLimit = -1001 -} MPRetryingHTTPOperationErrorCode; - -//////////////////////////////////////////////////////////////////////////////////////////////////// - -// Adapted from QHTTPOperation / RetryingHTTPOperation in Apple's MVCNetworking sample code. - -@interface MPRetryingHTTPOperation : MPQRunLoopOperation - -// Things that are configured via the init method and can't be changed. -@property (copy, readonly) NSURLRequest *request; - -// Things that are only meaningful after the operation is finished. -@property (copy, readonly) NSHTTPURLResponse *lastResponse; -@property (strong, readonly) NSMutableData *lastReceivedData; - -- (instancetype)initWithRequest:(NSURLRequest *)request; - -@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPRetryingHTTPOperation.m b/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPRetryingHTTPOperation.m deleted file mode 100644 index 49a55c638b..0000000000 --- a/iphone/Maps/3party/MoPubSDK/Internal/Event Logging/MPRetryingHTTPOperation.m +++ /dev/null @@ -1,147 +0,0 @@ -// -// MPRetryingHTTPOperation.m -// MoPub -// -// Copyright (c) 2015 MoPub. All rights reserved. -// - -#import "MPRetryingHTTPOperation.h" - -#import "MPLogging.h" - -NSString * const MPRetryingHTTPOperationErrorDomain = @"com.mopub.MPRetryingHTTPOperation"; -static const NSUInteger kMaximumFailedRetryAttempts = 5; - -//////////////////////////////////////////////////////////////////////////////////////////////////// - -@interface MPRetryingHTTPOperation () - -@property (copy, readwrite) NSURLRequest *request; -@property (strong) NSURLConnection *connection; -@property (copy, readwrite) NSHTTPURLResponse *lastResponse; -@property (strong, readwrite) NSMutableData *lastReceivedData; -@property (assign) NSUInteger failedRetryAttempts; - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////// - -@implementation MPRetryingHTTPOperation - -- (instancetype)initWithRequest:(NSURLRequest *)request -{ - NSAssert(request != nil, @"-initWithRequest: cannot take a nil request."); - NSAssert([request URL] != nil, @"-initWithRequest: cannot take a request whose URL is nil."); - - NSString *scheme = [[[request URL] scheme] lowercaseString]; - NSAssert([scheme isEqualToString:@"http"] || [scheme isEqualToString:@"https"], @"-initWithRequest: can only take a request whose URL has an HTTP/HTTPS scheme."); - - self = [super init]; - if (self) { - _request = [request copy]; - _connection = [[NSURLConnection alloc] initWithRequest:request delegate:self startImmediately:NO]; - } - return self; -} - -#pragma mark - MPQRunLoopOperation overrides - -- (void)operationDidStart -{ - [super operationDidStart]; - - MPLogDebug(@"Starting request: %@.", self.request); - [self.connection scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; - [self.connection start]; -} - -- (void)operationWillFinish -{ - [super operationWillFinish]; - - [self.connection cancel]; - self.connection = nil; -} - -#pragma mark - Internal - -- (BOOL)shouldRetryForResponse:(NSHTTPURLResponse *)response -{ - return response.statusCode == 503 || response.statusCode == 504; -} - -- (NSTimeInterval)retryDelayForFailedAttempts:(NSUInteger)failedAttempts -{ - if (failedAttempts == 0) { - // Return a short delay if this method is called when there have been no failed retries. - return 1; - } else { - return pow(2, failedAttempts - 1) * 60; - } -} - -- (void)retry -{ - NSAssert([self isActualRunLoopThread], @"Retries should occur on the run loop thread."); - - MPLogDebug(@"Retrying request: %@.", self.request); - - [self.lastReceivedData setLength:0]; - - self.connection = [[NSURLConnection alloc] initWithRequest:self.request delegate:self startImmediately:NO]; - [self.connection scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; - [self.connection start]; -} - -#pragma mark - - -- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response -{ - NSAssert([self isActualRunLoopThread], @"NSURLConnection callbacks should occur on the run loop thread."); - NSAssert([response isKindOfClass:[NSHTTPURLResponse class]], @"Response must be of type NSHTTPURLResponse."); - - self.lastResponse = (NSHTTPURLResponse *)response; -} - -- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data -{ - NSAssert([self isActualRunLoopThread], @"NSURLConnection callbacks should occur on the run loop thread."); - - if (!self.lastReceivedData) { - self.lastReceivedData = [NSMutableData data]; - } - - [self.lastReceivedData appendData:data]; -} - -- (void)connectionDidFinishLoading:(NSURLConnection *)connection -{ - NSAssert([self isActualRunLoopThread], @"NSURLConnection callbacks should occur on the run loop thread."); - - if (self.lastResponse.statusCode == 200) { - MPLogDebug(@"Successful request: %@.", self.request); - [self finishWithError:nil]; - } else if (self.failedRetryAttempts > kMaximumFailedRetryAttempts) { - MPLogDebug(@"Too many failed attempts for this request: %@.", self.request); - [self finishWithError:[NSError errorWithDomain:MPRetryingHTTPOperationErrorDomain code:MPRetryingHTTPOperationExceededRetryLimit userInfo:nil]]; - } else if ([self shouldRetryForResponse:self.lastResponse]) { - self.failedRetryAttempts++; - NSTimeInterval retryDelay = [self retryDelayForFailedAttempts:self.failedRetryAttempts]; - MPLogDebug(@"Server error during attempt #%@ for request: %@.", @(self.failedRetryAttempts), self.request); - MPLogDebug(@"Backing off: %.1f", retryDelay); - [self performSelector:@selector(retry) withObject:nil afterDelay:retryDelay]; - } else { - MPLogDebug(@"%@", [[NSString alloc] initWithData:self.request.HTTPBody encoding:NSUTF8StringEncoding]); - MPLogDebug(@"Failed request: %@, status code: %ld, error: %@.", self.request, self.lastResponse.statusCode, self.error); - [self finishWithError:[NSError errorWithDomain:MPRetryingHTTPOperationErrorDomain code:MPRetryingHTTPOperationReceivedNonRetryResponse userInfo:nil]]; - } -} - -- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error -{ - NSAssert([self isActualRunLoopThread], @"NSURLConnection callbacks should occur on the run loop thread."); - - [self finishWithError:error]; -} - -@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/HTML/MPAdWebViewAgent.h b/iphone/Maps/3party/MoPubSDK/Internal/HTML/MPAdWebViewAgent.h index 1d086166e9..2647913790 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/HTML/MPAdWebViewAgent.h +++ b/iphone/Maps/3party/MoPubSDK/Internal/HTML/MPAdWebViewAgent.h @@ -19,12 +19,15 @@ typedef NSUInteger MPAdWebViewEvent; @class MPAdConfiguration; @class CLLocation; +@class MPViewabilityTracker; @interface MPAdWebViewAgent : NSObject @property (nonatomic, strong) MPWebView *view; @property (nonatomic, weak) id delegate; +@property (nonatomic, strong, readonly) MPViewabilityTracker *viewabilityTracker; + - (id)initWithAdWebViewFrame:(CGRect)frame delegate:(id)delegate; - (void)loadConfiguration:(MPAdConfiguration *)configuration; - (void)rotateToOrientation:(UIInterfaceOrientation)orientation; @@ -34,6 +37,8 @@ typedef NSUInteger MPAdWebViewEvent; - (void)enableRequestHandling; - (void)disableRequestHandling; +- (void)startViewabilityTracker; + @end @protocol MPAdWebViewAgentDelegate diff --git a/iphone/Maps/3party/MoPubSDK/Internal/HTML/MPAdWebViewAgent.m b/iphone/Maps/3party/MoPubSDK/Internal/HTML/MPAdWebViewAgent.m index 1e53f91383..06fd6f358b 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/HTML/MPAdWebViewAgent.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/HTML/MPAdWebViewAgent.m @@ -20,6 +20,9 @@ #import "NSURL+MPAdditions.h" #import "MPInternalUtils.h" #import "MPAPIEndPoints.h" +#import "MoPub.h" +#import "MPViewabilityTracker.h" +#import "NSString+MPAdditions.h" #ifndef NSFoundationVersionNumber_iOS_6_1 #define NSFoundationVersionNumber_iOS_6_1 993.00 @@ -36,6 +39,7 @@ @property (nonatomic, assign) BOOL userInteractedWithWebView; @property (nonatomic, strong) MPUserInteractionGestureRecognizer *userInteractionRecognizer; @property (nonatomic, assign) CGRect frame; +@property (nonatomic, strong, readwrite) MPViewabilityTracker *viewabilityTracker; - (void)performActionForMoPubSpecificURL:(NSURL *)URL; - (BOOL)shouldIntercept:(NSURL *)URL navigationType:(UIWebViewNavigationType)navigationType; @@ -60,7 +64,7 @@ if (self) { _frame = frame; - self.destinationDisplayAgent = [[MPCoreInstanceProvider sharedProvider] buildMPAdDestinationDisplayAgentWithDelegate:self]; + self.destinationDisplayAgent = [MPAdDestinationDisplayAgent agentWithDelegate:self]; self.delegate = delegate; self.shouldHandleRequests = YES; self.adAlertManager = [[MPCoreInstanceProvider sharedProvider] buildMPAdAlertManagerWithDelegate:self]; @@ -74,6 +78,7 @@ - (void)dealloc { + [self.viewabilityTracker stopTracking]; self.userInteractionRecognizer.delegate = nil; [self.userInteractionRecognizer removeTarget:self action:nil]; [self.destinationDisplayAgent cancel]; @@ -119,7 +124,8 @@ [self.view removeFromSuperview]; self.view = nil; } - self.view = [[MPWebView alloc] initWithFrame:self.frame forceUIWebView:self.configuration.forceUIWebView]; + self.view = [[MPWebView alloc] initWithFrame:self.frame]; + self.view.shouldConformToSafeArea = [self isInterstitialAd]; self.view.delegate = self; [self.view addGestureRecognizer:self.userInteractionRecognizer]; @@ -135,15 +141,12 @@ } } - // excuse interstitials from user tapped check since it's already a takeover experience - // and certain videos may delay tap gesture recognition - if (configuration.adType == MPAdTypeInterstitial) { - self.userInteractedWithWebView = YES; - } - [self.view mp_setScrollable:configuration.scrollable]; [self.view disableJavaScriptDialogs]; + // Initialize viewability trackers before loading self.view + [self init3rdPartyViewabilityTrackers]; + [self.view loadHTMLString:[configuration adResponseHTMLString] baseURL:[NSURL URLWithString:[MPAPIEndpoints baseURL]] ]; @@ -155,6 +158,12 @@ { switch (event) { case MPAdWebViewEventAdDidAppear: + // For banner, viewability tracker is handled right after adView is initialized (not here). + // For interstitial (handled here), we start tracking viewability if it's not started during adView initialization. + if (![self shouldStartViewabilityDuringInitialization]) { + [self startViewabilityTracker]; + } + [self.view stringByEvaluatingJavaScriptFromString:@"webviewDidAppear();"]; break; case MPAdWebViewEventAdDidDisappear: @@ -165,6 +174,11 @@ } } +- (void)startViewabilityTracker +{ + [self.viewabilityTracker startTracking]; +} + - (void)disableRequestHandling { self.shouldHandleRequests = NO; @@ -237,7 +251,6 @@ [self.view disableJavaScriptDialogs]; } - #pragma mark - MoPub-specific URL handlers - (void)performActionForMoPubSpecificURL:(NSURL *)URL { @@ -264,12 +277,10 @@ { if ([URL mp_hasTelephoneScheme] || [URL mp_hasTelephonePromptScheme]) { return YES; - } else if (!(self.configuration.shouldInterceptLinks)) { - return NO; } else if (navigationType == UIWebViewNavigationTypeLinkClicked) { return YES; - } else if (navigationType == UIWebViewNavigationTypeOther) { - return [[URL absoluteString] hasPrefix:[self.configuration clickDetectionURLPrefix]]; + } else if (navigationType == UIWebViewNavigationTypeOther && self.userInteractedWithWebView) { + return YES; } else { return NO; } @@ -290,6 +301,27 @@ #pragma mark - Utility +- (void)init3rdPartyViewabilityTrackers +{ + self.viewabilityTracker = [[MPViewabilityTracker alloc] initWithAdView:self.view isVideo:self.configuration.isVastVideoPlayer startTrackingImmediately:[self shouldStartViewabilityDuringInitialization]]; +} + +- (BOOL)shouldStartViewabilityDuringInitialization +{ + // If viewabile impression tracking experiment is enabled, we defer viewability trackers until + // ad view is at least x pixels on screen for y seconds, where x and y are configurable values defined in server. + if (self.adConfiguration.visibleImpressionTrackingEnabled) { + return NO; + } + + return ![self isInterstitialAd]; +} + +- (BOOL)isInterstitialAd +{ + return (self.configuration.adType == MPAdTypeInterstitial); +} + - (void)initAdAlertManager { self.adAlertManager.adConfiguration = self.configuration; @@ -326,15 +358,6 @@ angle]; [self.view stringByEvaluatingJavaScriptFromString:orientationEventScript]; - // XXX: If the UIWebView is rotated off-screen (which may happen with interstitials), its - // content may render off-center upon display. We compensate by setting the viewport meta tag's - // 'width' attribute to be the size of the webview. - NSString *viewportUpdateScript = [NSString stringWithFormat: - @"document.querySelector('meta[name=viewport]')" - @".setAttribute('content', 'width=%f;', false);", - self.view.frame.size.width]; - [self.view stringByEvaluatingJavaScriptFromString:viewportUpdateScript]; - // XXX: In iOS 7, off-screen UIWebViews will fail to render certain image creatives. // Specifically, creatives that only contain an tag whose src attribute uses a 302 // redirect will not be rendered at all. One workaround is to temporarily change the web view's diff --git a/iphone/Maps/3party/MoPubSDK/Internal/HTML/MPHTMLBannerCustomEvent.m b/iphone/Maps/3party/MoPubSDK/Internal/HTML/MPHTMLBannerCustomEvent.m index af30a10e79..f36d667cf9 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/HTML/MPHTMLBannerCustomEvent.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/HTML/MPHTMLBannerCustomEvent.m @@ -10,6 +10,7 @@ #import "MPLogging.h" #import "MPAdConfiguration.h" #import "MPInstanceProvider.h" +#import "MPAnalyticsTracker.h" @interface MPHTMLBannerCustomEvent () @@ -99,5 +100,14 @@ [self.delegate bannerCustomEventWillLeaveApplication:self]; } +- (void)trackMPXAndThirdPartyImpressions +{ + [self.bannerAgent invokeJavaScriptForEvent:MPAdWebViewEventAdDidAppear]; +} + +- (void)startViewabilityTracker +{ + [self.bannerAgent startViewabilityTracker]; +} @end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/HTML/MPHTMLInterstitialViewController.m b/iphone/Maps/3party/MoPubSDK/Internal/HTML/MPHTMLInterstitialViewController.m index 0c9eae2532..e6c1b726da 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/HTML/MPHTMLInterstitialViewController.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/HTML/MPHTMLInterstitialViewController.m @@ -9,6 +9,7 @@ #import "MPWebView.h" #import "MPAdDestinationDisplayAgent.h" #import "MPInstanceProvider.h" +#import "MPViewabilityTracker.h" @interface MPHTMLInterstitialViewController () @@ -48,10 +49,21 @@ [self.backingViewAgent loadConfiguration:configuration]; self.backingView = self.backingViewAgent.view; + [self.view addSubview:self.backingView]; self.backingView.frame = self.view.bounds; self.backingView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; - [self.view addSubview:self.backingView]; + if (@available(iOS 11, *)) { + self.backingView.translatesAutoresizingMaskIntoConstraints = NO; + [NSLayoutConstraint activateConstraints:@[ + [self.backingView.topAnchor constraintEqualToAnchor:self.view.topAnchor], + [self.backingView.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor], + [self.backingView.trailingAnchor constraintEqualToAnchor:self.view.trailingAnchor], + [self.backingView.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor], + ]]; + } + + [self.backingViewAgent.viewabilityTracker registerFriendlyObstructionView:self.closeButton]; } - (void)willPresentInterstitial diff --git a/iphone/Maps/3party/MoPubSDK/Internal/HTML/MPWebView.h b/iphone/Maps/3party/MoPubSDK/Internal/HTML/MPWebView.h index 0bb0ab2ccb..d6a4c50493 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/HTML/MPWebView.h +++ b/iphone/Maps/3party/MoPubSDK/Internal/HTML/MPWebView.h @@ -53,12 +53,22 @@ typedef void (^MPWebViewJavascriptEvaluationCompletionHandler)(id result, NSErro @property (weak, nonatomic) id delegate; +// When set to `YES`, `shouldConformToSafeArea` sets constraints on the WKWebView to always stay within the safe area +// using the MPWebView's safeAreaLayoutGuide. Otherwise, the WKWebView will be constrained directly to MPWebView's +// anchors to fill the whole container. Default is `NO`. +// +// This property has no effect on versions of iOS less than 11 or phones other than iPhone X. +// +// This property has no effect on UIWebView-based MPWebViews, as UIWebView only supports springs and struts, however +// this should not be an issue because UIWebView doesn't seem to be glitchy with the safe area. +@property (nonatomic, assign) BOOL shouldConformToSafeArea; + @property (nonatomic, readonly, getter=isLoading) BOOL loading; // These methods and properties are non-functional below iOS 9. If you call or try to set them, they'll do nothing. // For the properties, if you try to access them, you'll get `NO` 100% of the time. They are entirely hidden when // compiling with iOS 8 SDK or below. -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 90000 +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= MP_IOS_9_0 - (void)loadData:(NSData *)data MIMEType:(NSString *)MIMEType textEncodingName:(NSString *)encodingName @@ -68,6 +78,9 @@ textEncodingName:(NSString *)encodingName @property (nonatomic, readonly) BOOL allowsPictureInPictureMediaPlayback; #endif ++ (void)forceWKWebView:(BOOL)shouldForce; ++ (BOOL)isForceWKWebView; + - (void)loadHTMLString:(NSString *)string baseURL:(NSURL *)baseURL; diff --git a/iphone/Maps/3party/MoPubSDK/Internal/HTML/MPWebView.m b/iphone/Maps/3party/MoPubSDK/Internal/HTML/MPWebView.m index 71f45aa052..7ed89ecc96 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/HTML/MPWebView.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/HTML/MPWebView.m @@ -16,15 +16,20 @@ static BOOL const kMoPubRequiresUserActionForMediaPlaybackDefault = NO; static BOOL const kMoPubAllowsLinkPreviewDefault = NO; static NSString *const kMoPubJavaScriptDisableDialogScript = @"window.alert = function() { }; window.prompt = function() { }; window.confirm = function() { };"; -static NSString *const kMoPubScalesPageToFitScript = @"var meta = document.createElement('meta'); meta.setAttribute('name', 'viewport'); meta.setAttribute('content', 'width=device-width, initial-scale=1.0, user-scalable=no'); document.getElementsByTagName('head')[0].appendChild(meta);"; static NSString *const kMoPubFrameKeyPathString = @"frame"; +static BOOL gForceWKWebView = NO; + @interface MPWebView () @property (weak, nonatomic) WKWebView *wkWebView; @property (weak, nonatomic) UIWebView *uiWebView; +@property (strong, nonatomic) NSArray *wkWebViewLayoutConstraints; + +@property (nonatomic, assign) BOOL hasMovedToWindow; + @end @implementation MPWebView @@ -65,11 +70,11 @@ static NSString *const kMoPubFrameKeyPathString = @"frame"; // set up web view UIView *webView; - if (!forceUIWebView && [WKWebView class]) { + if ((gForceWKWebView || !forceUIWebView) && [WKWebView class]) { WKUserContentController *contentController = [[WKUserContentController alloc] init]; WKWebViewConfiguration *config = [[WKWebViewConfiguration alloc] init]; config.allowsInlineMediaPlayback = kMoPubAllowsInlineMediaPlaybackDefault; - if ([config respondsToSelector:@selector(requiresUserActionForMediaPlayback)]) { + if (@available(iOS 9.0, *)) { config.requiresUserActionForMediaPlayback = kMoPubRequiresUserActionForMediaPlaybackDefault; } else { config.mediaPlaybackRequiresUserAction = kMoPubRequiresUserActionForMediaPlaybackDefault; @@ -110,6 +115,9 @@ static NSString *const kMoPubFrameKeyPathString = @"frame"; // set default scalesPageToFit self.scalesPageToFit = NO; + // set default `shouldConformToSafeArea` + self.shouldConformToSafeArea = NO; + // configure like the old MPAdWebView self.backgroundColor = [UIColor clearColor]; self.opaque = NO; @@ -159,17 +167,16 @@ static UIView *gOffscreenView = nil; // If using WKWebView, and if MPWebView is in the view hierarchy, and if the WKWebView is in the offscreen view currently, // move our WKWebView to self and deallocate OffscreenView if no other MPWebView is using it. if (self.wkWebView + && !self.hasMovedToWindow && self.window != nil && [self.wkWebView.superview isEqual:gOffscreenView]) { self.wkWebView.frame = self.bounds; [self addSubview:self.wkWebView]; + [self constrainWebViewShouldUseSafeArea:self.shouldConformToSafeArea]; + self.hasMovedToWindow = YES; // Don't keep OffscreenView if we don't need it; it can always be re-allocated again later [self cleanUpOffscreenView]; - } else if (self.wkWebView - && self.window == nil - && [self.wkWebView.superview isEqual:self]) { - [self retainWKWebViewOffscreen:self.wkWebView]; } } @@ -184,7 +191,21 @@ static UIView *gOffscreenView = nil; // If it's attached to self, the autoresizing mask should come into play & this is just extra work. if ([keyPath isEqualToString:kMoPubFrameKeyPathString] && [self.wkWebView.superview isEqual:gOffscreenView]) { - self.wkWebView.frame = self.bounds; + if (@available(iOS 11.0, *)) { + // In iOS 11, WKWebView loads web view contents into the safe area only unless `viewport-fit=cover` is + // included in the page's viewport tag. Also, as of iOS 11, it appears WKWebView does not redraw page + // contents to match the safe area of a new position after being moved. As a result, making `wkWebView`'s + // X/Y coordinates (0,0) can introduce an issue on iPhone X where banners do not load inside of + // `wkWebView`'s bounds, even if the banner is moved into the safe area after loading. + // + // To skirt around these problems, always put `wkWebView` into the safe area when using iOS 11 or later. + self.wkWebView.frame = CGRectMake(gOffscreenView.safeAreaInsets.left, + gOffscreenView.safeAreaInsets.top, + CGRectGetWidth(self.bounds), + CGRectGetHeight(self.bounds)); + } else { + self.wkWebView.frame = self.bounds; + } } } @@ -203,6 +224,42 @@ static UIView *gOffscreenView = nil; [self cleanUpOffscreenView]; } +- (void)setShouldConformToSafeArea:(BOOL)shouldConformToSafeArea { + _shouldConformToSafeArea = shouldConformToSafeArea; + + if (self.hasMovedToWindow) { + [self constrainWebViewShouldUseSafeArea:shouldConformToSafeArea]; + } +} + +- (void)constrainWebViewShouldUseSafeArea:(BOOL)shouldUseSafeArea { + if (@available(iOS 11.0, *)) { + self.wkWebView.translatesAutoresizingMaskIntoConstraints = NO; + + if (self.wkWebViewLayoutConstraints) { + [NSLayoutConstraint deactivateConstraints:self.wkWebViewLayoutConstraints]; + } + + if (shouldUseSafeArea) { + self.wkWebViewLayoutConstraints = @[ + [self.wkWebView.topAnchor constraintEqualToAnchor:self.safeAreaLayoutGuide.topAnchor], + [self.wkWebView.leadingAnchor constraintEqualToAnchor:self.safeAreaLayoutGuide.leadingAnchor], + [self.wkWebView.trailingAnchor constraintEqualToAnchor:self.safeAreaLayoutGuide.trailingAnchor], + [self.wkWebView.bottomAnchor constraintEqualToAnchor:self.safeAreaLayoutGuide.bottomAnchor], + ]; + } else { + self.wkWebViewLayoutConstraints = @[ + [self.wkWebView.topAnchor constraintEqualToAnchor:self.topAnchor], + [self.wkWebView.leadingAnchor constraintEqualToAnchor:self.leadingAnchor], + [self.wkWebView.trailingAnchor constraintEqualToAnchor:self.trailingAnchor], + [self.wkWebView.bottomAnchor constraintEqualToAnchor:self.bottomAnchor], + ]; + } + + [NSLayoutConstraint activateConstraints:self.wkWebViewLayoutConstraints]; + } +} + - (BOOL)isLoading { return self.uiWebView ? self.uiWebView.isLoading : self.wkWebView.isLoading; } @@ -216,18 +273,24 @@ textEncodingName:(NSString *)encodingName MIMEType:MIMEType textEncodingName:encodingName baseURL:baseURL]; - } else { -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 90000 - if ([self.wkWebView respondsToSelector:@selector(loadData:MIMEType:characterEncodingName:baseURL:)]) { - [self.wkWebView loadData:data - MIMEType:MIMEType - characterEncodingName:encodingName - baseURL:baseURL]; - } -#endif + } else if (@available(iOS 9.0, *)) { + [self.wkWebView loadData:data + MIMEType:MIMEType + characterEncodingName:encodingName + baseURL:baseURL]; } } ++ (void)forceWKWebView:(BOOL)shouldForce +{ + gForceWKWebView = shouldForce; +} + ++ (BOOL)isForceWKWebView +{ + return gForceWKWebView; +} + - (void)loadHTMLString:(NSString *)string baseURL:(NSURL *)baseURL { if (self.uiWebView) { @@ -287,33 +350,27 @@ textEncodingName:(NSString *)encodingName } } -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 90000 - (void)setAllowsLinkPreview:(BOOL)allowsLinkPreview { - if (self.uiWebView) { - if ([self.uiWebView respondsToSelector:@selector(setAllowsLinkPreview:)]) { + if (@available(iOS 9.0, *)) { + if (self.uiWebView) { self.uiWebView.allowsLinkPreview = allowsLinkPreview; - } - } else { - if ([self.wkWebView respondsToSelector:@selector(setAllowsLinkPreview:)]) { + } else { self.wkWebView.allowsLinkPreview = allowsLinkPreview; } } } - (BOOL)allowsLinkPreview { - if (self.uiWebView) { - if ([self.uiWebView respondsToSelector:@selector(allowsLinkPreview)]) { + if (@available(iOS 9.0, *)) { + if (self.uiWebView) { return self.uiWebView.allowsLinkPreview; - } - } else { - if ([self.wkWebView respondsToSelector:@selector(allowsLinkPreview)]) { + } else { return self.wkWebView.allowsLinkPreview; } } return NO; } -#endif - (void)setScalesPageToFit:(BOOL)scalesPageToFit { if (self.uiWebView) { @@ -326,14 +383,6 @@ textEncodingName:(NSString *)encodingName } else { // Make sure the scroll view can't scroll (prevent double tap to zoom) self.wkWebView.scrollView.delegate = self; - - // Inject the user script to scale the page if needed - if (self.wkWebView.configuration.userContentController.userScripts.count == 0) { - WKUserScript *viewportScript = [[WKUserScript alloc] initWithSource:kMoPubScalesPageToFitScript - injectionTime:WKUserScriptInjectionTimeAtDocumentEnd - forMainFrameOnly:YES]; - [self.wkWebView.configuration.userContentController addUserScript:viewportScript]; - } } } } @@ -386,17 +435,13 @@ textEncodingName:(NSString *)encodingName if (self.uiWebView) { return self.uiWebView.mediaPlaybackRequiresUserAction; } else { -#if __IPHONE_OS_VERSION_MIN_REQUIRED < 90000 - if (![self.wkWebView.configuration respondsToSelector:@selector(requiresUserActionForMediaPlayback)]) { + if (@available(iOS 9.0, *)) { + return self.wkWebView.configuration.requiresUserActionForMediaPlayback; + } else if (![self.wkWebView.configuration respondsToSelector:@selector(requiresUserActionForMediaPlayback)]) { return self.wkWebView.configuration.mediaPlaybackRequiresUserAction; + } else { + return NO; } -#endif - -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 90000 - return self.wkWebView.configuration.requiresUserActionForMediaPlayback; -#else - return NO; // avoid compiler error under 8.4 SDK -#endif } } @@ -404,35 +449,27 @@ textEncodingName:(NSString *)encodingName if (self.uiWebView) { return self.uiWebView.mediaPlaybackAllowsAirPlay; } else { -#if __IPHONE_OS_VERSION_MIN_REQUIRED < 90000 - if (![self.wkWebView.configuration respondsToSelector:@selector(allowsAirPlayForMediaPlayback)]) { + if (@available(iOS 9.0, *)) { + return self.wkWebView.configuration.allowsAirPlayForMediaPlayback; + } else if (![self.wkWebView.configuration respondsToSelector:@selector(allowsAirPlayForMediaPlayback)]) { return self.wkWebView.configuration.mediaPlaybackAllowsAirPlay; + } else { + return NO; } -#endif - -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 90000 - return self.wkWebView.configuration.allowsAirPlayForMediaPlayback; -#else - return NO; // avoid compiler error under 8.4 SDK -#endif } } -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 90000 - (BOOL)allowsPictureInPictureMediaPlayback { - if (self.uiWebView) { - if ([self.uiWebView respondsToSelector:@selector(allowsPictureInPictureMediaPlayback)]) { + if (@available(iOS 9.0, *)) { + if (self.uiWebView) { return self.uiWebView.allowsPictureInPictureMediaPlayback; - } - } else { - if ([self.wkWebView.configuration respondsToSelector:@selector(allowsPictureInPictureMediaPlayback)]) { + } else { return self.wkWebView.configuration.allowsPictureInPictureMediaPlayback; } } return NO; } -#endif #pragma mark - UIWebViewDelegate @@ -579,7 +616,7 @@ windowFeatures:(WKWindowFeatures *)windowFeatures { - (void)webView:(WKWebView *)webView runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame -#if __IPHONE_OS_VERSION_MAX_ALLOWED < 90000 // This pre-processor code is to be sure we can compile under both iOS 8 and 9 SDKs +#if __IPHONE_OS_VERSION_MAX_ALLOWED < MP_IOS_9_0 // This pre-processor code is to be sure we can compile under both iOS 8 and 9 SDKs completionHandler:(void (^)())completionHandler { #else completionHandler:(void (^)(void))completionHandler { diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Interstitials/MPInterstitialAdManager.h b/iphone/Maps/3party/MoPubSDK/Internal/Interstitials/MPInterstitialAdManager.h index 1d044fad99..b5f920b4c2 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Interstitials/MPInterstitialAdManager.h +++ b/iphone/Maps/3party/MoPubSDK/Internal/Interstitials/MPInterstitialAdManager.h @@ -21,8 +21,8 @@ - (void)loadInterstitialWithAdUnitID:(NSString *)ID keywords:(NSString *)keywords - location:(CLLocation *)location - testing:(BOOL)testing; + userDataKeywords:(NSString *)userDataKeywords + location:(CLLocation *)location; - (void)presentInterstitialFromViewController:(UIViewController *)controller; @end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Interstitials/MPInterstitialAdManager.m b/iphone/Maps/3party/MoPubSDK/Internal/Interstitials/MPInterstitialAdManager.m index a3340b6dae..67c021f438 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Interstitials/MPInterstitialAdManager.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/Interstitials/MPInterstitialAdManager.m @@ -45,7 +45,7 @@ { self = [super init]; if (self) { - self.communicator = [[MPCoreInstanceProvider sharedProvider] buildMPAdServerCommunicatorWithDelegate:self]; + self.communicator = [[MPAdServerCommunicator alloc] initWithDelegate:self]; self.delegate = delegate; } return self; @@ -84,23 +84,29 @@ } -- (void)loadInterstitialWithAdUnitID:(NSString *)ID keywords:(NSString *)keywords location:(CLLocation *)location testing:(BOOL)testing +- (void)loadInterstitialWithAdUnitID:(NSString *)ID keywords:(NSString *)keywords userDataKeywords:(NSString *)userDataKeywords location:(CLLocation *)location { if (self.ready) { [self.delegate managerDidLoadInterstitial:self]; } else { [self loadAdWithURL:[MPAdServerURLBuilder URLWithAdUnitID:ID keywords:keywords - location:location - testing:testing]]; + userDataKeywords:userDataKeywords + location:location]]; } } - (void)presentInterstitialFromViewController:(UIViewController *)controller { - if (self.ready) { - [self.adapter showInterstitialFromViewController:controller]; + // Don't allow the ad to be shown if it isn't ready. + if (!self.ready) { + // We don't want to remotely log this event -- it's simply for publisher troubleshooting -- so use NSLog + // rather than MPLog. + NSLog(@"Interstitial ad view is not ready to be shown"); + return; } + + [self.adapter showInterstitialFromViewController:controller]; } - (CLLocation *)location @@ -120,9 +126,9 @@ #pragma mark - MPAdServerCommunicatorDelegate -- (void)communicatorDidReceiveAdConfiguration:(MPAdConfiguration *)configuration +- (void)communicatorDidReceiveAdConfigurations:(NSArray *)configurations { - self.configuration = configuration; + self.configuration = configurations.firstObject; MPLogInfo(@"Interstitial ad view is fetching ad network type: %@", self.configuration.networkType); diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Interstitials/MPInterstitialCustomEventAdapter.m b/iphone/Maps/3party/MoPubSDK/Internal/Interstitials/MPInterstitialCustomEventAdapter.m index 293f1a2795..a9ed50e28d 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Interstitials/MPInterstitialCustomEventAdapter.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/Interstitials/MPInterstitialCustomEventAdapter.m @@ -7,11 +7,15 @@ #import "MPInterstitialCustomEventAdapter.h" +#import "MPConstants.h" #import "MPAdConfiguration.h" #import "MPLogging.h" #import "MPInstanceProvider.h" #import "MPInterstitialCustomEvent.h" #import "MPInterstitialAdController.h" +#import "MPHTMLInterstitialCustomEvent.h" +#import "MPMRAIDInterstitialCustomEvent.h" +#import "MPRealTimeTimer.h" @interface MPInterstitialCustomEventAdapter () @@ -19,6 +23,7 @@ @property (nonatomic, strong) MPAdConfiguration *configuration; @property (nonatomic, assign) BOOL hasTrackedImpression; @property (nonatomic, assign) BOOL hasTrackedClick; +@property (nonatomic, strong) MPRealTimeTimer *expirationTimer; @end @@ -50,7 +55,7 @@ self.interstitialCustomEvent = [[MPInstanceProvider sharedProvider] buildInterstitialCustomEventFromCustomClass:configuration.customEventClass delegate:self]; if (self.interstitialCustomEvent) { - [self.interstitialCustomEvent requestInterstitialWithCustomEventInfo:configuration.customEventClassData]; + [self.interstitialCustomEvent requestInterstitialWithCustomEventInfo:configuration.customEventClassData adMarkup:configuration.advancedBidPayload]; } else { [self.delegate adapter:self didFailToLoadAdWithError:nil]; } @@ -83,6 +88,21 @@ { [self didStopLoading]; [self.delegate adapterDidFinishLoadingAd:self]; + + // Check for MoPub-specific custom events before setting the timer + if ([customEvent isKindOfClass:[MPHTMLInterstitialCustomEvent class]] + || [customEvent isKindOfClass:[MPMRAIDInterstitialCustomEvent class]]) { + // Set up timer for expiration + __weak __typeof__(self) weakSelf = self; + self.expirationTimer = [[MPRealTimeTimer alloc] initWithInterval:[MPConstants adsExpirationInterval] block:^(MPRealTimeTimer *timer){ + __strong __typeof__(weakSelf) strongSelf = weakSelf; + if (strongSelf && !strongSelf.hasTrackedImpression) { + [strongSelf interstitialCustomEventDidExpire:strongSelf.interstitialCustomEvent]; + } + [strongSelf.expirationTimer invalidate]; + }]; + [self.expirationTimer scheduleNow]; + } } - (void)interstitialCustomEvent:(MPInterstitialCustomEvent *)customEvent @@ -100,7 +120,6 @@ - (void)interstitialCustomEventDidAppear:(MPInterstitialCustomEvent *)customEvent { if ([self.interstitialCustomEvent enableAutomaticImpressionAndClickTracking] && !self.hasTrackedImpression) { - self.hasTrackedImpression = YES; [self trackImpression]; } [self.delegate interstitialDidAppearForAdapter:self]; @@ -136,4 +155,10 @@ [self.delegate interstitialWillLeaveApplicationForAdapter:self]; } +- (void)trackImpression { + [super trackImpression]; + self.hasTrackedImpression = YES; + [self.expirationTimer invalidate]; +} + @end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Interstitials/MPInterstitialViewController.m b/iphone/Maps/3party/MoPubSDK/Internal/Interstitials/MPInterstitialViewController.m index d3f8dcbd29..b88b193088 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Interstitials/MPInterstitialViewController.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/Interstitials/MPInterstitialViewController.m @@ -115,6 +115,7 @@ static NSString * const kCloseButtonXImageName = @"MPCloseButtonX.png"; - (void)layoutCloseButton { + [self.view addSubview:self.closeButton]; CGFloat originX = self.view.bounds.size.width - kCloseButtonPadding - self.closeButton.bounds.size.width; self.closeButton.frame = CGRectMake(originX, @@ -123,7 +124,13 @@ static NSString * const kCloseButtonXImageName = @"MPCloseButtonX.png"; self.closeButton.bounds.size.height); self.closeButton.mp_TouchAreaInsets = UIEdgeInsetsMake(kCloseButtonEdgeInset, kCloseButtonEdgeInset, kCloseButtonEdgeInset, kCloseButtonEdgeInset); [self setCloseButtonStyle:self.closeButtonStyle]; - [self.view addSubview:self.closeButton]; + if (@available(iOS 11.0, *)) { + self.closeButton.translatesAutoresizingMaskIntoConstraints = NO; + [NSLayoutConstraint activateConstraints:@[ + [self.closeButton.topAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor constant:kCloseButtonPadding], + [self.closeButton.trailingAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.trailingAnchor constant:-kCloseButtonPadding], + ]]; + } [self.view bringSubviewToFront:self.closeButton]; } @@ -191,7 +198,6 @@ static NSString * const kCloseButtonXImageName = @"MPCloseButtonX.png"; #pragma mark - Autorotation (iOS 6.0 and above) -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= MP_IOS_6_0 - (BOOL)shouldAutorotate { return YES; @@ -252,21 +258,5 @@ static NSString * const kCloseButtonXImageName = @"MPCloseButtonX.png"; return UIInterfaceOrientationLandscapeRight; } } -#endif - -#pragma mark - Autorotation (before iOS 6.0) - -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation -{ - if (_orientationType == MPInterstitialOrientationTypePortrait) { - return (interfaceOrientation == UIInterfaceOrientationPortrait || - interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown); - } else if (_orientationType == MPInterstitialOrientationTypeLandscape) { - return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || - interfaceOrientation == UIInterfaceOrientationLandscapeRight); - } else { - return YES; - } -} @end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MPAdvancedBiddingManager.h b/iphone/Maps/3party/MoPubSDK/Internal/MPAdvancedBiddingManager.h new file mode 100644 index 0000000000..6117d0f5eb --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Internal/MPAdvancedBiddingManager.h @@ -0,0 +1,40 @@ +// +// MPAdvancedBiddingManager.h +// MoPubSDK +// +// Copyright © 2017 MoPub. All rights reserved. +// + +#import +#import "MPAdvancedBidder.h" + +/** + * Internally manages all aspects related to advanced bidding. + */ +@interface MPAdvancedBiddingManager : NSObject +/** + * A boolean value indicating whether advanced bidding is enabled. This boolean defaults to `YES`. + * To disable advanced bidding, set this value to `NO`. + */ +@property (nonatomic, assign) BOOL advancedBiddingEnabled; + +/** + * A UTF-8 JSON string representation of the Advanced Bidding tokens. + * @remark If `advancedBiddingEnabled` is set to `NO`, this will always return `nil`. + */ +@property (nonatomic, copy, readonly) NSString * _Nullable bidderTokensJson; + +/** + * Singleton instance of the manager. + */ ++ (MPAdvancedBiddingManager * _Nonnull)sharedManager; + +/** + Initializes each Advanced Bidder and retains a reference. If an Advanced Bidder is + already initialized, nothing will be done. + @param bidders Array of bidders + @param complete Completion block + */ +- (void)initializeBidders:(NSArray> * _Nonnull)bidders complete:(void(^_Nullable)(void))complete; + +@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MPAdvancedBiddingManager.m b/iphone/Maps/3party/MoPubSDK/Internal/MPAdvancedBiddingManager.m new file mode 100644 index 0000000000..5de6a512a8 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Internal/MPAdvancedBiddingManager.m @@ -0,0 +1,112 @@ +// +// MPAdvancedBiddingManager.m +// MoPubSDK +// +// Copyright © 2017 MoPub. All rights reserved. +// + +#import +#import "MPAdvancedBiddingManager.h" +#import "MPLogging.h" + +// JSON constants +static NSString const * kTokenKey = @"token"; + +@interface MPAdvancedBiddingManager() + +// Dictionary of Advanced Bidding network name to instance of that Advanced Bidder. +@property (nonatomic, strong) NSMutableDictionary> * bidders; + +// Advanced Bidder initialization queue. +@property (nonatomic, strong) dispatch_queue_t queue; + +@end + +@implementation MPAdvancedBiddingManager + +#pragma mark - Initialization + ++ (MPAdvancedBiddingManager *)sharedManager { + static MPAdvancedBiddingManager * sharedMyManager = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + sharedMyManager = [[self alloc] init]; + }); + return sharedMyManager; +} + +- (instancetype)init { + if (self = [super init]) { + _advancedBiddingEnabled = YES; + _bidders = [NSMutableDictionary dictionary]; + _queue = dispatch_queue_create("Advanced Bidder Initialization Queue", NULL); + } + + return self; +} + +#pragma mark - Bidders + +- (NSString *)bidderTokensJson { + // No bidders. + if (self.bidders.count == 0) { + return nil; + } + + // Advanced Bidding is not enabled. + if (!self.advancedBiddingEnabled) { + return nil; + } + + // Generate the JSON dictionary for all participating bidders. + NSMutableDictionary * tokens = [NSMutableDictionary dictionary]; + [self.bidders enumerateKeysAndObjectsUsingBlock:^(NSString * network, id bidder, BOOL * stop) { + tokens[network] = @{ kTokenKey: bidder.token }; + }]; + + // Serialize the JSON dictionary into a JSON string. + NSError * error = nil; + NSData * jsonData = [NSJSONSerialization dataWithJSONObject:tokens options:0 error:&error]; + if (jsonData == nil) { + MPLogError(@"Failed to generate a JSON string from\n%@\nReason: %@", tokens, error.localizedDescription); + return nil; + } + + return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; +} + +- (void)initializeBidders:(NSArray> * _Nonnull)bidders complete:(void(^_Nullable)(void))complete { + // No bidders to initialize, complete immediately + if (bidders.count == 0) { + if (complete) { + complete(); + } + return; + } + + // Asynchronous dispatch the initialization as it may take some time. + __weak __typeof__(self) weakSelf = self; + dispatch_async(self.queue, ^{ + __typeof__(self) strongSelf = weakSelf; + if (strongSelf != nil) { + for (Class advancedBidderClass in bidders) { + // Create an instance of the Advanced Bidder + id advancedBidder = (id)[[[advancedBidderClass class] alloc] init]; + NSString * network = advancedBidder.creativeNetworkName; + + // Verify that the Advanced Bidder has a creative network name and that it's + // not already created. + if (network != nil && strongSelf.bidders[network] == nil) { + strongSelf.bidders[network] = advancedBidder; + } + } + } + + // Notify completion block handler. + if (complete) { + complete(); + } + }); // End dispatch_async +} + +@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MPConsentAdServerKeys.h b/iphone/Maps/3party/MoPubSDK/Internal/MPConsentAdServerKeys.h new file mode 100644 index 0000000000..831185bded --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Internal/MPConsentAdServerKeys.h @@ -0,0 +1,51 @@ +// +// MPConsentAdServerKeys.h +// MoPubSDK +// +// Copyright © 2018 MoPub. All rights reserved. +// + +#import + +#pragma mark - Synchronization Endpoint: Request Keys + +extern NSString * const kIdfaKey; +extern NSString * const kAdUnitIdKey; +extern NSString * const kBundleKey; +extern NSString * const kDoNotTrackIdKey; +extern NSString * const kLastChangedMsKey; +extern NSString * const kLastSynchronizedConsentStatusKey; +extern NSString * const kCurrentConsentStatusKey; +extern NSString * const kConsentedVendorListVersionKey; +extern NSString * const kConsentedPrivacyPolicyVersionKey; +extern NSString * const kCachedIabVendorListHashKey; +extern NSString * const kGDPRAppliesKey; + +#pragma mark - Synchronization Endpoint: Shared Keys + +extern NSString * const kConsentChangedReasonKey; +extern NSString * const kExtrasKey; + +#pragma mark - Synchronization Endpoint: Response Keys + +extern NSString * const kForceExplicitNoKey; +extern NSString * const kInvalidateConsentKey; +extern NSString * const kReacquireConsentKey; +extern NSString * const kIsWhitelistedKey; +extern NSString * const kIsGDPRRegionKey; +extern NSString * const kVendorListUrlKey; +extern NSString * const kVendorListVersionKey; +extern NSString * const kPrivacyPolicyUrlKey; +extern NSString * const kPrivacyPolicyVersionKey; +extern NSString * const kIabVendorListKey; +extern NSString * const kIabVendorListHashKey; +extern NSString * const kSyncFrequencyKey; + +#pragma mark - Consent Dialog Endpoint: Request Keys + +extern NSString * const kLanguageKey; +extern NSString * const kSDKVersionKey; + +#pragma mark - Consent Dialog Endpoint: Response Keys + +extern NSString * const kDialogHTMLKey; diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MPConsentAdServerKeys.m b/iphone/Maps/3party/MoPubSDK/Internal/MPConsentAdServerKeys.m new file mode 100644 index 0000000000..ef8caeae18 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Internal/MPConsentAdServerKeys.m @@ -0,0 +1,51 @@ +// +// MPConsentAdServerKeys.m +// MoPubSDK +// +// Copyright © 2018 MoPub. All rights reserved. +// + +#import "MPConsentAdServerKeys.h" + +#pragma mark - Synchronization Endpoint: Request Keys + +NSString * const kIdfaKey = @"udid"; +NSString * const kAdUnitIdKey = @"id"; +NSString * const kBundleKey = @"bundle"; +NSString * const kDoNotTrackIdKey = @"dnt"; +NSString * const kLastChangedMsKey = @"last_changed_ms"; +NSString * const kLastSynchronizedConsentStatusKey = @"last_consent_status"; +NSString * const kCurrentConsentStatusKey = @"current_consent_status"; +NSString * const kConsentedVendorListVersionKey = @"consented_vendor_list_version"; +NSString * const kConsentedPrivacyPolicyVersionKey = @"consented_privacy_policy_version"; +NSString * const kCachedIabVendorListHashKey = @"cached_vendor_list_iab_hash"; +NSString * const kGDPRAppliesKey = @"gdpr_applies"; + +#pragma mark - Synchronization Endpoint: Shared Keys + +NSString * const kConsentChangedReasonKey = @"consent_change_reason"; +NSString * const kExtrasKey = @"extras"; + +#pragma mark - Synchronization Endpoint: Response Keys + +NSString * const kForceExplicitNoKey = @"force_explicit_no"; +NSString * const kInvalidateConsentKey = @"invalidate_consent"; +NSString * const kReacquireConsentKey = @"reacquire_consent"; +NSString * const kIsWhitelistedKey = @"is_whitelisted"; +NSString * const kIsGDPRRegionKey = @"is_gdpr_region"; +NSString * const kVendorListUrlKey = @"current_vendor_list_link"; +NSString * const kVendorListVersionKey = @"current_vendor_list_version"; +NSString * const kPrivacyPolicyUrlKey = @"current_privacy_policy_link"; +NSString * const kPrivacyPolicyVersionKey = @"current_privacy_policy_version"; +NSString * const kIabVendorListKey = @"current_vendor_list_iab_format"; +NSString * const kIabVendorListHashKey = @"current_vendor_list_iab_hash"; +NSString * const kSyncFrequencyKey = @"call_again_after_secs"; + +#pragma mark - Consent Dialog Endpoint: Request Keys + +NSString * const kLanguageKey = @"language"; +NSString * const kSDKVersionKey = @"nv"; + +#pragma mark - Consent Dialog Endpoint: Response Keys + +NSString * const kDialogHTMLKey = @"dialog_html"; diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MPConsentDialogViewController.h b/iphone/Maps/3party/MoPubSDK/Internal/MPConsentDialogViewController.h new file mode 100644 index 0000000000..59836eda99 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Internal/MPConsentDialogViewController.h @@ -0,0 +1,64 @@ +// +// MPConsentDialogViewController.h +// MoPubSDK +// +// Copyright © 2018 MoPub. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class MPConsentDialogViewController; + +@protocol MPConsentDialogViewControllerDelegate + +@optional + +/** + Informs the delegate of the received consent response. + */ +- (void)consentDialogViewControllerDidReceiveConsentResponse:(BOOL)response + consentDialogViewController:(MPConsentDialogViewController *)consentDialogViewController; + +/** + Informs the delegate that the given consentDialogViewController will disappear. + */ +- (void)consentDialogViewControllerWillDisappear:(MPConsentDialogViewController *)consentDialogViewController; + +@end + +@interface MPConsentDialogViewController : UIViewController + +/** + Initializes a consent dialog view controller with an HTML string to load. It is expected that this initializer is used + when initializing. + + @param dialogHTML The markup string for the consent dialog. + */ +- (instancetype)initWithDialogHTML:(NSString *)dialogHTML NS_DESIGNATED_INITIALIZER; + +/** + Delegate object to inform an outside object of events. + */ +@property (nonatomic, weak) id delegate; + +/** + This method starts the loading of the consent page. When complete, `completion` will be called with a `BOOL` + indicating success, and an `NSError` object with information about the error in the case of failure. + + This method can be called and is expected to be called before the view controller is presented. This way, + the consent dialog is already loaded and in-view by the time the user sees it. + */ +- (void)loadConsentPageWithCompletion:(void (^_Nullable)(BOOL success, NSError *error))completion; + +/** + These initializers are not available + */ +- (instancetype)init NS_UNAVAILABLE; +- (instancetype)initWithCoder:(NSCoder *)aDecoder NS_UNAVAILABLE; +- (instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MPConsentDialogViewController.m b/iphone/Maps/3party/MoPubSDK/Internal/MPConsentDialogViewController.m new file mode 100644 index 0000000000..0c48f7628c --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Internal/MPConsentDialogViewController.m @@ -0,0 +1,253 @@ +// +// MPConsentDialogViewController.m +// MoPubSDK +// +// Copyright © 2018 MoPub. All rights reserved. +// + +#import "MPAPIEndpoints.h" +#import "MPConsentDialogViewController.h" +#import "MPGlobal.h" +#import "MPWebView.h" + +typedef void(^MPConsentDialogViewControllerCompletion)(BOOL success, NSError *error); + +static NSString * const kMoPubScheme = @"mopub"; +static NSString * const kMoPubConsentURLHost = @"consent"; +static NSString * const kMoPubCloseURLHost = @"close"; + +static NSString * const kMoPubAffirmativeConsentQueryString = @"yes"; +static NSString * const kMoPubNegativeConsentQueryString = @"no"; + +static CGFloat const kCloseButtonDimension = 40.0; +static CGFloat const kCloseButtonSpacing = 7.0; +static NSTimeInterval const kCloseButtonFadeInAnimationDuration = 0.2; +static NSTimeInterval const kCloseButtonFadeInAfterSeconds = 10.0; + +@interface MPConsentDialogViewController () + +@property (nonatomic, strong) UIButton *closeButton; +@property (nonatomic, strong) MPWebView *webView; +@property (nonatomic, assign) BOOL finishedInitialLoad; +@property (nonatomic, assign) BOOL closeButtonHasBeenShown; +@property (nonatomic, copy) MPConsentDialogViewControllerCompletion didLoadCompletionBlock; + +@property (nonatomic, copy) NSString *dialogHTML; + +@end + +@implementation MPConsentDialogViewController + +#pragma mark - Initialization + +- (instancetype)initWithDialogHTML:(NSString *)dialogHTML { + if (self = [super initWithNibName:nil bundle:nil]) { + // Set internal variables + _dialogHTML = dialogHTML; + + // Initialize web view + [self setUpWebView]; + } + + return self; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + + // Make background color black + self.view.backgroundColor = [UIColor blackColor]; + + // It is important to layout the web view first, then set up the close button so that the button appears on top. + [self layoutWebView]; + [self setUpCloseButton]; +} + +- (void)viewDidAppear:(BOOL)animated { + [super viewDidAppear:animated]; + + // Fade in close button + __weak __typeof__(self) weakSelf = self; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(kCloseButtonFadeInAfterSeconds * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [weakSelf fadeInCloseButton]; + }); +} + +- (void)viewWillDisappear:(BOOL)animated { + [super viewWillDisappear:animated]; + + if ([self.delegate respondsToSelector:@selector(consentDialogViewControllerWillDisappear:)]) { + [self.delegate consentDialogViewControllerWillDisappear:self]; + } +} + +- (void)closeConsentDialog { + [self dismissViewControllerAnimated:YES completion:nil]; +} + +- (void)setUpWebView { + self.webView = [[MPWebView alloc] initWithFrame:CGRectZero forceUIWebView:NO]; + self.webView.delegate = self; + self.webView.scrollView.bounces = NO; + self.webView.backgroundColor = [UIColor whiteColor]; + self.webView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; +} + +- (void)layoutWebView { + self.webView.frame = self.view.bounds; + [self.view addSubview:self.webView]; + + // Set up autolayout constraints on iOS 11+. This web view should always stay within the safe area. + if (@available(iOS 11.0, *)) { + self.webView.translatesAutoresizingMaskIntoConstraints = NO; + [NSLayoutConstraint activateConstraints:@[ + [self.webView.topAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor], + [self.webView.leadingAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.leadingAnchor], + [self.webView.trailingAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.trailingAnchor], + [self.webView.bottomAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.bottomAnchor], + ]]; + } +} + +- (BOOL)prefersStatusBarHidden { + return YES; +} + +- (void)setUpCloseButton { + self.closeButton = [UIButton buttonWithType:UIButtonTypeCustom]; + self.closeButton.frame = CGRectMake(CGRectGetMaxX(self.view.bounds) - kCloseButtonDimension - kCloseButtonSpacing, + CGRectGetMinY(self.view.bounds) + kCloseButtonSpacing, + kCloseButtonDimension, + kCloseButtonDimension); + self.closeButton.backgroundColor = [UIColor clearColor]; + [self.closeButton setImage:[UIImage imageWithContentsOfFile:MPResourcePathForResource(@"MPCloseButtonX.png")] forState:UIControlStateNormal]; + [self.closeButton addTarget:self + action:@selector(closeButtonAction:) + forControlEvents:UIControlEventTouchUpInside]; + [self.view addSubview:self.closeButton]; + + if (@available(iOS 11.0, *)) { + self.closeButton.translatesAutoresizingMaskIntoConstraints = NO; + [NSLayoutConstraint activateConstraints:@[ + [self.closeButton.widthAnchor constraintEqualToConstant:kCloseButtonDimension], + [self.closeButton.heightAnchor constraintEqualToConstant:kCloseButtonDimension], + [self.closeButton.topAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor constant:kCloseButtonSpacing], + [self.closeButton.trailingAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.trailingAnchor constant:-kCloseButtonSpacing], + ]]; + } + + // Set close button alpha to zero to fade in later + self.closeButton.alpha = 0.0; +} + +- (IBAction)closeButtonAction:(id)sender { + [self closeConsentDialog]; +} + +- (void)fadeInCloseButton { + if (!self.closeButtonHasBeenShown) { + self.closeButtonHasBeenShown = YES; + [UIView animateWithDuration:kCloseButtonFadeInAnimationDuration animations:^{ + self.closeButton.alpha = 1.0; + }]; + } +} + +#pragma mark - Load Consent Page + +- (void)loadConsentPageWithCompletion:(MPConsentDialogViewControllerCompletion)completion { + // Set `finishedInitialLoad` to `NO` because this method is (re)doing the initial load + self.finishedInitialLoad = NO; + + // Copy the completion block to `didLoadCompletionBlock` to run when the page loads or fails to load + self.didLoadCompletionBlock = completion; + + // Load consent dialog HTML markup + [self.webView loadHTMLString:self.dialogHTML + baseURL:[NSURL URLWithString:[MPAPIEndpoints baseURL]]]; +} + +#pragma mark - MPWebViewDelegate + +- (void)webView:(MPWebView *)webView didFailLoadWithError:(NSError *)error { + if (!self.finishedInitialLoad) { + self.finishedInitialLoad = YES; + + if (self.didLoadCompletionBlock) { + self.didLoadCompletionBlock(NO, error); + self.didLoadCompletionBlock = nil; + } + } +} + +- (void)webViewDidFinishLoad:(MPWebView *)webView { + if (!self.finishedInitialLoad) { + self.finishedInitialLoad = YES; + + if (self.didLoadCompletionBlock) { + self.didLoadCompletionBlock(YES, nil); + self.didLoadCompletionBlock = nil; + } + } +} + +- (BOOL)webView:(MPWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { + BOOL requestIsMoPubScheme = [request.URL.scheme isEqualToString:kMoPubScheme]; + BOOL requestIsMoPubHost = [request.URL.host isEqualToString:MOPUB_BASE_HOSTNAME]; + + // Kick to Safari if the URL is not of MoPub scheme or hostname + if (!requestIsMoPubScheme && !requestIsMoPubHost) { + [[UIApplication sharedApplication] openURL:request.URL]; + return NO; + } + + // Allow load if request came from ads.mopub.com + if (requestIsMoPubHost) { + return YES; + } + + // Sanity check: do nothing if we get to this point and it is not a MoPub scheme + if (!requestIsMoPubScheme) { + return NO; + } + + // MoPub Scheme + + // Received close command; send dismiss and do not allow load. + if ([request.URL.host isEqualToString:kMoPubCloseURLHost]) { + [self closeConsentDialog]; + return NO; + } + + // Break out if any command other than consent (we do not know any commands besides "close" and "consent" + if (![request.URL.host isEqualToString:kMoPubConsentURLHost]) { + return NO; + } + + // Received consent command; validate query string + BOOL receivedAffirmativeAnswer = [request.URL.query isEqualToString:kMoPubAffirmativeConsentQueryString]; + BOOL receivedNegativeAnswer = [request.URL.query isEqualToString:kMoPubNegativeConsentQueryString]; + // We should have received one answer or the other (i.e., one of these should be marked as `YES`). If neither + // was marked as `YES` (i.e., the query string was malformed), break out immediately. + if (!receivedAffirmativeAnswer && !receivedNegativeAnswer) { + return NO; + } + // Given that we did receive an answer, the receivedAffirmativeAnswer variable is what we expect consentAnswer to be. + // If consent was given, receivedAffirmativeAnswer will be `YES`. + // If consent was not given, receivedAffirmativeAnswer will be `NO` (and the above `if` will filter out unknowns). + BOOL consentAnswer = receivedAffirmativeAnswer; + + // Inform delegate + if ([self.delegate respondsToSelector:@selector(consentDialogViewControllerDidReceiveConsentResponse:consentDialogViewController:)]) { + [self.delegate consentDialogViewControllerDidReceiveConsentResponse:consentAnswer + consentDialogViewController:self]; + } + + // Show close button (if it hasn't already been shown) + [self fadeInCloseButton]; + + // Do not load + return NO; +} + +@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MPConsentManager.h b/iphone/Maps/3party/MoPubSDK/Internal/MPConsentManager.h new file mode 100644 index 0000000000..a37480435b --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Internal/MPConsentManager.h @@ -0,0 +1,246 @@ +// +// MPConsentManager.h +// MoPubSDK +// +// Copyright © 2018 MoPub. All rights reserved. +// + +#import +#import "MPBool.h" +#import "MPConsentStatus.h" +#import "MPConsentDialogViewController.h" + +@interface MPConsentManager : NSObject + +/** + Ad unit ID sent to Ad Server as a proxy for the MoPub app ID. + @remark This should only be set by SDK initialization and must be non-nil. + */ +@property (nonatomic, strong, nonnull) NSString * adUnitIdUsedForConsent; + +/** + Flag indicating that personally identifiable information can be collected. + */ +@property (nonatomic, readonly) BOOL canCollectPersonalInfo; + +/** + Flag indicating that consent needs to be acquired (or reacquired) by the user, and + that the consent dialog may need to be shown. + */ +@property (nonatomic, readonly) BOOL isConsentNeeded; + +/** + Retrieves the current language code. + */ +@property (nonatomic, copy, readonly, nonnull) NSString * currentLanguageCode; + +/** + * Singleton instance of the manager. + */ ++ (MPConsentManager * _Nonnull)sharedManager; + +/** + Allows a whitelisted publisher to grant consent on the user's behalf. + */ +- (void)grantConsent; + +/** + Allows a publisher to explicitly deny or revoke consent on the user's behalf. + */ +- (void)revokeConsent; + +/** + Checks if there is a transition from a "do not track" state to an "allowed to track" state, or from + an "allowed to track" state to a "do not track" state. If detected, the appropriate consent + status state change will occur locally and trigger the @c kMPConsentChangedNotification. + @remark This is a local update only and will require a seperate Ad Server synchronization. + @return @c YES if a transition occurred; @c NO otherwise. + */ +- (BOOL)checkForDoNotTrackAndTransition; + +/** + This method takes in parameters (expected to be derived from a server response) which tell the SDK to force consent + status to explicit no or unknown. Explicit no takes priority over unknown. It also takes in a consent change reason, + and a BOOL to tell it whether to cache and broadcast. + */ +- (void)forceStatusShouldForceExplicitNo:(BOOL)shouldForceExplicitNo + shouldInvalidateConsent:(BOOL)shouldInvalidateConsent + shouldReacquireConsent:(BOOL)shouldReacquireConsent + consentChangeReason:(NSString * _Nullable)consentChangeReason + shouldBroadcast:(BOOL)shouldBroadcast; + +/** + Synchronizes the current state with Ad Server and makes any state adjustments + based upon the response. + @param completion Synchronization completion block. + */ +- (void)synchronizeConsentWithCompletion:(void (^ _Nonnull)(NSError * _Nullable error))completion; + +/** + `YES` if a consent dialog is currently loaded; `NO` otherwise. + */ +@property (nonatomic, readonly) BOOL isConsentDialogLoaded; + +/** + Starts loading a consent dialog asynchronously. Calls `completion` when done with an NSError if not successful. + Calls `completion` immediately if a `consentDialog` is already loaded. + */ +- (void)loadConsentDialogWithCompletion:(void (^ _Nullable)(NSError * _Nullable error))completion; + +/** + If a consent dialog is loaded, this method will present it modally from the given `viewController`. If no consent + dialog is loaded this method will do nothing. `completion` is called upon successful presentation; it is not called otherwise. + */ +- (void)showConsentDialogFromViewController:(UIViewController * _Nonnull)viewController completion:(void (^_Nullable)(void))completion; + +@end + +@interface MPConsentManager (State) + +/** + IAB vendor list that has been consented to. + */ +@property (nonatomic, copy, readonly, nullable) NSString * consentedIabVendorList; + +/** + MoPub privacy policy version that has been consented to. + */ +@property (nonatomic, copy, readonly, nullable) NSString * consentedPrivacyPolicyVersion; + +/** + Vendor list version that has been consented to. + */ +@property (nonatomic, copy, readonly, nullable) NSString * consentedVendorListVersion; + +/** + Current consent status. + */ +@property (nonatomic, readonly) MPConsentStatus currentStatus; + +/** + Server extras (reserved for future use). + */ +@property (nonatomic, copy, readonly, nullable) NSString * extras; + +/** + Current IAB format vendor list. + */ +@property (nonatomic, copy, readonly, nullable) NSString * iabVendorList; + +/** + Current IAB format vendor list hash. + */ +@property (nonatomic, copy, readonly, nullable) NSString * iabVendorListHash; + +/** + IFA used for consent purposes only. + */ +@property (nonatomic, copy, readonly, nullable) NSString * ifaForConsent; + +/** + Flag indicating if GDPR is applicable to the user. + */ +@property (nonatomic, readonly) MPBool isGDPRApplicable; + +/** + Flag indicating that the app is whitelisted for non-user-initiated consent changes. + */ +@property (nonatomic, readonly) BOOL isWhitelisted; + +/** + Optional description of why the consent was changed to the current value. + */ +@property (nonatomic, copy, readonly, nullable) NSString * lastChangedReason; + +/** + Timestamp of the current consent status in milliseconds. If this value is zero, + consent status has never changed. + */ +@property (nonatomic, readonly) NSTimeInterval lastChangedTimestampInMilliseconds; + +/** + Consent status that was last synchronized with the server. + */ +@property (nonatomic, copy, readonly, nullable) NSString * lastSynchronizedStatus; + +/** + URL to the MoPub privacy policy in the device's preferred language. If the device's + preferred language could not be determined, English will be used. + @return The privacy policy URL for the desired language if successful; @c nil if + there is no current vendor list. + */ +- (NSURL * _Nullable)privacyPolicyUrl; + +/** + URL to the MoPub privacy policy in the language of choice. + @param isoLanguageCode ISO 630-1 language code + @return The privacy policy URL for the desired language if successful; @c nil if the + language code is invalid or if there is no current vendor list. + */ +- (NSURL * _Nullable)privacyPolicyUrlWithISOLanguageCode:(NSString * _Nonnull)isoLanguageCode; + +/** + Current version of MoPub’s privacy policy. + */ +@property (nonatomic, copy, readonly, nullable) NSString * privacyPolicyVersion; + +/** + The maximum frequency in seconds that the SDK is allowed to synchronize consent + information. + */ +@property (nonatomic, readonly) NSTimeInterval syncFrequency; + +/** + Current vendor list URL in the device's preferred language. If the device's + preferred language could not be determined, English will be used. + @return The vendor list URL for the desired language if successful; @c nil if + there is no current vendor list. + */ +- (NSURL * _Nullable)vendorListUrl; + +/** + Current vendor list URL in the language of choice. + @param isoLanguageCode ISO 630-1 language code + @return The vendor list URL for the desired language if successful; @c nil if the + language code is invalid or if there is no current vendor list. + */ +- (NSURL * _Nullable)vendorListUrlWithISOLanguageCode:(NSString * _Nonnull)isoLanguageCode; + +/** + Current version of the vendor list. + */ +@property (nonatomic, copy, readonly, nullable) NSString * vendorListVersion; + +@end + +@interface MPConsentManager (PersonalDataHandler) + +/** + * Clean up personal data and add additonal logic for personal data when consent state changes. + */ + +- (void)handlePersonalDataOnStateChangeTo:(MPConsentStatus)newStatus fromOldStatus:(MPConsentStatus)oldStatus; + +/** + * Store IFA(IDFA) temporary in NSUserDefault during MoPub initialization or app foregrounding. IFA is only used for removing personal data. + * + */ +- (void)storeIfa; + +/** + * Remove IFA from NSUserDefault. + */ +- (void)removeIfa; + +/** + * If IFA is changed and the status is transitioning from MPConsentStatusConsented, remove old IFA from NSUserDefault and change status to unknown. + * + */ +- (void)checkForIfaChange; + +/** + * App conversion request will only be fired when MoPub obtains consent. + */ +- (void)updateAppConversionTracking; + +@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MPConsentManager.m b/iphone/Maps/3party/MoPubSDK/Internal/MPConsentManager.m new file mode 100644 index 0000000000..69ef8a7e17 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Internal/MPConsentManager.m @@ -0,0 +1,914 @@ +// +// MPConsentManager.m +// MoPubSDK +// +// Copyright © 2018 MoPub. All rights reserved. +// + +#import +#import "MPAPIEndpoints.h" +#import "MPAdServerURLBuilder.h" +#import "MPConsentAdServerKeys.h" +#import "MPConsentChangedNotification.h" +#import "MPConsentChangedReason.h" +#import "MPConsentError.h" +#import "MPConsentManager.h" +#import "MPConstants.h" +#import "MPHTTPNetworkSession.h" +#import "MPIdentityProvider.h" +#import "MPLogging.h" +#import "MPTimer.h" +#import "MPURLRequest.h" +#import "NSString+MPConsentStatus.h" +#import "MPAdConversionTracker.h" + +// NSUserDefault keys +static NSString * const kConsentedIabVendorListStorageKey = @"com.mopub.mopub-ios-sdk.consented.iab.vendor.list"; +static NSString * const kConsentedPrivacyPolicyVersionStorageKey = @"com.mopub.mopub-ios-sdk.consented.privacy.policy.version"; +static NSString * const kConsentedVendorListVersionStorageKey = @"com.mopub.mopub-ios-sdk.consented.vendor.list.version"; +static NSString * const kConsentStatusStorageKey = @"com.mopub.mopub-ios-sdk.consent.status"; +static NSString * const kExtrasStorageKey = @"com.mopub.mopub-ios-sdk.extras"; +static NSString * const kIabVendorListStorageKey = @"com.mopub.mopub-ios-sdk.iab.vendor.list"; +static NSString * const kIabVendorListHashStorageKey = @"com.mopub.mopub-ios-sdk.iab.vendor.list.hash"; +static NSString * const kIfaForConsentStorageKey = @"com.mopub.mopub-ios-sdk.ifa.for.consent"; +static NSString * const kIsDoNotTrackStorageKey = @"com.mopub.mopub-ios-sdk.is.do.not.track"; +static NSString * const kIsWhitelistedStorageKey = @"com.mopub.mopub-ios-sdk.is.whitelisted"; +static NSString * const kGDPRAppliesStorageKey = @"com.mopub.mopub-ios-sdk.gdpr.applies"; +static NSString * const kLastChangedMsStorageKey = @"com.mopub.mopub-ios-sdk.last.changed.ms"; +static NSString * const kLastChangedReasonStorageKey = @"com.mopub.mopub-ios-sdk.last.changed.reason"; +static NSString * const kLastSynchronizedConsentStatusStorageKey = @"com.mopub.mopub-ios-sdk.last.synchronized.consent.status"; +static NSString * const kPrivacyPolicyUrlStorageKey = @"com.mopub.mopub-ios-sdk.privacy.policy.url"; +static NSString * const kPrivacyPolicyVersionStorageKey = @"com.mopub.mopub-ios-sdk.privacy.policy.version"; +static NSString * const kShouldReacquireConsentStorageKey = @"com.mopub.mopub-ios-sdk.should.reacquire.consent"; +static NSString * const kVendorListUrlStorageKey = @"com.mopub.mopub-ios-sdk.vendor.list.url"; +static NSString * const kVendorListVersionStorageKey = @"com.mopub.mopub-ios-sdk.vendor.list.version"; + +// Frequency constants +static NSTimeInterval const kDefaultRefreshInterval = 300; //seconds + +// String replacement macros +static NSString * const kMacroReplaceLanguageCode = @"%%LANGUAGE%%"; + +@interface MPConsentManager() + +/** + The loaded consent dialog view controller, or nil if the dialog has not been loaded. + */ +@property (nonatomic, strong, nullable) MPConsentDialogViewController * consentDialogViewController; + +/** + Flag indicating the last known "do not track" status. This is primarily used for detecting + changes in the "do not track" state by the user. This state should only be set by the + @c setCurrentStatus:reason:shouldBroadcast: method. A value of @c YES indicates + that we were last known to be in a "do not track" state; otherwise @c NO. + */ +@property (nonatomic, readonly) BOOL isDoNotTrack; + +/** + Timer used to fire the next consent synchronization update. This will be invalidated + everytime `synchronizeConsentWithCompletion:` is explcitly called. The timer + frequency is determined by `self.syncFrequency`. + */ +@property (nonatomic, strong, nullable) MPTimer * nextUpdateTimer; + +/** + Queries the raw consent status value that is stored in @c kConsentStatusStorageKey + */ +@property (nonatomic, readonly) MPConsentStatus rawConsentStatus; + +/** + Flag indicating that the server requires reacquisition of consent. + This flag should be reset once the dialog has been shown to the user + and the user has consented/not consented, or if the whitelisted publisher + has explicitly called @c grantConsent or @c revokeConsent. + @remark Setting this property will not trigger a @c NSUserDefaults.synchronize + */ +@property (nonatomic, assign) BOOL shouldReacquireConsent; + +/** + The maximum frequency in seconds that the SDK is allowed to synchronize consent + information. Defaults to 300 seconds. + */ +@property (nonatomic, assign, readwrite) NSTimeInterval syncFrequency; + +@end + +@implementation MPConsentManager + +#pragma mark - Initialization + ++ (MPConsentManager *)sharedManager { + static MPConsentManager * sharedMyManager = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + sharedMyManager = [[self alloc] init]; + }); + return sharedMyManager; +} + +- (instancetype)init { + if (self = [super init]) { + // Register application foreground and background listeners + [NSNotificationCenter.defaultCenter addObserver:self selector:@selector(onApplicationWillEnterForeground:) name:UIApplicationWillEnterForegroundNotification object:nil]; + + // Initialize internal state + _consentDialogViewController = nil; + _syncFrequency = kDefaultRefreshInterval; + + // Initializing the timer must be done last since it depends on the + // value of _syncFrequency + _nextUpdateTimer = [self newNextUpdateTimer]; + } + + return self; +} + +- (void)dealloc { + [NSNotificationCenter.defaultCenter removeObserver:self]; + + // Tear down the next update timer. + [_nextUpdateTimer invalidate]; + _nextUpdateTimer = nil; +} + +#pragma mark - Properties + +- (BOOL)canCollectPersonalInfo { + // We can collection information under the following conditions: + // 1. GDPR does not apply to the user + // or + // 2. GDPR does apply and the user explicitly granted consent. + return self.isGDPRApplicable == MPBoolNo || (self.isGDPRApplicable == MPBoolYes && self.currentStatus == MPConsentStatusConsented); +} + +- (NSString *)currentLanguageCode { + // Need to strip out any region code if it's in there. + // In the event we cannot determine the language code, we will default to English. + NSString * code = [self removeRegionFromLanguageCode:NSLocale.preferredLanguages.firstObject]; + return code != nil ? code : @"en"; +} + +- (BOOL)isConsentNeeded { + return self.shouldReacquireConsent || (self.currentStatus == MPConsentStatusUnknown && self.isGDPRApplicable == MPBoolYes); +} + +/** + Flag indicating the last known "do not track" status. This is primarily used for detecting + changes in the "do not track" state by the user. This state should only be set by the + @c setCurrentStatus:reason:shouldBroadcast: method. + @return @c YES if we were in a "do not track" state; otherwise @c NO. + */ +- (BOOL)isDoNotTrack { + return [NSUserDefaults.standardUserDefaults boolForKey:kIsDoNotTrackStorageKey]; +} + +- (MPConsentStatus)rawConsentStatus { + return (MPConsentStatus)[NSUserDefaults.standardUserDefaults integerForKey:kConsentStatusStorageKey]; +} + +- (BOOL)shouldReacquireConsent { + return [NSUserDefaults.standardUserDefaults boolForKey:kShouldReacquireConsentStorageKey]; +} + +- (void)setShouldReacquireConsent:(BOOL)shouldReacquireConsent { + [NSUserDefaults.standardUserDefaults setBool:shouldReacquireConsent forKey:kShouldReacquireConsentStorageKey]; +} + +#pragma mark - ISO Language Code + +/** + Strip out any region code if there is one in the ISO langauge code. + For example: en-US --> en and zh-Hans-HK --> zh + @param isoLanguageCode ISO-639 compliant language code + @return The ISO language code stripped of the region if successful; @c nil otherwise. + */ +- (NSString * _Nullable)removeRegionFromLanguageCode:(NSString * _Nullable)isoLanguageCode { + return [isoLanguageCode componentsSeparatedByString:@"-"].firstObject; +} + +#pragma mark - Publisher Consent Granting and Revoking + +- (void)grantConsent { + MPLogInfo(@"Grant consent was called with publisher whitelist status of: %@whitelisted", self.isWhitelisted ? @"" : @"not "); + + // Reset the reacquire consent flag since the user has taken action. + self.shouldReacquireConsent = NO; + + MPConsentStatus grantStatus = self.isWhitelisted ? MPConsentStatusConsented : MPConsentStatusPotentialWhitelist; + NSString * grantReason = (grantStatus == MPConsentStatusConsented ? kConsentedChangedReasonWhitelistGranted : kConsentedChangedReasonPotentialWhitelist); + + // Grant consent and if the state has transitioned, immediately synchronize + // with the server as this is an externally induced state change. + if ([self setCurrentStatus:grantStatus reason:grantReason shouldBroadcast:YES]) { + [self synchronizeConsentWithCompletion:^(NSError * _Nullable error) { + if (error) { + MPLogError(@"Consent synchronization failed: %@", error.localizedDescription); + } + else { + MPLogInfo(@"Consent synchronization completed"); + } + }]; + } +} + +- (void)revokeConsent { + // Reset the reacquire consent flag since the user has taken action. + self.shouldReacquireConsent = NO; + + // Revoke consent and if the state has transitioned, immediately synchronize + // with the server as this is an externally induced state change. + if ([self setCurrentStatus:MPConsentStatusDenied reason:kConsentedChangedReasonPublisherDenied shouldBroadcast:YES]) { + [self synchronizeConsentWithCompletion:^(NSError * _Nullable error) { + if (error) { + MPLogError(@"Consent synchronization failed: %@", error.localizedDescription); + } + else { + MPLogInfo(@"Consent synchronization completed"); + } + }]; + } +} + +#pragma mark - Consent Dialog + +- (BOOL)isConsentDialogLoaded { + return self.consentDialogViewController != nil; +} + +- (void)loadConsentDialogWithCompletion:(void (^)(NSError *error))completion { + // Helper block to call completion if not nil + void (^callCompletion)(NSError *error) = ^(NSError *error) { + if (completion != nil) { + completion(error); + } + }; + + // If "Limit Ad Tracking" is on, do not load, nil any view controller that has already loaded, and send error + if (self.currentStatus == MPConsentStatusDoNotTrack) { + self.consentDialogViewController = nil; + NSError *limitAdTrackingError = [NSError errorWithDomain:kConsentErrorDomain + code:MPConsentErrorCodeLimitAdTrackingEnabled + userInfo:nil]; + callCompletion(limitAdTrackingError); + return; + } + + // If a view controller is already loaded, don't load another. + if (self.consentDialogViewController) { + callCompletion(nil); + return; + } + + // Weak self reference for blocks + __weak __typeof__(self) weakSelf = self; + + // Do network request to get HTML + MPURLRequest *consentDialogRequest = [MPURLRequest requestWithURL:[MPAdServerURLBuilder consentDialogURL]]; + [MPHTTPNetworkSession startTaskWithHttpRequest:consentDialogRequest responseHandler:^(NSData *data, NSURLResponse *response){ + // De-serialize JSON data + NSError *deserializationError; + NSDictionary *consentDialogResponse = [NSJSONSerialization JSONObjectWithData:data options:0 error:&deserializationError]; + // Stop if there was a de-serialization error + if (!consentDialogResponse) { + callCompletion(deserializationError); + return; + } + + // Initialize view controller with response HTML strings + MPConsentDialogViewController *viewController = [[MPConsentDialogViewController alloc] initWithDialogHTML:consentDialogResponse[kDialogHTMLKey]]; + viewController.delegate = weakSelf; + + // Load consent page data + [viewController loadConsentPageWithCompletion:^(BOOL success, NSError *error) { + if (success) { + // Notify when page data has been loaded and set the property + weakSelf.consentDialogViewController = viewController; + callCompletion(nil); + } else { + // Notify when there was an error loading page data and set the property to `nil`. + weakSelf.consentDialogViewController = nil; + callCompletion(error); + } + }]; + } errorHandler:^(NSError *error){ + // Call completion without success if the network request failed + callCompletion(error); + }]; +} + +- (void)showConsentDialogFromViewController:(UIViewController *)viewController completion:(void (^)(void))completion { + if (self.isConsentDialogLoaded) { + [viewController presentViewController:self.consentDialogViewController + animated:YES + completion:completion]; + } +} + +// MPConsentDialogViewControllerDelegate +- (void)consentDialogViewControllerDidReceiveConsentResponse:(BOOL)response + consentDialogViewController:(MPConsentDialogViewController *)consentDialogViewController { + // Reset the reacquire consent flag since the user has taken action. + self.shouldReacquireConsent = NO; + + // Set consent status + MPConsentStatus status = (response ? MPConsentStatusConsented : MPConsentStatusDenied); + NSString * changeReason = (response ? kConsentedChangedReasonGranted : kConsentedChangedReasonDenied); + BOOL didTransition = [self setCurrentStatus:status reason:changeReason shouldBroadcast:YES]; + + // Synchronize only if there was a successful state transition. + // It is possible that the user responded to the consent dialog while + // in a "do not track" state. + if (didTransition) { + [self synchronizeConsentWithCompletion:^(NSError * _Nullable error) { + if (error) { + MPLogInfo(@"Error when syncing consent dialog response: %@", error); + return; + } + + MPLogInfo(@"Did sync consent dialog response."); + }]; + } +} + +- (void)consentDialogViewControllerWillDisappear:(MPConsentDialogViewController *)consentDialogViewController { + self.consentDialogViewController = nil; +} + +#pragma mark - Foreground / Background Notification Listeners + +- (void)onApplicationWillEnterForeground:(NSNotification *)notification { + // Always check for "do not track" changes and synchronize with the server + // whenever possible. + [self checkForDoNotTrackAndTransition]; + // If IDFA changed, status will be set to MPConsentStatusUnknown. + [self checkForIfaChange]; + [self synchronizeConsentWithCompletion:^(NSError * _Nullable error) { + if (error) { + MPLogError(@"Consent synchronization failed: %@", error.localizedDescription); + } + else { + MPLogInfo(@"Consent synchronization completed"); + } + }]; +} + +#pragma mark - Broadcasted Notifications + +/** + Broadcasts a @c NSNotification that the consent status has changed. + @param newStatus The new consent state. + @param oldStatus The previous consent state. + @param canCollectPii Flag indicating that collection of PII is allowed. + */ +- (void)notifyConsentChangedTo:(MPConsentStatus)newStatus + fromOldStatus:(MPConsentStatus)oldStatus + canCollectPii:(BOOL)canCollectPii { + // Build the NSNotification userInfo dictionary. + NSDictionary * userInfo = @{ kMPConsentChangedInfoNewConsentStatusKey: @(newStatus), + kMPConsentChangedInfoPreviousConsentStatusKey: @(oldStatus), + kMPConsentChangedInfoCanCollectPersonalInfoKey: @(canCollectPii) + }; + + // Broadcast the consent changed notification on the main thread + // because there may be a listener that is dealing with UI. + dispatch_async(dispatch_get_main_queue(), ^{ + [NSNotificationCenter.defaultCenter postNotificationName:kMPConsentChangedNotification object:self userInfo:userInfo]; + }); + + [self handlePersonalDataOnStateChangeTo:newStatus fromOldStatus:oldStatus]; +} + +#pragma mark - Ad Server Communication + +/** + Synchronizes the current consent state with the server. The local consent state + may change depending upon the response from the server. + @remark Calling this method will reset the current periodic timer update again after @c self.syncFrequency seconds. + @param completion Required completion block to listen for the result of the synchronization. + */ +- (void)synchronizeConsentWithCompletion:(void (^ _Nonnull)(NSError * error))completion { + // Invalidate the next update timer since we are synchronizing right now. + [self.nextUpdateTimer invalidate]; + self.nextUpdateTimer = nil; + + // If GDPR does not apply to the user, synchronizing with the ad server + // is no longer required. This call will complete without error and no + // next update timer will be created. + if (self.isGDPRApplicable == MPBoolNo) { + MPLogInfo(@"GDPR not applicable, consent synchronization will complete immediately"); + completion(nil); + return; + } + + // In the event that the device is in a "do not track" state and there is + // no IFA to send one last time for the server to revoke consent, further + // server synchronization is not necessary until the device transitions + // out of the "do not track" state. + // In the case that GDPR applicability is unknown, we should perform a sync + // to determine the final state. + if (!MPIdentityProvider.advertisingTrackingEnabled && self.ifaForConsent == nil && self.isGDPRApplicable != MPBoolUnknown) { + MPLogInfo(@"Currently in a do not track state, consent synchronization will complete immediately"); + completion(nil); + return; + } + + // Capture the current status being synchronized with the server + NSString * synchronizedStatus = [NSString stringFromConsentStatus:self.currentStatus]; + + // Generate the request. + NSURL * syncUrl = [MPAdServerURLBuilder consentSynchronizationUrl]; + MPURLRequest * syncRequest = [MPURLRequest requestWithURL:syncUrl]; + + // Send the synchronization request out. + __weak __typeof__(self) weakSelf = self; + [MPHTTPNetworkSession startTaskWithHttpRequest:syncRequest responseHandler:^(NSData * _Nonnull data, NSHTTPURLResponse * _Nonnull response) { + __typeof__(self) strongSelf = weakSelf; + + // Update the last successfully synchronized state. + // We still update this state even if we failed to parse the response + // because this is a reflection of what we last sent to the server. + // If we've made it this far, it means that the `synchronizedStatus` was + // successfully sent to the server. However, it may be the case that the + // server sends us back an invalid response. + [NSUserDefaults.standardUserDefaults setObject:synchronizedStatus forKey:kLastSynchronizedConsentStatusStorageKey]; + + // Deserialize the JSON response and attempt to parse it + NSError * deserializationError = nil; + NSDictionary * json = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&deserializationError]; + if (deserializationError != nil) { + // Schedule the next timer and complete with error. + strongSelf.nextUpdateTimer = [strongSelf newNextUpdateTimer]; + MPLogError(@"%@", deserializationError.localizedDescription); + completion(deserializationError); + return; + } + + // Attempt to parse and update the consent state + NSError * parseError = nil; + if ([strongSelf updateConsentStateWithParameters:json]) { + MPLogTrace(@"Successfully parsed consent synchronization response"); + } + else { + parseError = [NSError errorWithDomain:kConsentErrorDomain code:MPConsentErrorCodeFailedToParseSynchronizationResponse userInfo:@{ NSLocalizedDescriptionKey: @"Failed to parse consent synchronization response; one or more required fields are missing" }]; + MPLogError(@"%@", parseError.localizedDescription); + } + + // Schedule the next timer and complete. + strongSelf.nextUpdateTimer = [strongSelf newNextUpdateTimer]; + completion(parseError); + } errorHandler:^(NSError * _Nonnull error) { + __typeof__(self) strongSelf = weakSelf; + + // Schedule the next timer and complete with error. + strongSelf.nextUpdateTimer = [strongSelf newNextUpdateTimer]; + MPLogError(@"%@", error.localizedDescription); + completion(error); + }]; +} + +#pragma mark - Next Update Timer + +/** + Creates a new next update timer instance and starts the timer immediately. This timer + will repeat. + @return A new timer instance. + */ +- (MPTimer * _Nonnull)newNextUpdateTimer { + MPTimer * timer = [MPTimer timerWithTimeInterval:self.syncFrequency target:self selector:@selector(onNextUpdateFiredWithTimer) repeats:YES]; + [timer scheduleNow]; + return timer; +} + +- (void)onNextUpdateFiredWithTimer { + // Synchronize with the server because it's time. + [self synchronizeConsentWithCompletion:^(NSError * _Nullable error) { + if (error) { + MPLogError(@"Consent synchronization failed: %@", error.localizedDescription); + } + else { + MPLogInfo(@"Consent synchronization completed"); + } + }]; +} + +#pragma mark - Internal State Synchronization + +/** + Checks if there is a transition from a do not track state to a tracking state, or a tracking + state to a do not track state. If detected, the appropriate consent status state change will + occur locally and trigger the @c kMPConsentChangedNotification. + @remark This is a local update only and will require a seperate Ad Server synchronization. + @return @c YES if a transition occurred; @c NO otherwise. + */ +- (BOOL)checkForDoNotTrackAndTransition { + BOOL didTransition = NO; + + // Transitioned from an "allowed to track" to "do not track" state. + BOOL trackingAllowed = ASIdentifierManager.sharedManager.advertisingTrackingEnabled; + MPConsentStatus status = self.currentStatus; + if (status != MPConsentStatusDoNotTrack && !trackingAllowed) { + didTransition = [self setCurrentStatus:MPConsentStatusDoNotTrack reason:kConsentedChangedReasonDoNotTrackEnabled shouldBroadcast:YES]; + } + // Transitioned from a "do not track" state to an "allowed to track" state. + // If the previously cached state was "deny consent" + else if (status == MPConsentStatusDoNotTrack && trackingAllowed) { + MPConsentStatus transitionToState = (self.rawConsentStatus == MPConsentStatusDenied ? MPConsentStatusDenied : MPConsentStatusUnknown); + NSString * transitionReason = (transitionToState == MPConsentStatusDenied ? kConsentedChangedReasonDoNotTrackDisabled : kConsentedChangedReasonDoNotTrackDisabledNeedConsent); + didTransition = [self setCurrentStatus:transitionToState reason:transitionReason shouldBroadcast:YES]; + } + + return didTransition; +} + +/** + Checks if there is a transition from a "potential whitelist" state to an "allowed" + state. If detected, the appropriate consent status state change will occur locally. + @remark This check should only be performed after the current versions and current + consent status have been updated, but before broadcasting any consent state change + notification. + @return @c YES if a transition occurred; @c NO otherwise. + */ +- (BOOL)checkForWhitelistAllowedAndTransition { + // Logic only applicable if in the potential whitelist state. + if (self.currentStatus != MPConsentStatusPotentialWhitelist) { + return NO; + } + + BOOL didTransition = NO; + if (self.isWhitelisted) { + didTransition = [self setCurrentStatus:MPConsentStatusConsented reason:kConsentedChangedReasonWhitelistGranted shouldBroadcast:NO]; + } + + return didTransition; +} + +/** + Updates the local consent status. + @param currentStatus The updated status. + @param reasonForChange Reason for the change in status. This should map to an entry in @c MPConsentChangedReason.h + @param shouldBroadcast Flag indicating if the change in status broadcasted. + @return @c YES if the consent status was successfully changed; @c NO otherwise. + */ +- (BOOL)setCurrentStatus:(MPConsentStatus)currentStatus + reason:(NSString * _Nonnull)reasonForChange + shouldBroadcast:(BOOL)shouldBroadcast { + // Compare the current consent status with the proposed status. + // Nothing needs to be done if we're not changing state. + MPConsentStatus oldStatus = self.currentStatus; + if (oldStatus == currentStatus) { + MPLogWarn(@"Attempted to set consent status to same value"); + return NO; + } + + // Disallow setting consent status if we are currently in a "do not track" state + // and will not transition out of it. + BOOL trackingEnabledOnDevice = MPIdentityProvider.advertisingTrackingEnabled; + if (oldStatus == MPConsentStatusDoNotTrack && !trackingEnabledOnDevice) { + MPLogWarn(@"Attempted to set consent status while in a do not track state"); + return NO; + } + + // Save IFA for this particular case so it can be used to remove personal data later. + if (oldStatus != MPConsentStatusConsented && currentStatus == MPConsentStatusConsented) { + [self storeIfa]; + } + + // Set the time stamp for this consent status update. + NSUserDefaults * defaults = NSUserDefaults.standardUserDefaults; + NSTimeInterval timestampInMilliseconds = [NSDate date].timeIntervalSince1970 * 1000.0; + [defaults setDouble:timestampInMilliseconds forKey:kLastChangedMsStorageKey]; + + // Explicitly disallow the setting of `MPConsentStatusDoNotTrack` since we + // need to preserve the previously cached status in the event that + // advertiser tracking is allowed. + if (currentStatus != MPConsentStatusDoNotTrack) { + [defaults setObject:reasonForChange forKey:kLastChangedReasonStorageKey]; + [defaults setInteger:currentStatus forKey:kConsentStatusStorageKey]; + } + + // "do not track" state is maintained by a seperate storage field. + [defaults setBool:(currentStatus == MPConsentStatusDoNotTrack) forKey:kIsDoNotTrackStorageKey]; + + // If the state has been updated to "consented", copy the current + // privacy policy version, vendor list version, and IAB vendor list + // to the equivalent consented fields. + if (currentStatus == MPConsentStatusConsented) { + [defaults setObject:self.iabVendorList forKey:kConsentedIabVendorListStorageKey]; + [defaults setObject:self.privacyPolicyVersion forKey:kConsentedPrivacyPolicyVersionStorageKey]; + [defaults setObject:self.vendorListVersion forKey:kConsentedVendorListVersionStorageKey]; + } + // If the state has transitioned out of the "consented" state, remove any previously + // consented versions as they no longer apply. + else if (oldStatus == MPConsentStatusConsented) { + [defaults setObject:nil forKey:kConsentedIabVendorListStorageKey]; + [defaults setObject:nil forKey:kConsentedPrivacyPolicyVersionStorageKey]; + [defaults setObject:nil forKey:kConsentedVendorListVersionStorageKey]; + } + + if (shouldBroadcast) { + [self notifyConsentChangedTo:self.currentStatus fromOldStatus:oldStatus canCollectPii:self.canCollectPersonalInfo]; + } + + MPLogInfo(@"Consent state changed to %@: %@", [NSString stringFromConsentStatus:currentStatus], reasonForChange); + + return YES; +} + +/** + Updates the local consent state atomically. + @param newState Parameters are stored as @c NSString key-value pairs. + @return @c YES if the parameters were successfully parsed; @c NO otherwise. + */ +- (BOOL)updateConsentStateWithParameters:(NSDictionary * _Nonnull)newState { + MPLogTrace(@"Attempting to update consent with new state:\n%@", newState); + + // Validate required parameters + NSString * isWhitelistedValue = newState[kIsWhitelistedKey]; + NSString * isGDPRRegionValue = newState[kIsGDPRRegionKey]; + NSString * currentIabVendorListHash = newState[kIabVendorListHashKey]; + NSString * vendorListUrl = newState[kVendorListUrlKey]; + NSString * vendorListVersion = newState[kVendorListVersionKey]; + NSString * privacyPolicyUrl = newState[kPrivacyPolicyUrlKey]; + NSString * privacyPolicyVersion = newState[kPrivacyPolicyVersionKey]; + if (isWhitelistedValue == nil || isGDPRRegionValue == nil || + currentIabVendorListHash == nil || + vendorListUrl == nil || vendorListVersion == nil || + privacyPolicyUrl == nil || privacyPolicyVersion == nil) { + MPLogError(@"Failed to parse new state. Missing required fields."); + return NO; + } + + // Extract the old field values for comparison. + MPConsentStatus oldStatus = self.currentStatus; + MPBool oldGDPRApplicableStatus = self.isGDPRApplicable; + + // Update the required fields. + NSUserDefaults * defaults = NSUserDefaults.standardUserDefaults; + [defaults setBool:[isWhitelistedValue boolValue] forKey:kIsWhitelistedStorageKey]; + + [defaults setObject:currentIabVendorListHash forKey:kIabVendorListHashStorageKey]; + [defaults setObject:vendorListUrl forKey:kVendorListUrlStorageKey]; + [defaults setObject:vendorListVersion forKey:kVendorListVersionStorageKey]; + [defaults setObject:privacyPolicyUrl forKey:kPrivacyPolicyUrlStorageKey]; + [defaults setObject:privacyPolicyVersion forKey:kPrivacyPolicyVersionStorageKey]; + + // A user is considered GDPR applicable if they first launched the app + // within a GDPR region. + if (self.isGDPRApplicable == MPBoolUnknown) { + MPBool gdprApplies = [isGDPRRegionValue boolValue] ? MPBoolYes : MPBoolNo; + [defaults setInteger:gdprApplies forKey:kGDPRAppliesStorageKey]; + } + + // Optionally force state to explicit no or unknown. + BOOL shouldForceExplicitNo = [newState[kForceExplicitNoKey] boolValue]; + BOOL shouldInvalidateConsent = [newState[kInvalidateConsentKey] boolValue]; + BOOL shouldReacquireConsent = [newState[kReacquireConsentKey] boolValue]; + NSString * consentChangeReason = newState[kConsentChangedReasonKey]; + [self forceStatusShouldForceExplicitNo:shouldForceExplicitNo + shouldInvalidateConsent:shouldInvalidateConsent + shouldReacquireConsent:shouldReacquireConsent + consentChangeReason:consentChangeReason + shouldBroadcast:NO]; + + // Optionally update the current IAB vendor list + NSString * currentIabVendorList = newState[kIabVendorListKey]; + if (currentIabVendorList != nil) { + [defaults setObject:currentIabVendorList forKey:kIabVendorListStorageKey]; + + // In the event that the IAB has changed the structure of the vendor list format, + // but the vendors in the list remain the same, we should update the consented + // IAB vendor list to the current one if the privacy policy version and vendor list + // version match their consented counterparts. + if ([self.consentedPrivacyPolicyVersion isEqualToString:privacyPolicyVersion] && + [self.consentedVendorListVersion isEqualToString:vendorListVersion]) { + [defaults setObject:currentIabVendorList forKey:kConsentedIabVendorListStorageKey]; + } + } + + // Optionally update the synchronization frequency + NSString * syncFrequencyValue = newState[kSyncFrequencyKey]; + if (syncFrequencyValue != nil) { + NSTimeInterval frequency = [syncFrequencyValue doubleValue]; + self.syncFrequency = (frequency > 0 ? frequency : kDefaultRefreshInterval); + } + + // Optionally update the server extras field + NSString * extras = newState[kExtrasKey]; + if (extras != nil) { + [defaults setObject:extras forKey:kExtrasStorageKey]; + } + + // State transition check for server finally whitelisting a publisher. + [self checkForWhitelistAllowedAndTransition]; + + // Broadcast the `kMPConsentChangedNotification` if needed. + if ((oldStatus != self.currentStatus) || (oldGDPRApplicableStatus != self.isGDPRApplicable)) { + [self notifyConsentChangedTo:self.currentStatus fromOldStatus:oldStatus canCollectPii:self.canCollectPersonalInfo]; + } + + return YES; +} + +- (void)forceStatusShouldForceExplicitNo:(BOOL)shouldForceExplicitNo + shouldInvalidateConsent:(BOOL)shouldInvalidateConsent + shouldReacquireConsent:(BOOL)shouldReacquireConsent + consentChangeReason:(NSString *)consentChangeReason + shouldBroadcast:(BOOL)shouldBroadcast { + if (shouldForceExplicitNo) { + self.shouldReacquireConsent = NO; + [self setCurrentStatus:MPConsentStatusDenied reason:consentChangeReason shouldBroadcast:shouldBroadcast]; + } + else if (shouldInvalidateConsent) { + self.shouldReacquireConsent = NO; + [self setCurrentStatus:MPConsentStatusUnknown reason:consentChangeReason shouldBroadcast:shouldBroadcast]; + } + else if (shouldReacquireConsent) { + self.shouldReacquireConsent = YES; + } +} + +@end + +@implementation MPConsentManager (State) + +#pragma mark - Read Only Properties + +/** + Replace all the macros in the URL format. + @param urlFormat URL format string from ad server + @param isoLanguageCode ISO language code used for macro replacement + @return A valid URL if successful; @c nil otherwise + */ +- (NSURL * _Nullable)urlWithFormat:(NSString * _Nullable)urlFormat isoLanguageCode:(NSString * _Nullable)isoLanguageCode { + NSString * regionFreeLangaugeCode = [self removeRegionFromLanguageCode:isoLanguageCode]; + if (regionFreeLangaugeCode == nil) { + return nil; + } + + if (![NSLocale.ISOLanguageCodes containsObject:regionFreeLangaugeCode]) { + MPLogInfo(@"%@ is not a valid ISO 639-1 language code", regionFreeLangaugeCode); + return nil; + } + + // Replace the %%LANGUAGE%% macro in the url. + NSString * url = [urlFormat stringByReplacingOccurrencesOfString:kMacroReplaceLanguageCode withString:regionFreeLangaugeCode]; + return (url != nil ? [NSURL URLWithString:url] : nil); +} + +- (NSString * _Nullable)consentedIabVendorList { + return [NSUserDefaults.standardUserDefaults stringForKey:kConsentedIabVendorListStorageKey]; +} + +- (NSString * _Nullable)consentedPrivacyPolicyVersion { + return [NSUserDefaults.standardUserDefaults stringForKey:kConsentedPrivacyPolicyVersionStorageKey]; +} + +- (NSString * _Nullable)consentedVendorListVersion { + return [NSUserDefaults.standardUserDefaults stringForKey:kConsentedVendorListVersionStorageKey]; +} + +- (MPConsentStatus)currentStatus { + // Query the "do not track" state first, since "do not track" trumps all other states. + // The cached consent state may be different than "do not track", and is preserved + // to retain the previous consent status in the event that advertiser tracking is re-enabled. + if (self.isDoNotTrack) { + return MPConsentStatusDoNotTrack; + } + + // Read the cached consent status. In the event that the key kConsentStatusKey + // doesn't exist, integerForKey: will return a 0, which will translate into + // MPConsentStatusUnknown. + return (MPConsentStatus)[NSUserDefaults.standardUserDefaults integerForKey:kConsentStatusStorageKey]; +} + +- (NSString * _Nullable)extras { + return [NSUserDefaults.standardUserDefaults stringForKey:kExtrasStorageKey]; +} + +- (NSString * _Nullable)iabVendorList { + return [NSUserDefaults.standardUserDefaults stringForKey:kIabVendorListStorageKey]; +} + +- (NSString * _Nullable)iabVendorListHash { + return [NSUserDefaults.standardUserDefaults stringForKey:kIabVendorListHashStorageKey]; +} + +- (NSString * _Nullable)ifaForConsent { + return [NSUserDefaults.standardUserDefaults stringForKey:kIfaForConsentStorageKey]; +} + +- (MPBool)isGDPRApplicable { + return (MPBool)[NSUserDefaults.standardUserDefaults integerForKey:kGDPRAppliesStorageKey]; +} + +- (BOOL)isWhitelisted { + return [NSUserDefaults.standardUserDefaults boolForKey:kIsWhitelistedStorageKey]; +} + +- (NSString * _Nullable)lastChangedReason { + // Query the "do not track" state first, since "do not track" trumps all other states. + // The cached consent state may be different than "do not track", and is preserved + // to retain the previous consent status in the event that advertiser tracking is re-enabled. + // In this case, the last changed reason in a "do not track" state will always be + // kConsentedChangedReasonDoNotTrackEnabled + if (self.isDoNotTrack) { + return kConsentedChangedReasonDoNotTrackEnabled; + } + + return [NSUserDefaults.standardUserDefaults stringForKey:kLastChangedReasonStorageKey]; +} + +- (NSTimeInterval)lastChangedTimestampInMilliseconds { + return (NSTimeInterval)[NSUserDefaults.standardUserDefaults doubleForKey:kLastChangedMsStorageKey]; +} + +- (NSString * _Nullable)lastSynchronizedStatus { + return [NSUserDefaults.standardUserDefaults stringForKey:kLastSynchronizedConsentStatusStorageKey]; +} + +- (NSURL * _Nullable)privacyPolicyUrl { + return [self privacyPolicyUrlWithISOLanguageCode:self.currentLanguageCode]; +} + +- (NSURL * _Nullable)privacyPolicyUrlWithISOLanguageCode:(NSString * _Nonnull)isoLanguageCode { + NSString * urlFormat = [NSUserDefaults.standardUserDefaults stringForKey:kPrivacyPolicyUrlStorageKey]; + return [self urlWithFormat:urlFormat isoLanguageCode:isoLanguageCode]; +} + +- (NSString * _Nullable)privacyPolicyVersion { + return [NSUserDefaults.standardUserDefaults stringForKey:kPrivacyPolicyVersionStorageKey]; +} + +- (NSURL *)vendorListUrl { + return [self vendorListUrlWithISOLanguageCode:self.currentLanguageCode]; +} + +- (NSURL *)vendorListUrlWithISOLanguageCode:(NSString *)isoLanguageCode { + NSString * urlFormat = [NSUserDefaults.standardUserDefaults stringForKey:kVendorListUrlStorageKey]; + return [self urlWithFormat:urlFormat isoLanguageCode:isoLanguageCode]; +} + +- (NSString * _Nullable)vendorListVersion { + return [NSUserDefaults.standardUserDefaults stringForKey:kVendorListVersionStorageKey]; +} + +@end + +@implementation MPConsentManager (PersonalDataHandler) + +- (void)handlePersonalDataOnStateChangeTo:(MPConsentStatus)newStatus fromOldStatus:(MPConsentStatus)oldStatus { + [self updateAppConversionTracking]; + + if (oldStatus == MPConsentStatusConsented && newStatus != MPConsentStatusConsented) { + [self synchronizeConsentWithCompletion:^(NSError * _Nullable error) { + if (!error) { + [self removeIfa]; + } + }]; + } +} + +- (void)storeIfa { + NSString *identifier = [MPIdentityProvider identifierFromASIdentifierManager:NO]; + if (!identifier) { + return; + } + NSString *storedIFA = [NSUserDefaults.standardUserDefaults stringForKey:kIfaForConsentStorageKey]; + if (![identifier isEqualToString:storedIFA]) { + [NSUserDefaults.standardUserDefaults setObject:identifier forKey:kIfaForConsentStorageKey]; + } +} + +/** + * If IFA is changed and the status is transitioning from MPConsentStatusConsented, remove old IFA from NSUserDefault and change status to unknown. + */ +- (void)checkForIfaChange +{ + NSString *oldIfa = [NSUserDefaults.standardUserDefaults stringForKey:kIfaForConsentStorageKey]; + NSString *newIfa = [MPIdentityProvider identifierFromASIdentifierManager:NO]; + // IFA reset + if (self.currentStatus == MPConsentStatusConsented && ![oldIfa isEqualToString:newIfa] && newIfa != nil) { + [NSUserDefaults.standardUserDefaults removeObjectForKey:kLastSynchronizedConsentStatusStorageKey]; + [NSUserDefaults.standardUserDefaults removeObjectForKey:kIfaForConsentStorageKey]; + [self setCurrentStatus:MPConsentStatusUnknown reason:kConsentedChangedReasonIfaChanged shouldBroadcast:YES]; + } +} + +- (void)removeIfa { + [NSUserDefaults.standardUserDefaults removeObjectForKey:kIfaForConsentStorageKey]; +} + +/** + * App conversion request will only be fired when MoPub obtains consent. + */ +- (void)updateAppConversionTracking { + if ([MPConsentManager sharedManager].canCollectPersonalInfo) { + NSString *appId = [NSUserDefaults.standardUserDefaults stringForKey:MOPUB_CONVERSION_APP_ID_KEY]; + BOOL hasAlreadyCheckedAppConversion = [NSUserDefaults.standardUserDefaults boolForKey:MOPUB_CONVERSION_DEFAULTS_KEY]; + if (!hasAlreadyCheckedAppConversion && appId.length > 0) { + [[MPAdConversionTracker sharedConversionTracker] reportApplicationOpenForApplicationID:appId]; + } + } +} + +@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MPCoreInstanceProvider.h b/iphone/Maps/3party/MoPubSDK/Internal/MPCoreInstanceProvider.h index 3d6af00e9d..e7e56c195c 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/MPCoreInstanceProvider.h +++ b/iphone/Maps/3party/MoPubSDK/Internal/MPCoreInstanceProvider.h @@ -27,10 +27,8 @@ @class MPTimer; @class MPGeolocationProvider; @class CLLocationManager; -@class MPLogEventRecorder; -@class MPNetworkManager; -typedef id(^MPSingletonProviderBlock)(); +typedef id(^MPSingletonProviderBlock)(void); typedef NS_OPTIONS(NSUInteger, MPATSSetting) { @@ -49,25 +47,13 @@ typedef NS_OPTIONS(NSUInteger, MPATSSetting) { - (void)keepObjectAliveForCurrentRunLoopIteration:(id)anObject; -#pragma mark - Fetching Ads -- (NSMutableURLRequest *)buildConfiguredURLRequestWithURL:(NSURL *)URL; -- (MPAdServerCommunicator *)buildMPAdServerCommunicatorWithDelegate:(id)delegate; - -#pragma mark - URL Handling -- (MPURLResolver *)buildMPURLResolverWithURL:(NSURL *)URL completion:(MPURLResolverCompletionBlock)completion; -- (MPAdDestinationDisplayAgent *)buildMPAdDestinationDisplayAgentWithDelegate:(id)delegate; - #pragma mark - Utilities -- (UIDevice *)sharedCurrentDevice; - (MPGeolocationProvider *)sharedMPGeolocationProvider; - (CLLocationManager *)buildCLLocationManager; - (id)buildMPAdAlertManagerWithDelegate:(id)delegate; - (MPAdAlertGestureRecognizer *)buildMPAdAlertGestureRecognizerWithTarget:(id)target action:(SEL)action; -- (NSOperationQueue *)sharedOperationQueue; - (MPAnalyticsTracker *)sharedMPAnalyticsTracker; - (MPReachability *)sharedMPReachability; -- (MPLogEventRecorder *)sharedLogEventRecorder; -- (MPNetworkManager *)sharedNetworkManager; - (MPATSSetting)appTransportSecuritySettings; // This call may return nil and may not update if the user hot-swaps the device's sim card. diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MPCoreInstanceProvider.m b/iphone/Maps/3party/MoPubSDK/Internal/MPCoreInstanceProvider.m index 3db8b09e4d..1dee272ace 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/MPCoreInstanceProvider.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/MPCoreInstanceProvider.m @@ -17,8 +17,6 @@ #import "MPTimer.h" #import "MPAnalyticsTracker.h" #import "MPGeolocationProvider.h" -#import "MPLogEventRecorder.h" -#import "MPNetworkManager.h" #define MOPUB_CARRIER_INFO_DEFAULTS_KEY @"com.mopub.carrierinfo" @@ -41,7 +39,6 @@ typedef enum @interface MPCoreInstanceProvider () -@property (nonatomic, copy) NSString *userAgent; @property (nonatomic, strong) NSMutableDictionary *singletons; @property (nonatomic, strong) NSMutableDictionary *carrierInfo; @property (nonatomic, assign) MPTwitterDeepLink twitterDeepLinkStatus; @@ -50,7 +47,6 @@ typedef enum @implementation MPCoreInstanceProvider -@synthesize userAgent = _userAgent; @synthesize singletons = _singletons; @synthesize carrierInfo = _carrierInfo; @synthesize twitterDeepLinkStatus = _twitterDeepLinkStatus; @@ -136,49 +132,8 @@ static MPCoreInstanceProvider *sharedProvider = nil; [[NSUserDefaults standardUserDefaults] synchronize]; } -#pragma mark - Fetching Ads -- (NSMutableURLRequest *)buildConfiguredURLRequestWithURL:(NSURL *)URL -{ - NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:URL]; - [request setHTTPShouldHandleCookies:YES]; - [request setValue:self.userAgent forHTTPHeaderField:@"User-Agent"]; - return request; -} - -- (NSString *)userAgent -{ - if (!_userAgent) { - self.userAgent = [[[UIWebView alloc] init] stringByEvaluatingJavaScriptFromString:@"navigator.userAgent"]; - } - - return _userAgent; -} - -- (MPAdServerCommunicator *)buildMPAdServerCommunicatorWithDelegate:(id)delegate -{ - return [(MPAdServerCommunicator *)[MPAdServerCommunicator alloc] initWithDelegate:delegate]; -} - - -#pragma mark - URL Handling - -- (MPURLResolver *)buildMPURLResolverWithURL:(NSURL *)URL completion:(MPURLResolverCompletionBlock)completion; -{ - return [MPURLResolver resolverWithURL:URL completion:completion]; -} - -- (MPAdDestinationDisplayAgent *)buildMPAdDestinationDisplayAgentWithDelegate:(id)delegate -{ - return [MPAdDestinationDisplayAgent agentWithDelegate:delegate]; -} - #pragma mark - Utilities -- (UIDevice *)sharedCurrentDevice -{ - return [UIDevice currentDevice]; -} - - (MPGeolocationProvider *)sharedMPGeolocationProvider { return [self singletonForClass:[MPGeolocationProvider class] provider:^id{ @@ -216,18 +171,6 @@ static MPCoreInstanceProvider *sharedProvider = nil; return gestureRecognizer; } -- (NSOperationQueue *)sharedOperationQueue -{ - static NSOperationQueue *sharedOperationQueue = nil; - static dispatch_once_t pred; - - dispatch_once(&pred, ^{ - sharedOperationQueue = [[NSOperationQueue alloc] init]; - }); - - return sharedOperationQueue; -} - - (MPAnalyticsTracker *)sharedMPAnalyticsTracker { return [self singletonForClass:[MPAnalyticsTracker class] provider:^id{ @@ -242,21 +185,6 @@ static MPCoreInstanceProvider *sharedProvider = nil; }]; } -- (MPLogEventRecorder *)sharedLogEventRecorder -{ - return [self singletonForClass:[MPLogEventRecorder class] provider:^id{ - MPLogEventRecorder *recorder = [[MPLogEventRecorder alloc] init]; - return recorder; - }]; -} - -- (MPNetworkManager *)sharedNetworkManager -{ - return [self singletonForClass:[MPNetworkManager class] provider:^id{ - return [MPNetworkManager sharedNetworkManager]; - }]; -} - - (MPATSSetting)appTransportSecuritySettings { // Keep track of ATS settings statically, as they'll never change in the lifecycle of the application. diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MPHTTPNetworkSession.h b/iphone/Maps/3party/MoPubSDK/Internal/MPHTTPNetworkSession.h new file mode 100644 index 0000000000..f70c1fd8cb --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Internal/MPHTTPNetworkSession.h @@ -0,0 +1,60 @@ +// +// MPHTTPNetworkSession.h +// +// Copyright © 2018 MoPub. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@interface MPHTTPNetworkSession : NSObject +/** + Singleton instance of @c MPHTTPNetworkSession. + */ ++ (instancetype)sharedInstance; + +/** + Initializes a HTTP network request. + @param request Request to send. + @param responseHandler Optional response handler that will be invoked on the current thread. + @param errorHandler Optional error handler that will be invoked on the current thread. + @param shouldRedirectWithNewRequest Optional logic control block to determine if a redirection should occur. This is invoked on the current thread. + @returns The HTTP networking task. + */ ++ (NSURLSessionTask *)taskWithHttpRequest:(NSURLRequest *)request + responseHandler:(void (^ _Nullable)(NSData * data, NSHTTPURLResponse * response))responseHandler + errorHandler:(void (^ _Nullable)(NSError * error))errorHandler + shouldRedirectWithNewRequest:(BOOL (^ _Nullable)(NSURLSessionTask * task, NSURLRequest * newRequest))shouldRedirectWithNewRequest; + +/** + Initializes a HTTP network request and immediately sends it. + @param request Request to send. + @returns The HTTP networking task. + */ ++ (NSURLSessionTask *)startTaskWithHttpRequest:(NSURLRequest *)request; + +/** + Initializes a HTTP network request and immediately sends it. + @param request Request to send. + @param responseHandler Optional response handler that will be invoked on the main thread. + @param errorHandler Optional error handler that will be invoked on the main thread. + @returns The HTTP networking task. + */ ++ (NSURLSessionTask *)startTaskWithHttpRequest:(NSURLRequest *)request + responseHandler:(void (^ _Nullable)(NSData * data, NSHTTPURLResponse * response))responseHandler + errorHandler:(void (^ _Nullable)(NSError * error))errorHandler; + +/** + Initializes a HTTP network request and immediately sends it. + @param request Request to send. + @param responseHandler Optional response handler that will be invoked on the main thread. + @param errorHandler Optional error handler that will be invoked on the main thread. + @param shouldRedirectWithNewRequest Optional logic control block to determine if a redirection should occur. This is invoked on the current thread. + @returns The HTTP networking task. + */ ++ (NSURLSessionTask *)startTaskWithHttpRequest:(NSURLRequest *)request + responseHandler:(void (^ _Nullable)(NSData * data, NSHTTPURLResponse * response))responseHandler + errorHandler:(void (^ _Nullable)(NSError * error))errorHandler + shouldRedirectWithNewRequest:(BOOL (^ _Nullable)(NSURLSessionTask * task, NSURLRequest * newRequest))shouldRedirectWithNewRequest; +@end +NS_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MPHTTPNetworkSession.m b/iphone/Maps/3party/MoPubSDK/Internal/MPHTTPNetworkSession.m new file mode 100644 index 0000000000..781e410e50 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Internal/MPHTTPNetworkSession.m @@ -0,0 +1,191 @@ +// +// MPHTTPNetworkSession.m +// +// Copyright © 2018 MoPub. All rights reserved. +// + +#import "MPError.h" +#import "MPHTTPNetworkTaskData.h" +#import "MPHTTPNetworkSession.h" +#import "MPLogging.h" + +// Macros for dispatching asynchronously to the main queue +#define safe_block(block, ...) block ? block(__VA_ARGS__) : nil +#define async_queue_block(queue, block, ...) dispatch_async(queue, ^ \ +{ \ +safe_block(block, __VA_ARGS__); \ +}) +#define main_queue_block(block, ...) async_queue_block(dispatch_get_main_queue(), block, __VA_ARGS__); + +// Constants +NSString * const kMoPubSDKNetworkDomain = @"MoPubSDKNetworkDomain"; + +@interface MPHTTPNetworkSession() +@property (nonatomic, strong) NSURLSession * sharedSession; +@property (nonatomic, strong) NSMutableDictionary * sessions; +@end + +@implementation MPHTTPNetworkSession + +#pragma mark - Initialization + ++ (instancetype)sharedInstance { + static dispatch_once_t once; + static id _sharedInstance; + dispatch_once(&once, ^{ + _sharedInstance = [[self alloc] init]; + }); + return _sharedInstance; +} + +- (instancetype)init { + if (self = [super init]) { + // Shared `NSURLSession` to be used for all `MPHTTPNetworkTask` objects. All tasks should use this single + // session so that the DNS lookup and SSL handshakes do not need to be redone. + _sharedSession = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration] delegate:self delegateQueue:nil]; + + // Dictionary of all sessions currently in flight. + _sessions = [NSMutableDictionary dictionary]; + } + + return self; +} + +#pragma mark - Manual Start Tasks + ++ (NSURLSessionTask *)taskWithHttpRequest:(NSURLRequest *)request + responseHandler:(void (^ _Nullable)(NSData * data, NSHTTPURLResponse * response))responseHandler + errorHandler:(void (^ _Nullable)(NSError * error))errorHandler + shouldRedirectWithNewRequest:(BOOL (^ _Nullable)(NSURLSessionTask * task, NSURLRequest * newRequest))shouldRedirectWithNewRequest { + // Networking task + NSURLSessionDataTask * task = [MPHTTPNetworkSession.sharedInstance.sharedSession dataTaskWithRequest:request]; + + // Initialize the task data + MPHTTPNetworkTaskData * taskData = [[MPHTTPNetworkTaskData alloc] initWithResponseHandler:responseHandler errorHandler:errorHandler shouldRedirectWithNewRequest:shouldRedirectWithNewRequest]; + + // Update the sessions. + MPHTTPNetworkSession.sharedInstance.sessions[task] = taskData; + + return task; +} + +#pragma mark - Automatic Start Tasks + ++ (NSURLSessionTask *)startTaskWithHttpRequest:(NSURLRequest *)request { + return [MPHTTPNetworkSession startTaskWithHttpRequest:request responseHandler:nil errorHandler:nil shouldRedirectWithNewRequest:nil]; +} + ++ (NSURLSessionTask *)startTaskWithHttpRequest:(NSURLRequest *)request + responseHandler:(void (^ _Nullable)(NSData * data, NSHTTPURLResponse * response))responseHandler + errorHandler:(void (^ _Nullable)(NSError * error))errorHandler { + return [MPHTTPNetworkSession startTaskWithHttpRequest:request responseHandler:responseHandler errorHandler:errorHandler shouldRedirectWithNewRequest:nil]; +} + ++ (NSURLSessionTask *)startTaskWithHttpRequest:(NSURLRequest *)request + responseHandler:(void (^ _Nullable)(NSData * data, NSHTTPURLResponse * response))responseHandler + errorHandler:(void (^ _Nullable)(NSError * error))errorHandler + shouldRedirectWithNewRequest:(BOOL (^ _Nullable)(NSURLSessionTask * task, NSURLRequest * newRequest))shouldRedirectWithNewRequest { + // Generate a manual start task. + NSURLSessionTask * task = [MPHTTPNetworkSession taskWithHttpRequest:request responseHandler:^(NSData * _Nonnull data, NSHTTPURLResponse * _Nonnull response) { + main_queue_block(responseHandler, data, response); + } errorHandler:^(NSError * _Nonnull error) { + main_queue_block(errorHandler, error); + } shouldRedirectWithNewRequest:shouldRedirectWithNewRequest]; + + // Immediately start the task. + [task resume]; + + return task; +} + +#pragma mark - NSURLSessionDataDelegate + +- (void)URLSession:(NSURLSession *)session + dataTask:(NSURLSessionDataTask *)dataTask +didReceiveResponse:(NSURLResponse *)response + completionHandler:(void (^)(NSURLSessionResponseDisposition disposition))completionHandler { + // Allow all responses. + completionHandler(NSURLSessionResponseAllow); +} + +- (void)URLSession:(NSURLSession *)session + dataTask:(NSURLSessionDataTask *)dataTask + didReceiveData:(NSData *)data { + // Retrieve the task data. + MPHTTPNetworkTaskData * taskData = self.sessions[dataTask]; + if (taskData == nil) { + return; + } + + // Append the new data to the task. + if (taskData.responseData == nil) { + taskData.responseData = [NSMutableData data]; + } + + [taskData.responseData appendData:data]; +} + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task +willPerformHTTPRedirection:(NSHTTPURLResponse *)response + newRequest:(NSURLRequest *)request + completionHandler:(void (^)(NSURLRequest * _Nullable))completionHandler { + // Retrieve the task data. + MPHTTPNetworkTaskData * taskData = self.sessions[task]; + if (taskData == nil) { + completionHandler(request); + return; + } + + // If there is a redirection handler block registered with the HTTP task, we should + // query for it's response. By default, we will allow the redirection. + NSURLRequest * newRequest = request; + if (taskData.shouldRedirectWithNewRequest != nil && !taskData.shouldRedirectWithNewRequest(task, request)) { + // Reject the redirection. + newRequest = nil; + } + + completionHandler(newRequest); +} + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task +didCompleteWithError:(nullable NSError *)error { + // Retrieve the task data. + MPHTTPNetworkTaskData * taskData = self.sessions[task]; + if (taskData == nil) { + return; + } + + // Remove the task data from the currently in flight sessions. + self.sessions[task] = nil; + + // Validate that response is not an error. + if (error != nil) { + MPLogError(@"Network request failed with: %@", error.localizedDescription); + safe_block(taskData.errorHandler, error); + return; + } + + // Validate response is a HTTP response. + NSHTTPURLResponse * httpResponse = [task.response isKindOfClass:[NSHTTPURLResponse class]] ? (NSHTTPURLResponse *)task.response : nil; + if (httpResponse == nil) { + NSError * notHttpResponseError = [NSError errorWithDomain:kMoPubSDKNetworkDomain code:MOPUBErrorUnexpectedNetworkResponse userInfo:@{ NSLocalizedDescriptionKey: @"response is not of type NSHTTPURLResponse" }]; + MPLogError(@"Network request failed with: %@", notHttpResponseError.localizedDescription); + safe_block(taskData.errorHandler, notHttpResponseError); + return; + } + + // Validate that there is data + if (taskData.responseData == nil) { + NSError * noDataError = [NSError errorWithDomain:kMoPubSDKNetworkDomain code:MOPUBErrorNoNetworkData userInfo:@{ NSLocalizedDescriptionKey: @"no data found in the NSHTTPURLResponse" }]; + MPLogError(@"Network request failed with: %@", noDataError.localizedDescription); + safe_block(taskData.errorHandler, noDataError); + return; + } + + // By this point all of the fields have been validated. + safe_block(taskData.responseHandler, taskData.responseData, httpResponse); +} + +@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MPHTTPNetworkTaskData.h b/iphone/Maps/3party/MoPubSDK/Internal/MPHTTPNetworkTaskData.h new file mode 100644 index 0000000000..a30deefe6e --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Internal/MPHTTPNetworkTaskData.h @@ -0,0 +1,33 @@ +// +// MPHTTPNetworkTaskData.h +// MoPubSDK +// +// Copyright © 2018 MoPub. All rights reserved. +// + +#import + +/** + Provides an easy encapsulation of a HTTP networking task's data because we can't effectively + subclass @c NSURLSessionDataTask. + */ +NS_ASSUME_NONNULL_BEGIN +@interface MPHTTPNetworkTaskData : NSObject +@property (nonatomic, strong, nullable) NSMutableData * responseData; +@property (nonatomic, copy, nullable) void (^responseHandler)(NSData * data, NSHTTPURLResponse * response); +@property (nonatomic, copy, nullable) void (^errorHandler)(NSError * error); +@property (nonatomic, copy, nullable) BOOL (^shouldRedirectWithNewRequest)(NSURLSessionTask * task, NSURLRequest * newRequest); + +/** + Initializes the task data with the given handlers. + @param responseHandler Optional response handler that will be invoked on the current thread. + @param errorHandler Optional error handler that will be invoked on the current thread. + @param shouldRedirectWithNewRequest Optional logic control block to determine if a redirection should occur. This is invoked on the current thread. + @returns The HTTP networking task data. + */ +- (instancetype)initWithResponseHandler:(void (^ _Nullable)(NSData * data, NSHTTPURLResponse * response))responseHandler + errorHandler:(void (^ _Nullable)(NSError * error))errorHandler + shouldRedirectWithNewRequest:(BOOL (^ _Nullable)(NSURLSessionTask * task, NSURLRequest * newRequest))shouldRedirectWithNewRequest NS_DESIGNATED_INITIALIZER; + +@end +NS_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MPHTTPNetworkTaskData.m b/iphone/Maps/3party/MoPubSDK/Internal/MPHTTPNetworkTaskData.m new file mode 100644 index 0000000000..ae898f29d8 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Internal/MPHTTPNetworkTaskData.m @@ -0,0 +1,31 @@ +// +// MPHTTPNetworkTaskData.m +// MoPubSDK +// +// Copyright © 2018 MoPub. All rights reserved. +// + +#import "MPHTTPNetworkTaskData.h" + +NS_ASSUME_NONNULL_BEGIN +@implementation MPHTTPNetworkTaskData + +- (instancetype)init { + return [self initWithResponseHandler:nil errorHandler:nil shouldRedirectWithNewRequest:nil]; +} + +- (instancetype)initWithResponseHandler:(void (^ _Nullable)(NSData * data, NSHTTPURLResponse * response))responseHandler + errorHandler:(void (^ _Nullable)(NSError * error))errorHandler + shouldRedirectWithNewRequest:(BOOL (^ _Nullable)(NSURLSessionTask * task, NSURLRequest * newRequest))shouldRedirectWithNewRequest { + if (self = [super init]) { + _responseData = nil; + _responseHandler = responseHandler; + _errorHandler = errorHandler; + _shouldRedirectWithNewRequest = shouldRedirectWithNewRequest; + } + + return self; +} + +@end +NS_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MPInstanceProvider.h b/iphone/Maps/3party/MoPubSDK/Internal/MPInstanceProvider.h index 3b0b7c4d9a..2ba600e0fb 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/MPInstanceProvider.h +++ b/iphone/Maps/3party/MoPubSDK/Internal/MPInstanceProvider.h @@ -74,13 +74,6 @@ - (id)singletonForClass:(Class)klass provider:(MPSingletonProviderBlock)provider; - (id)singletonForClass:(Class)klass provider:(MPSingletonProviderBlock)provider context:(id)context; -#pragma mark - Banners -- (MPBannerAdManager *)buildMPBannerAdManagerWithDelegate:(id)delegate; -- (MPBaseBannerAdapter *)buildBannerAdapterForConfiguration:(MPAdConfiguration *)configuration - delegate:(id)delegate; -- (MPBannerCustomEvent *)buildBannerCustomEventFromCustomClass:(Class)customClass - delegate:(id)delegate; - #pragma mark - Interstitials - (MPInterstitialAdManager *)buildMPInterstitialAdManagerWithDelegate:(id)delegate; - (MPBaseInterstitialAdapter *)buildInterstitialAdapterForConfiguration:(MPAdConfiguration *)configuration diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MPInstanceProvider.m b/iphone/Maps/3party/MoPubSDK/Internal/MPInstanceProvider.m index 763e25f0d5..cea9c5aec1 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/MPInstanceProvider.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/MPInstanceProvider.m @@ -100,35 +100,6 @@ static MPInstanceProvider *sharedAdProvider = nil; return singleton; } -#pragma mark - Banners - -- (MPBannerAdManager *)buildMPBannerAdManagerWithDelegate:(id)delegate -{ - return [(MPBannerAdManager *)[MPBannerAdManager alloc] initWithDelegate:delegate]; -} - -- (MPBaseBannerAdapter *)buildBannerAdapterForConfiguration:(MPAdConfiguration *)configuration - delegate:(id)delegate -{ - if (configuration.customEventClass) { - return [(MPBannerCustomEventAdapter *)[MPBannerCustomEventAdapter alloc] initWithDelegate:delegate]; - } - - return nil; -} - -- (MPBannerCustomEvent *)buildBannerCustomEventFromCustomClass:(Class)customClass - delegate:(id)delegate -{ - MPBannerCustomEvent *customEvent = [[customClass alloc] init]; - if (![customEvent isKindOfClass:[MPBannerCustomEvent class]]) { - MPLogError(@"**** Custom Event Class: %@ does not extend MPBannerCustomEvent ****", NSStringFromClass(customClass)); - return nil; - } - customEvent.delegate = delegate; - return customEvent; -} - #pragma mark - Interstitials - (MPInterstitialAdManager *)buildMPInterstitialAdManagerWithDelegate:(id)delegate @@ -155,9 +126,13 @@ static MPInstanceProvider *sharedAdProvider = nil; MPLogError(@"**** Custom Event Class: %@ does not extend MPInterstitialCustomEvent ****", NSStringFromClass(customClass)); return nil; } + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wundeclared-selector" if ([customEvent respondsToSelector:@selector(customEventDidUnload)]) { MPLogWarn(@"**** Custom Event Class: %@ implements the deprecated -customEventDidUnload method. This is no longer called. Use -dealloc for cleanup instead ****", NSStringFromClass(customClass)); } +#pragma clang diagnostic pop customEvent.delegate = delegate; return customEvent; } diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MPMediationManager.h b/iphone/Maps/3party/MoPubSDK/Internal/MPMediationManager.h new file mode 100644 index 0000000000..555699a261 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Internal/MPMediationManager.h @@ -0,0 +1,51 @@ +// +// MPMediationManager.h +// MoPubSDK +// +// Copyright © 2018 MoPub. All rights reserved. +// + +#import +#import "MPMediationSdkInitializable.h" + +@interface MPMediationManager : NSObject + +/** + Singleton instance of the manager. + */ ++ (instancetype _Nonnull)sharedManager; + +/** + Initializes the inputted mediated network SDKs from the cache. + @param networks Networks to initialize. If @c nil, nothing will be done. + @param completion Optional completion block. + */ +- (void)initializeMediatedNetworks:(NSArray> * _Nullable)networks + completion:(void (^ _Nullable)(NSError * _Nullable error))completion; + +/** + Sets the initialization parameters for a given network in the cache. + @param params Initialization parameters sent to the @c MPSdkInitializable instance when initialized. + @param networkClass Network class. + */ +- (void)setCachedInitializationParameters:(NSDictionary * _Nullable)params forNetwork:(Class _Nonnull)networkClass; + +/** + Retrieves the cached initialization parameters for a given network. + @param networkClass Network class. + @returns The cached parameters or @c nil. + */ +- (NSDictionary * _Nullable)cachedInitializationParametersForNetwork:(Class _Nonnull)networkClass; + +/** + Retrieves all of the currently cached networks. + @return A list of all cached networks or @c nil. + */ +- (NSArray> * _Nullable)allCachedNetworks; + +/** + Clears the cache. + */ +- (void)clearCache; + +@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MPMediationManager.m b/iphone/Maps/3party/MoPubSDK/Internal/MPMediationManager.m new file mode 100644 index 0000000000..b38f0115ba --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Internal/MPMediationManager.m @@ -0,0 +1,130 @@ +// +// MPMediationManager.m +// MoPubSDK +// +// Copyright © 2018 MoPub. All rights reserved. +// + +#import "MPMediationManager.h" +#import "MPLogging.h" + +/** + Key of the @c NSUserDefaults entry for the network initialization cache. + */ +static NSString * const kNetworkSDKInitializationParametersKey = @"com.mopub.mopub-ios-sdk.network-init-info"; + +@implementation MPMediationManager + +#pragma mark - Initialization + ++ (instancetype)sharedManager { + static MPMediationManager * sharedInstance = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + sharedInstance = [[MPMediationManager alloc] init]; + }); + + return sharedInstance; +} + +#pragma mark - Cache + +- (void)setCachedInitializationParameters:(NSDictionary * _Nullable)params forNetwork:(Class _Nonnull)networkClass { + // Empty network names and parameters are invalid. + NSString * network = NSStringFromClass(networkClass); + if (network.length == 0 || params == nil) { + return; + } + + @synchronized (self) { + NSMutableDictionary * cachedParameters = [[[NSUserDefaults standardUserDefaults] objectForKey:kNetworkSDKInitializationParametersKey] mutableCopy]; + if (cachedParameters == nil) { + cachedParameters = [NSMutableDictionary dictionaryWithCapacity:1]; + } + + cachedParameters[network] = params; + [[NSUserDefaults standardUserDefaults] setObject:cachedParameters forKey:kNetworkSDKInitializationParametersKey]; + [[NSUserDefaults standardUserDefaults] synchronize]; + + MPLogInfo(@"Cached SDK initialization parameters for %@:\n%@", network, params); + } +} + +- (NSDictionary * _Nullable)cachedInitializationParametersForNetwork:(Class)networkClass { + // Empty network names are invalid. + NSString * network = NSStringFromClass(networkClass); + if (network.length == 0) { + return nil; + } + + NSDictionary * cachedParameters = [[NSUserDefaults standardUserDefaults] objectForKey:kNetworkSDKInitializationParametersKey]; + if (cachedParameters == nil) { + return nil; + } + + return [cachedParameters objectForKey:network]; +} + +- (NSArray> * _Nullable)allCachedNetworks { + NSDictionary * cachedParameters = [[NSUserDefaults standardUserDefaults] objectForKey:kNetworkSDKInitializationParametersKey]; + NSArray * cacheKeys = [cachedParameters allKeys]; + if (cacheKeys == nil) { + return nil; + } + + // Convert the strings of class names into class types. + NSMutableArray> * cachedNetworks = [NSMutableArray array]; + [cacheKeys enumerateObjectsUsingBlock:^(NSString * key, NSUInteger idx, BOOL * _Nonnull stop) { + Class c = NSClassFromString(key); + if ([c conformsToProtocol:@protocol(MPMediationSdkInitializable)]) { + [cachedNetworks addObject:c]; + } + }]; + + return cachedNetworks; +} + +- (void)clearCache { + @synchronized (self) { + [[NSUserDefaults standardUserDefaults] removeObjectForKey:kNetworkSDKInitializationParametersKey]; + [[NSUserDefaults standardUserDefaults] synchronize]; + + MPLogInfo(@"Cleared cached SDK initialization parameters"); + } +} + +#pragma mark - Mediation + +- (void)initializeMediatedNetworks:(NSArray> *)networks + completion:(void (^ _Nullable)(NSError * _Nullable error))completion { + // Nothing to initialize + if (networks.count == 0) { + if (completion != nil) { + completion(nil); + } + + return; + } + + // Network SDK initializations should occur on the main thread since + // some of those SDKs require it. + dispatch_async(dispatch_get_main_queue(), ^{ + for (Class mediationClass in networks) { + id mediationNetwork = (id)[[mediationClass class] new]; + NSDictionary * cachedInitializationParams = [self cachedInitializationParametersForNetwork:mediationClass]; + + // Only attempt initialization if they exist. Otherwise, we should wait for the + // on-demand initialization to occur with the correct parameters. + if (cachedInitializationParams != nil) { + [mediationNetwork initializeSdkWithParameters:cachedInitializationParams]; + MPLogInfo(@"Loaded mediated network: %@", NSStringFromClass(mediationClass)); + } + } + + if (completion != nil) { + completion(nil); + } + }); +} + +@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MPURLRequest.h b/iphone/Maps/3party/MoPubSDK/Internal/MPURLRequest.h new file mode 100644 index 0000000000..ef933e3839 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Internal/MPURLRequest.h @@ -0,0 +1,30 @@ +// +// MPURLRequest.h +// MoPubSDK +// +// Copyright © 2018 MoPub. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@interface MPURLRequest : NSMutableURLRequest + +/** + Initializes an URL request with a given URL. + @param URL The URL for the request. + @returns Returns a URL request for a specified URL with @c NSURLRequestReloadIgnoringCacheData + cache policy and @c kRequestTimeoutInterval timeout value. + */ +- (instancetype)initWithURL:(NSURL *)URL; + +/** + Initializes an URL request with a given URL. + @param URL The URL for the request. + @returns Returns a URL request for a specified URL with @c NSURLRequestReloadIgnoringCacheData + cache policy and @c kRequestTimeoutInterval timeout value. + */ ++ (MPURLRequest *)requestWithURL:(NSURL *)URL; + +@end +NS_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MPURLRequest.m b/iphone/Maps/3party/MoPubSDK/Internal/MPURLRequest.m new file mode 100644 index 0000000000..ec8f2285b7 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Internal/MPURLRequest.m @@ -0,0 +1,125 @@ +// +// MPURLRequest.m +// MoPubSDK +// +// Copyright © 2018 MoPub. All rights reserved. +// + +#import "MPURLRequest.h" +#import "MPAPIEndpoints.h" +#import "MPLogging.h" + +// All requests have a 10 second timeout. +const NSTimeInterval kRequestTimeoutInterval = 10.0; + +NS_ASSUME_NONNULL_BEGIN +@interface MPURLRequest() + +@end + +@implementation MPURLRequest + +- (instancetype)initWithURL:(NSURL *)URL { + // Requests sent to MoPub should always be in POST format. All other requests + // should be sent as a normal GET. + BOOL isMoPubRequest = [URL.host isEqualToString:MOPUB_BASE_HOSTNAME]; + NSURL * requestUrl = URL; + if (isMoPubRequest) { + // The incoming URL may contain query parameters; we will need to strip them out. + NSURLComponents * components = [[NSURLComponents alloc] init]; + components.scheme = URL.scheme; + components.host = URL.host; + components.path = URL.path; + requestUrl = components.URL; + } + + if (self = [super initWithURL:requestUrl]) { + // Generate the request + [self setHTTPShouldHandleCookies:NO]; + [self setValue:MPURLRequest.userAgent forHTTPHeaderField:@"User-Agent"]; + [self setCachePolicy:NSURLRequestReloadIgnoringCacheData]; + [self setTimeoutInterval:kRequestTimeoutInterval]; + + // Request is a MoPub specific request and should be sent as POST with a UTF8 JSON payload. + if (isMoPubRequest) { + [self setHTTPMethod:@"POST"]; + [self setValue:@"application/json; charset=utf-8" forHTTPHeaderField:@"Content-Type"]; + + // Generate the JSON body from the query parameters + NSURLComponents * components = [NSURLComponents componentsWithURL:URL resolvingAgainstBaseURL:NO]; + NSDictionary * json = [MPURLRequest jsonFromURLComponents:components]; + + NSError * error = nil; + NSData * jsonData = [NSJSONSerialization dataWithJSONObject:json options:0 error:&error]; + + // Set the request body with the query parameter key/value pairs if there was no + // error in generating a JSON from the dictionary. + if (error == nil) { + [self setValue:[NSString stringWithFormat:@"%lu", (unsigned long)jsonData.length] forHTTPHeaderField:@"Content-Length"]; + [self setHTTPBody:jsonData]; + } + else { + MPLogError(@"Could not generate JSON body for %@", json); + } + } + } + + return self; +} + ++ (MPURLRequest *)requestWithURL:(NSURL *)URL { + return [[MPURLRequest alloc] initWithURL:URL]; +} + +/** + Retrieves the current user agent as determined by @c UIWebView. + @returns The user agent. + */ ++ (NSString *)userAgent { + static NSString * ua = nil; + + if (ua == nil) { + ua = [[[UIWebView alloc] init] stringByEvaluatingJavaScriptFromString:@"navigator.userAgent"]; + } + + return ua; +} + +/** + Generates the POST body as a JSON dictionary. The keys to the dictionary + are the query parameter keys, and the values are the associated values. + In the event that there are multiple keys present, they will be combined into + a comma-seperated list string. + @remark The values will be URL-decoded before being set in the JSON dictionary + @param components URL components to generate the JSON + @returns A JSON dictionary + */ ++ (NSDictionary *)jsonFromURLComponents:(NSURLComponents *)components { + NSMutableDictionary * json = [NSMutableDictionary new]; + + // If there are no components, just give back an empty JSON + if (components == nil) { + return json; + } + + // Iterate over every query parameter and rationalize them into + // the JSON dictionary. + for (NSURLQueryItem * queryItem in components.queryItems) { + NSString * key = queryItem.name; + NSString * decodedValue = [queryItem.value stringByRemovingPercentEncoding]; + decodedValue = decodedValue != nil ? decodedValue : @""; + + if ([json objectForKey:key] != nil) { + json[key] = [@[json[key], decodedValue] componentsJoinedByString:@","]; + } + // Key doesn't exist; add it. + else { + json[key] = decodedValue; + } + } + + return json; +} + +@end +NS_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MPMRAIDBannerCustomEvent.m b/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MPMRAIDBannerCustomEvent.m index da41a97bcf..d00b8b54e7 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MPMRAIDBannerCustomEvent.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MPMRAIDBannerCustomEvent.m @@ -10,6 +10,8 @@ #import "MPAdConfiguration.h" #import "MPInstanceProvider.h" #import "MRController.h" +#import "MPWebView.h" +#import "MPViewabilityTracker.h" @interface MPMRAIDBannerCustomEvent () @@ -85,4 +87,14 @@ [self.delegate bannerCustomEventDidFinishAction:self]; } +- (void)trackMPXAndThirdPartyImpressions +{ + [self.mraidController.mraidWebView stringByEvaluatingJavaScriptFromString:@"webviewDidAppear();"]; +} + +- (void)startViewabilityTracker +{ + [self.mraidController.viewabilityTracker startTracking]; +} + @end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MPMRAIDInterstitialViewController.m b/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MPMRAIDInterstitialViewController.m index be5dee1d14..6aff041ff5 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MPMRAIDInterstitialViewController.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MPMRAIDInterstitialViewController.m @@ -115,6 +115,15 @@ self.interstitialView.frame = self.view.bounds; self.interstitialView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; [self.view addSubview:self.interstitialView]; + if (@available(iOS 9.0, *)) { + self.interstitialView.translatesAutoresizingMaskIntoConstraints = NO; + [NSLayoutConstraint activateConstraints:@[ + [self.interstitialView.topAnchor constraintEqualToAnchor:self.view.topAnchor], + [self.interstitialView.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor], + [self.interstitialView.trailingAnchor constraintEqualToAnchor:self.view.trailingAnchor], + [self.interstitialView.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor], + ]]; + } if ([self.delegate respondsToSelector:@selector(interstitialDidLoadAd:)]) { [self.delegate interstitialDidLoadAd:self]; @@ -152,7 +161,7 @@ { _supportedOrientationMask = supportedOrientationMask; - // This should be called whenever the return value of -shouldAutorotateToInterfaceOrientation changes. Since the return + // This should be called whenever the return value of -supportedInterfaceOrientations changes. Since the return // value is based on _supportedOrientationMask, we do that here. Prevents possible rotation bugs. [UIViewController attemptRotationToDeviceOrientation]; } @@ -181,10 +190,4 @@ return YES; } -// shouldAutorotateToInterfaceOrientation is for ios 5. -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation -{ - return [[UIApplication sharedApplication] mp_doesOrientation:interfaceOrientation matchOrientationMask:self.supportedOrientationMask]; -} - @end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MRBridge.m b/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MRBridge.m index af3153dc53..f78c0a3cc7 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MRBridge.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MRBridge.m @@ -71,57 +71,69 @@ static NSString * const kMraidURLScheme = @"mraid"; - (void)fireReadyEvent { + MPLogDebug(@"mraidbridge.fireReadyEvent()"); [self executeJavascript:@"window.mraidbridge.fireReadyEvent();"]; } - (void)fireChangeEventForProperty:(MRProperty *)property { NSString *JSON = [NSString stringWithFormat:@"{%@}", property]; + + MPLogDebug(@"mraidbridge.fireChangeEvent(%@)", JSON); [self executeJavascript:@"window.mraidbridge.fireChangeEvent(%@);", JSON]; - MPLogTrace(@"JSON: %@", JSON); } - (void)fireChangeEventsForProperties:(NSArray *)properties { NSString *JSON = [NSString stringWithFormat:@"{%@}", [properties componentsJoinedByString:@", "]]; + + MPLogDebug(@"mraidbridge.fireChangeEvent(%@)", JSON); [self executeJavascript:@"window.mraidbridge.fireChangeEvent(%@);", JSON]; - MPLogTrace(@"JSON: %@", JSON); } - (void)fireErrorEventForAction:(NSString *)action withMessage:(NSString *)message { + MPLogDebug(@"mraidbridge.fireErrorEvent('%@', '%@')", message, action); [self executeJavascript:@"window.mraidbridge.fireErrorEvent('%@', '%@');", message, action]; } - (void)fireSizeChangeEvent:(CGSize)size { + MPLogDebug(@"mraidbridge.notifySizeChangeEvent(%.1f, %.1f)", size.width, size.height); [self executeJavascript:@"window.mraidbridge.notifySizeChangeEvent(%.1f, %.1f);", size.width, size.height]; } - (void)fireSetScreenSize:(CGSize)size { + MPLogDebug(@"mraidbridge.setScreenSize(%.1f, %.1f)", size.width, size.height); [self executeJavascript:@"window.mraidbridge.setScreenSize(%.1f, %.1f);", size.width, size.height]; } - (void)fireSetPlacementType:(NSString *)placementType { + MPLogDebug(@"mraidbridge.setPlacementType('%@')", placementType); [self executeJavascript:@"window.mraidbridge.setPlacementType('%@');", placementType]; } - (void)fireSetCurrentPositionWithPositionRect:(CGRect)positionRect { + MPLogDebug(@"mraidbridge.setCurrentPosition(%.1f, %.1f, %.1f, %.1f)", positionRect.origin.x, positionRect.origin.y, + positionRect.size.width, positionRect.size.height); [self executeJavascript:@"window.mraidbridge.setCurrentPosition(%.1f, %.1f, %.1f, %.1f);", positionRect.origin.x, positionRect.origin.y, positionRect.size.width, positionRect.size.height]; } - (void)fireSetDefaultPositionWithPositionRect:(CGRect)positionRect { + MPLogDebug(@"mraidbridge.setDefaultPosition(%.1f, %.1f, %.1f, %.1f)", positionRect.origin.x, positionRect.origin.y, + positionRect.size.width, positionRect.size.height); [self executeJavascript:@"window.mraidbridge.setDefaultPosition(%.1f, %.1f, %.1f, %.1f);", positionRect.origin.x, positionRect.origin.y, positionRect.size.width, positionRect.size.height]; } - (void)fireSetMaxSize:(CGSize)maxSize { + MPLogDebug(@"mraidbridge.setMaxSize(%.1f, %.1f)", maxSize.width, maxSize.height); [self executeJavascript:@"window.mraidbridge.setMaxSize(%.1f, %.1f);", maxSize.width, maxSize.height]; } @@ -220,6 +232,7 @@ static NSString * const kMraidURLScheme = @"mraid"; - (void)fireNativeCommandCompleteEvent:(NSString *)command { + MPLogDebug(@"mraidbridge.nativeCallComplete('%@')", command); [self executeJavascript:@"window.mraidbridge.nativeCallComplete('%@');", command]; } diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MRCommand.h b/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MRCommand.h index f6c7ff4679..e4a54f9422 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MRCommand.h +++ b/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MRCommand.h @@ -12,9 +12,7 @@ @protocol MRCommandDelegate -- (void)mrCommand:(MRCommand *)command createCalendarEventWithParams:(NSDictionary *)params __deprecated; - (void)mrCommand:(MRCommand *)command playVideoWithURL:(NSURL *)url; -- (void)mrCommand:(MRCommand *)command storePictureWithURL:(NSURL *)url __deprecated; - (void)mrCommand:(MRCommand *)command shouldUseCustomClose:(BOOL)useCustomClose; - (void)mrCommand:(MRCommand *)command setOrientationPropertiesWithForceOrientation:(UIInterfaceOrientationMask)forceOrientation; - (void)mrCommand:(MRCommand *)command openURL:(NSURL *)url; @@ -81,18 +79,6 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// -@interface MRCreateCalendarEventCommand : MRCommand - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////// - @interface MRPlayVideoCommand : MRCommand @end - -//////////////////////////////////////////////////////////////////////////////////////////////////// - -@interface MRStorePictureCommand : MRCommand - -@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MRCommand.m b/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MRCommand.m index 3dd0f49649..f1d0e55a6b 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MRCommand.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MRCommand.m @@ -331,29 +331,6 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation MRCreateCalendarEventCommand - -+ (void)load -{ - [MRCommand registerCommand:self]; -} - -+ (NSString *)commandType -{ - return @"createCalendarEvent"; -} - -- (BOOL)executeWithParams:(NSDictionary *)params -{ - [self.delegate mrCommand:self createCalendarEventWithParams:params]; - - return YES; -} - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////// - @implementation MRPlayVideoCommand + (void)load @@ -380,26 +357,3 @@ } @end - -//////////////////////////////////////////////////////////////////////////////////////////////////// - -@implementation MRStorePictureCommand - -+ (void)load -{ - [MRCommand registerCommand:self]; -} - -+ (NSString *)commandType -{ - return @"storePicture"; -} - -- (BOOL)executeWithParams:(NSDictionary *)params -{ - [self.delegate mrCommand:self storePictureWithURL:[self urlFromParameters:params forKey:@"uri"]]; - - return YES; -} - -@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MRController.h b/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MRController.h index 65c7e23221..fed79c69e7 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MRController.h +++ b/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MRController.h @@ -13,6 +13,8 @@ @protocol MRControllerDelegate; @class MPAdConfiguration; @class CLLocation; +@class MPWebView; +@class MPViewabilityTracker; /** * The `MRController` class is used to load and interact with MRAID ads. @@ -22,6 +24,8 @@ */ @interface MRController : NSObject +@property (nonatomic, readonly) MPWebView *mraidWebView; +@property (nonatomic, readonly) MPViewabilityTracker *viewabilityTracker; @property (nonatomic, weak) id delegate; - (instancetype)initWithAdViewFrame:(CGRect)adViewFrame adPlacementType:(MRAdViewPlacementType)placementType; diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MRController.m b/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MRController.m index 24b43d98a7..6b1177e191 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MRController.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MRController.m @@ -24,6 +24,10 @@ #import "UIWebView+MPAdditions.h" #import "MPForceableOrientationProtocol.h" #import "MPAPIEndPoints.h" +#import "MoPub.h" +#import "MPViewabilityTracker.h" +#import "MPHTTPNetworkSession.h" +#import "MPURLRequest.h" static const NSTimeInterval kAdPropertyUpdateTimerInterval = 1.0; static const NSTimeInterval kMRAIDResizeAnimationTimeInterval = 0.3; @@ -43,8 +47,6 @@ static NSString *const kMRAIDCommandResize = @"resize"; @property (nonatomic, assign) MRAdViewPlacementType placementType; @property (nonatomic, strong) MRExpandModalViewController *expandModalViewController; @property (nonatomic, weak) MPMRAIDInterstitialViewController *interstitialViewController; -@property (nonatomic, strong) NSMutableData *twoPartExpandData; -@property (nonatomic, assign) NSStringEncoding responseEncoding; @property (nonatomic, assign) CGRect mraidDefaultAdFrame; @property (nonatomic, assign) CGRect mraidDefaultAdFrameInKeyWindow; @property (nonatomic, assign) CGSize currentAdSize; @@ -73,7 +75,13 @@ static NSString *const kMRAIDCommandResize = @"resize"; @property (nonatomic, assign) UIInterfaceOrientation currentInterfaceOrientation; -@property (nonatomic, copy) void (^forceOrientationAfterAnimationBlock)(); +@property (nonatomic, copy) void (^forceOrientationAfterAnimationBlock)(void); + +@property (nonatomic, readwrite) MPViewabilityTracker *viewabilityTracker; +@property (nonatomic, readwrite) MPWebView *mraidWebView; + +// Networking +@property (nonatomic, strong) NSURLSessionTask *task; @end @@ -107,8 +115,7 @@ static NSString *const kMRAIDCommandResize = @"resize"; _resizeBackgroundView = [[UIView alloc] initWithFrame:adViewFrame]; _resizeBackgroundView.backgroundColor = [UIColor clearColor]; - - _destinationDisplayAgent = [[MPCoreInstanceProvider sharedProvider] buildMPAdDestinationDisplayAgentWithDelegate:self]; + _destinationDisplayAgent = [MPAdDestinationDisplayAgent agentWithDelegate:self]; _adAlertManager = [[MPCoreInstanceProvider sharedProvider] buildMPAdAlertManagerWithDelegate:self]; _adAlertManagerTwoPart = [[MPCoreInstanceProvider sharedProvider] buildMPAdAlertManagerWithDelegate:self]; @@ -119,6 +126,8 @@ static NSString *const kMRAIDCommandResize = @"resize"; - (void)dealloc { + [self.viewabilityTracker stopTracking]; + // Transfer delegation to the expand modal view controller in the event the modal is still being presented so it can dismiss itself. _expansionContentView.delegate = _expandModalViewController; @@ -134,14 +143,15 @@ static NSString *const kMRAIDCommandResize = @"resize"; self.isAdLoading = YES; self.adRequiresPrecaching = configuration.precacheRequired; self.isAdVastVideoPlayer = configuration.isVastVideoPlayer; - self.shouldUseUIWebView = self.isAdVastVideoPlayer || self.adConfiguration.forceUIWebView; + self.shouldUseUIWebView = self.isAdVastVideoPlayer; - MPWebView *webView = [self buildMRAIDWebViewWithFrame:self.mraidDefaultAdFrame - forceUIWebView:self.shouldUseUIWebView]; + self.mraidWebView = [self buildMRAIDWebViewWithFrame:self.mraidDefaultAdFrame + forceUIWebView:self.shouldUseUIWebView]; + self.mraidWebView.shouldConformToSafeArea = [self isInterstitialAd]; - self.mraidBridge = [[MPInstanceProvider sharedProvider] buildMRBridgeWithWebView:webView delegate:self]; + self.mraidBridge = [[MPInstanceProvider sharedProvider] buildMRBridgeWithWebView:self.mraidWebView delegate:self]; self.mraidAdView = [[MPInstanceProvider sharedProvider] buildMRAIDMPClosableViewWithFrame:self.mraidDefaultAdFrame - webView:webView + webView:self.mraidWebView delegate:self]; if (self.placementType == MRAdViewPlacementTypeInterstitial) { self.mraidAdView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; @@ -156,11 +166,14 @@ static NSString *const kMRAIDCommandResize = @"resize"; self.mraidAdView.closeButtonType = MPClosableViewCloseButtonTypeTappableWithImage; } + [self init3rdPartyViewabilityTrackers]; + // This load is guaranteed to never be called for a two-part expand so we know we need to load the HTML into the default web view. NSString *HTML = [configuration adResponseHTMLString]; [self.mraidBridge loadHTMLString:HTML baseURL:[NSURL URLWithString:[MPAPIEndpoints baseURL]] ]; + } - (void)handleMRAIDInterstitialDidPresentWithViewController:(MPMRAIDInterstitialViewController *)viewController @@ -168,6 +181,13 @@ static NSString *const kMRAIDCommandResize = @"resize"; self.interstitialViewController = viewController; [self enableRequestHandling]; [self checkViewability]; + + // If viewability tracking has been deferred (i.e., if this is a non-banner ad), start tracking here now that the + // ad has been presented. If viewability tracking was not deferred, we're already tracking and there's no need to + // call start tracking. + if (![self shouldStartViewabilityDuringInitialization]) { + [self.viewabilityTracker startTracking]; + } } - (void)enableRequestHandling @@ -188,35 +208,27 @@ static NSString *const kMRAIDCommandResize = @"resize"; [self.destinationDisplayAgent cancel]; } -#pragma mark - Loading Two Part Expand (NSURLConnectionDelegate) +#pragma mark - Loading Two Part Expand - (void)loadTwoPartCreativeFromURL:(NSURL *)url { self.isAdLoading = YES; - NSURLConnection *connection = [NSURLConnection connectionWithRequest:[NSURLRequest requestWithURL:url] delegate:self]; - if (connection) { - self.twoPartExpandData = [NSMutableData data]; - } + MPURLRequest * request = [MPURLRequest requestWithURL:url]; + + __weak __typeof__(self) weakSelf = self; + self.task = [MPHTTPNetworkSession startTaskWithHttpRequest:request responseHandler:^(NSData * _Nonnull data, NSHTTPURLResponse * _Nonnull response) { + __typeof__(self) strongSelf = weakSelf; + + NSURL *currentRequestUrl = strongSelf.task.currentRequest.URL; + [strongSelf connectionDidFinishLoadingData:data withResponse:response fromRequestUrl:currentRequestUrl]; + } errorHandler:^(NSError * _Nonnull error) { + __typeof__(self) strongSelf = weakSelf; + [strongSelf didFailWithError:error]; + }]; } -- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response -{ - [self.twoPartExpandData setLength:0]; - - NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response; - - NSDictionary *headers = [httpResponse allHeaderFields]; - NSString *contentType = [headers objectForKey:kMoPubHTTPHeaderContentType]; - self.responseEncoding = [httpResponse stringEncodingFromContentType:contentType]; -} - -- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data -{ - [self.twoPartExpandData appendData:data]; -} - -- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error +- (void)didFailWithError:(NSError *)error { self.isAdLoading = NO; // No matter what, show the close button on the expanded view. @@ -224,14 +236,44 @@ static NSString *const kMRAIDCommandResize = @"resize"; [self.mraidBridge fireErrorEventForAction:kMRAIDCommandExpand withMessage:@"Could not load URL."]; } -- (void)connectionDidFinishLoading:(NSURLConnection *)connection +- (void)connectionDidFinishLoadingData:(NSData *)data withResponse:(NSHTTPURLResponse *)response fromRequestUrl:(NSURL *)requestUrl { - NSString *str = [[NSString alloc] initWithData:self.twoPartExpandData encoding:self.responseEncoding]; - [self.mraidBridgeTwoPart loadHTMLString:str baseURL:connection.currentRequest.URL]; + // Extract the response encoding type. + NSDictionary *headers = [response allHeaderFields]; + NSString *contentType = [headers objectForKey:kMoPubHTTPHeaderContentType]; + NSStringEncoding responseEncoding = [response stringEncodingFromContentType:contentType]; + + NSString *str = [[NSString alloc] initWithData:data encoding:responseEncoding]; + [self.mraidBridgeTwoPart loadHTMLString:str baseURL:requestUrl]; } #pragma mark - Private +- (void)init3rdPartyViewabilityTrackers +{ + self.viewabilityTracker = [[MPViewabilityTracker alloc] + initWithAdView:self.mraidWebView + isVideo:self.isAdVastVideoPlayer + startTrackingImmediately:[self shouldStartViewabilityDuringInitialization]]; + [self.viewabilityTracker registerFriendlyObstructionView:self.mraidAdView.closeButton]; +} + +- (BOOL)shouldStartViewabilityDuringInitialization +{ + // If viewabile impression tracking experiment is enabled, we defer viewability trackers until + // ad view is at least x pixels on screen for y seconds, where x and y are configurable values defined in server. + if (self.adConfiguration.visibleImpressionTrackingEnabled) { + return NO; + } + + return ![self isInterstitialAd]; +} + +- (BOOL)isInterstitialAd +{ + return (self.placementType == MRAdViewPlacementTypeInterstitial); +} + - (void)initAdAlertManager:(id)adAlertManager forAdView:(MPClosableView *)adView { adAlertManager.adConfiguration = [self.delegate adConfiguration]; @@ -438,7 +480,7 @@ static NSString *const kMRAIDCommandResize = @"resize"; [self presentExpandModalViewControllerWithView:view animated:animated completion:nil]; } -- (void)presentExpandModalViewControllerWithView:(MPClosableView *)view animated:(BOOL)animated completion:(void (^)())completionBlock +- (void)presentExpandModalViewControllerWithView:(MPClosableView *)view animated:(BOOL)animated completion:(void (^)(void))completionBlock { [self willBeginAnimatingAdSize]; diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MRExpandModalViewController.m b/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MRExpandModalViewController.m index 1ec84cafc8..f13ccd7ff1 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MRExpandModalViewController.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MRExpandModalViewController.m @@ -92,12 +92,6 @@ return YES; } -// shouldAutorotateToInterfaceOrientation is for ios 5. -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation -{ - return [[UIApplication sharedApplication] mp_doesOrientation:interfaceOrientation matchOrientationMask:self.supportedOrientationMask]; -} - #pragma mark - // We transfer closable view delegation to the expand view controller in the event MRController is deallocated and the expand modal is presented. diff --git a/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MRNativeCommandHandler.m b/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MRNativeCommandHandler.m index 40dbb96950..14f44aa403 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MRNativeCommandHandler.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/MRAID/MRNativeCommandHandler.m @@ -66,21 +66,11 @@ #pragma mark - MRCommandDelegate -- (void)mrCommand:(MRCommand *)command createCalendarEventWithParams:(NSDictionary *)params -{ - // DEPRECATED -} - - (void)mrCommand:(MRCommand *)command playVideoWithURL:(NSURL *)url { [self.videoPlayerManager playVideo:url]; } -- (void)mrCommand:(MRCommand *)command storePictureWithURL:(NSURL *)url -{ - // DEPRECATED -} - - (void)mrCommand:(MRCommand *)command shouldUseCustomClose:(BOOL)useCustomClose { [self.delegate handleMRAIDUseCustomClose:useCustomClose]; diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Utility/Categories/NSString+MPAdditions.h b/iphone/Maps/3party/MoPubSDK/Internal/Utility/Categories/NSString+MPAdditions.h new file mode 100644 index 0000000000..f89ab1e897 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Internal/Utility/Categories/NSString+MPAdditions.h @@ -0,0 +1,23 @@ +// +// NSString+MPAdditions.h +// MoPubSDK +// +// Copyright © 2017 MoPub. All rights reserved. +// + +#import + +@interface NSString (MPAdditions) + +/* + * Returns string with reserved/unsafe characters encoded. + */ +- (NSString *)mp_URLEncodedString; + +/** + * Attempts to convert the string into an integer value. + * @return A valid integer or `nil` if the string is not valid. + */ +- (NSNumber *)safeIntegerValue; + +@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Utility/Categories/NSString+MPAdditions.m b/iphone/Maps/3party/MoPubSDK/Internal/Utility/Categories/NSString+MPAdditions.m new file mode 100644 index 0000000000..2aaa25f7a5 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Internal/Utility/Categories/NSString+MPAdditions.m @@ -0,0 +1,32 @@ +// +// NSString+MPAdditions.m +// MoPubSDK +// +// Copyright © 2017 MoPub. All rights reserved. +// + +#import "NSString+MPAdditions.h" + +@implementation NSString (MPAdditions) + +- (NSString *)mp_URLEncodedString { + NSString *result = (NSString *)CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(NULL, + (CFStringRef)self, + NULL, + (CFStringRef)@"!*'();:@&=+$,/?%#[]<>", + kCFStringEncodingUTF8)); + return result; +} + +- (NSNumber *)safeIntegerValue { + // Reusable number formatter since reallocating this is expensive. + static NSNumberFormatter * formatter = nil; + if (formatter == nil) { + formatter = [[NSNumberFormatter alloc] init]; + formatter.numberStyle = NSNumberFormatterNoStyle; + } + + return [formatter numberFromString:self]; +} + +@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Utility/Categories/NSString+MPConsentStatus.h b/iphone/Maps/3party/MoPubSDK/Internal/Utility/Categories/NSString+MPConsentStatus.h new file mode 100644 index 0000000000..9a59433796 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Internal/Utility/Categories/NSString+MPConsentStatus.h @@ -0,0 +1,25 @@ +// +// NSString+MPConsentStatus.h +// MoPubSDK +// +// Copyright © 2018 MoPub. All rights reserved. +// + +#import +#import "MPConsentStatus.h" + +@interface NSString (MPConsentStatus) +/** + Converts the string into a @c MPConsentStatus value. If the conversion fails, + @c MPConsentStatusUnknown will be returned. + */ +- (MPConsentStatus)consentStatusValue; + +/** + Converts a @c MPConsentStatus value into a string. + @param status Consent status to convert. + @returns A valid string or @c nil. + */ ++ (NSString * _Nullable)stringFromConsentStatus:(MPConsentStatus)status; + +@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Utility/Categories/NSString+MPConsentStatus.m b/iphone/Maps/3party/MoPubSDK/Internal/Utility/Categories/NSString+MPConsentStatus.m new file mode 100644 index 0000000000..a4c46689f7 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Internal/Utility/Categories/NSString+MPConsentStatus.m @@ -0,0 +1,44 @@ +// +// NSString+MPConsentStatus.m +// MoPubSDK +// +// Copyright © 2018 MoPub. All rights reserved. +// + +#import "NSString+MPConsentStatus.h" + +// The consent value strings that are given back by the server. +static NSString * const kConsentStatusDoNotTrack = @"dnt"; +static NSString * const kConsentStatusExplicitNo = @"explicit_no"; +static NSString * const kConsentStatusExplicitYes = @"explicit_yes"; +static NSString * const kConsentStatusPotentialWhitelist = @"potential_whitelist"; +static NSString * const kConsentStatusUnknown = @"unknown"; + +@implementation NSString (MPConsentStatus) + +- (MPConsentStatus)consentStatusValue { + static NSDictionary * stringToEnumTable = nil; + if (stringToEnumTable == nil) { + stringToEnumTable = @{ kConsentStatusDoNotTrack: @(MPConsentStatusDoNotTrack), + kConsentStatusExplicitNo: @(MPConsentStatusDenied), + kConsentStatusExplicitYes: @(MPConsentStatusConsented), + kConsentStatusPotentialWhitelist: @(MPConsentStatusPotentialWhitelist), + kConsentStatusUnknown: @(MPConsentStatusUnknown) + }; + } + + return (MPConsentStatus)[stringToEnumTable[self] integerValue]; +} + ++ (NSString * _Nullable)stringFromConsentStatus:(MPConsentStatus)status { + switch (status) { + case MPConsentStatusDoNotTrack: return kConsentStatusDoNotTrack; + case MPConsentStatusDenied: return kConsentStatusExplicitNo; + case MPConsentStatusConsented: return kConsentStatusExplicitYes; + case MPConsentStatusPotentialWhitelist: return kConsentStatusPotentialWhitelist; + case MPConsentStatusUnknown: return kConsentStatusUnknown; + default: return nil; + } +} + +@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Utility/Categories/UIWebView+MPAdditions.m b/iphone/Maps/3party/MoPubSDK/Internal/Utility/Categories/UIWebView+MPAdditions.m index 0a1157327a..26cf930431 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Utility/Categories/UIWebView+MPAdditions.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/Utility/Categories/UIWebView+MPAdditions.m @@ -16,15 +16,13 @@ NSString *const kJavaScriptDisableDialogSnippet = @"window.alert = function() { * Find all subviews that are UIScrollViews or subclasses and set their scrolling and bounce. */ - (void)mp_setScrollable:(BOOL)scrollable { - #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 50000 // iOS 5.0+ - if ([self respondsToSelector:@selector(scrollView)]) + if ([self respondsToSelector:@selector(scrollView)]) { UIScrollView *scrollView = self.scrollView; scrollView.scrollEnabled = scrollable; scrollView.bounces = scrollable; - } - else - #endif + } + else { UIScrollView *scrollView = nil; for (UIView *v in self.subviews) diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Utility/MOPUBExperimentProvider.h b/iphone/Maps/3party/MoPubSDK/Internal/Utility/MOPUBExperimentProvider.h new file mode 100644 index 0000000000..6f2dbb82f3 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Internal/Utility/MOPUBExperimentProvider.h @@ -0,0 +1,16 @@ +// +// MOPUBExperimentProvider.h +// MoPub +// +// Copyright © 2017 MoPub. All rights reserved. +// + +#import "MPAdDestinationDisplayAgent.h" + +@interface MOPUBExperimentProvider : NSObject + ++ (void)setDisplayAgentType:(MOPUBDisplayAgentType)displayAgentType; ++ (void)setDisplayAgentFromAdServer:(MOPUBDisplayAgentType)displayAgentType; ++ (MOPUBDisplayAgentType)displayAgentType; + +@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Utility/MOPUBExperimentProvider.m b/iphone/Maps/3party/MoPubSDK/Internal/Utility/MOPUBExperimentProvider.m new file mode 100644 index 0000000000..4d05b4013c --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Internal/Utility/MOPUBExperimentProvider.m @@ -0,0 +1,39 @@ +// +// MOPUBExperimentProvider.m +// MoPubSampleApp +// +// Copyright © 2017 MoPub. All rights reserved. +// + +#import "MOPUBExperimentProvider.h" + +@implementation MOPUBExperimentProvider + +static BOOL gIsDisplayAgentOverriddenByClient = NO; +static MOPUBDisplayAgentType gDisplayAgentType = MOPUBDisplayAgentTypeInApp; + ++ (void)setDisplayAgentType:(MOPUBDisplayAgentType)displayAgentType +{ + gIsDisplayAgentOverriddenByClient = YES; + gDisplayAgentType = displayAgentType; +} + ++ (void)setDisplayAgentFromAdServer:(MOPUBDisplayAgentType)displayAgentType +{ + if (!gIsDisplayAgentOverriddenByClient) { + gDisplayAgentType = displayAgentType; + } +} + ++ (MOPUBDisplayAgentType)displayAgentType +{ + return gDisplayAgentType; +} + +// used in test only ++ (void)setDisplayAgentOverriddenByClientFlag:(BOOL)flag +{ + gIsDisplayAgentOverriddenByClient = flag; +} + +@end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPAnalyticsTracker.m b/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPAnalyticsTracker.m index adf0b69537..cf3e7beff2 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPAnalyticsTracker.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPAnalyticsTracker.m @@ -8,13 +8,9 @@ #import "MPAnalyticsTracker.h" #import "MPAdConfiguration.h" #import "MPCoreInstanceProvider.h" +#import "MPHTTPNetworkSession.h" #import "MPLogging.h" - -@interface MPAnalyticsTracker () - -- (NSURLRequest *)requestForURL:(NSURL *)URL; - -@end +#import "MPURLRequest.h" @implementation MPAnalyticsTracker @@ -26,30 +22,23 @@ - (void)trackImpressionForConfiguration:(MPAdConfiguration *)configuration { MPLogDebug(@"Tracking impression: %@", configuration.impressionTrackingURL); - [NSURLConnection connectionWithRequest:[self requestForURL:configuration.impressionTrackingURL] - delegate:nil]; + MPURLRequest * request = [[MPURLRequest alloc] initWithURL:configuration.impressionTrackingURL]; + [MPHTTPNetworkSession startTaskWithHttpRequest:request]; } - (void)trackClickForConfiguration:(MPAdConfiguration *)configuration { MPLogDebug(@"Tracking click: %@", configuration.clickTrackingURL); - [NSURLConnection connectionWithRequest:[self requestForURL:configuration.clickTrackingURL] - delegate:nil]; + MPURLRequest * request = [[MPURLRequest alloc] initWithURL:configuration.clickTrackingURL]; + [MPHTTPNetworkSession startTaskWithHttpRequest:request]; } - (void)sendTrackingRequestForURLs:(NSArray *)URLs { for (NSURL *URL in URLs) { - NSURLRequest *trackingRequest = [self requestForURL:URL]; - [NSURLConnection connectionWithRequest:trackingRequest delegate:nil]; + MPURLRequest * trackingRequest = [[MPURLRequest alloc] initWithURL:URL]; + [MPHTTPNetworkSession startTaskWithHttpRequest:trackingRequest]; } } -- (NSURLRequest *)requestForURL:(NSURL *)URL -{ - NSMutableURLRequest *request = [[MPCoreInstanceProvider sharedProvider] buildConfiguredURLRequestWithURL:URL]; - request.cachePolicy = NSURLRequestReloadIgnoringCacheData; - return request; -} - @end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPError.h b/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPError.h index 1c72ddb814..acf4cdcb78 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPError.h +++ b/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPError.h @@ -17,7 +17,10 @@ typedef enum { MOPUBErrorServerError = 8, MOPUBErrorAdapterNotFound = 16, MOPUBErrorAdapterInvalid = 17, - MOPUBErrorAdapterHasNoInventory = 18 + MOPUBErrorAdapterHasNoInventory = 18, + MOPUBErrorUnableToParseJSONAdResponse, + MOPUBErrorUnexpectedNetworkResponse, + MOPUBErrorNoNetworkData, } MOPUBErrorCode; @interface MOPUBError : NSError diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPGeolocationProvider.m b/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPGeolocationProvider.m index 753735f829..82c5a8c9ed 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPGeolocationProvider.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPGeolocationProvider.m @@ -11,6 +11,8 @@ #import "MPIdentityProvider.h" #import "MPLogging.h" #import "MPTimer.h" +#import "MPConsentManager.h" +#import "MPConsentChangedNotification.h" //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -35,6 +37,8 @@ const NSTimeInterval kMPLocationUpdateInterval = 10.0 * 60.0; @property (nonatomic) NSDate *timeOfLastLocationUpdate; @property (nonatomic) MPTimer *nextLocationUpdateTimer; @property (nonatomic) MPTimer *locationUpdateDurationTimer; +// Raw locationUpdatesEnabled value set by publisher +@property (nonatomic) BOOL rawLocationUpdatesEnabled; @end @@ -56,7 +60,7 @@ const NSTimeInterval kMPLocationUpdateInterval = 10.0 * 60.0; { self = [super init]; if (self) { - _locationUpdatesEnabled = YES; + _rawLocationUpdatesEnabled = YES; _locationManager = [[MPCoreInstanceProvider sharedProvider] buildCLLocationManager]; _locationManager.delegate = self; @@ -77,12 +81,17 @@ const NSTimeInterval kMPLocationUpdateInterval = 10.0 * 60.0; // Re-activate location updates when the application comes back to the foreground. [[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationWillEnterForegroundNotification object:[UIApplication sharedApplication] queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *note) { - if (_locationUpdatesEnabled) { + if (self.locationUpdatesEnabled) { [self resumeLocationUpdatesAfterBackgrounding]; } }]; - [self startRecurringLocationUpdates]; + if ([MPConsentManager sharedManager].canCollectPersonalInfo) { + [self startRecurringLocationUpdates]; + } + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(consentStateChanged:) name:kMPConsentChangedNotification object:nil]; + } return self; } @@ -104,11 +113,20 @@ const NSTimeInterval kMPLocationUpdateInterval = 10.0 * 60.0; return _lastKnownLocation; } +- (BOOL)locationUpdatesEnabled +{ + return self.rawLocationUpdatesEnabled && [MPConsentManager sharedManager].canCollectPersonalInfo; +} + - (void)setLocationUpdatesEnabled:(BOOL)enabled { - _locationUpdatesEnabled = enabled; + self.rawLocationUpdatesEnabled = enabled; + [self startOrStopLocationUpdates]; +} - if (!_locationUpdatesEnabled) { +- (void)startOrStopLocationUpdates +{ + if (!self.locationUpdatesEnabled) { [self stopAllCurrentOrScheduledLocationUpdates]; self.lastKnownLocation = nil; } else if (![self.locationUpdateDurationTimer isValid] && ![self.nextLocationUpdateTimer isValid]) { @@ -132,11 +150,7 @@ const NSTimeInterval kMPLocationUpdateInterval = 10.0 * 60.0; - (BOOL)isAuthorizedStatus:(CLAuthorizationStatus)status { -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 return (status == kCLAuthorizationStatusAuthorizedAlways) || (status == kCLAuthorizationStatusAuthorizedWhenInUse); -#else - return status == kCLAuthorizationStatusAuthorized; -#endif } /** @@ -157,7 +171,7 @@ const NSTimeInterval kMPLocationUpdateInterval = 10.0 * 60.0; return; } - if (!_locationUpdatesEnabled) { + if (!self.locationUpdatesEnabled) { MPLogDebug(@"Will not start location updates because they have been disabled."); return; } @@ -252,10 +266,8 @@ const NSTimeInterval kMPLocationUpdateInterval = 10.0 * 60.0; case kCLAuthorizationStatusRestricted: self.authorizedForLocationServices = NO; break; - case kCLAuthorizationStatusAuthorized: // same as kCLAuthorizationStatusAuthorizedAlways -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 + case kCLAuthorizationStatusAuthorizedAlways: case kCLAuthorizationStatusAuthorizedWhenInUse: -#endif self.authorizedForLocationServices = YES; break; default: @@ -294,4 +306,9 @@ const NSTimeInterval kMPLocationUpdateInterval = 10.0 * 60.0; } } +- (void)consentStateChanged:(NSNotification *)notification +{ + [self startOrStopLocationUpdates]; +} + @end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPGlobal.h b/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPGlobal.h index 168d389ceb..f7e1a11461 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPGlobal.h +++ b/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPGlobal.h @@ -50,31 +50,17 @@ NSArray *MPConvertStringArrayToURLArray(NSArray *strArray); //////////////////////////////////////////////////////////////////////////////////////////////////// -enum { +typedef NS_ENUM(NSUInteger, MPInterstitialCloseButtonStyle) { MPInterstitialCloseButtonStyleAlwaysVisible, MPInterstitialCloseButtonStyleAlwaysHidden, - MPInterstitialCloseButtonStyleAdControlled + MPInterstitialCloseButtonStyleAdControlled, }; -typedef NSUInteger MPInterstitialCloseButtonStyle; -enum { +typedef NS_ENUM(NSUInteger, MPInterstitialOrientationType) { MPInterstitialOrientationTypePortrait, MPInterstitialOrientationTypeLandscape, - MPInterstitialOrientationTypeAll + MPInterstitialOrientationTypeAll, }; -typedef NSUInteger MPInterstitialOrientationType; - - -//////////////////////////////////////////////////////////////////////////////////////////////////// - -@interface NSString (MPAdditions) - -/* - * Returns string with reserved/unsafe characters encoded. - */ -- (NSString *)mp_URLEncodedString; - -@end //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPGlobal.m b/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPGlobal.m index 1c8632746c..e1c1617573 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPGlobal.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPGlobal.m @@ -224,22 +224,6 @@ NSArray *MPConvertStringArrayToURLArray(NSArray *strArray) //////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation NSString (MPAdditions) - -- (NSString *)mp_URLEncodedString -{ - NSString *result = (NSString *)CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(NULL, - (CFStringRef)self, - NULL, - (CFStringRef)@"!*'();:@&=+$,/?%#[]<>", - kCFStringEncodingUTF8)); - return result; -} - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////// - @implementation UIDevice (MPAdditions) - (NSString *)mp_hardwareDeviceName diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPIdentityProvider.h b/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPIdentityProvider.h index 835ee0cfb4..f732b1aa9a 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPIdentityProvider.h +++ b/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPIdentityProvider.h @@ -9,8 +9,21 @@ @interface MPIdentityProvider : NSObject +/** + * Return IDFA if it's available. If IDFA is not available or contains only 0s, return MoPub rotation ID that changes every 24 hours. + */ + (NSString *)identifier; + +/** + * Return IDFA if it's available. If IDFA is not available or contains only 0s, return nil. + */ ++ (NSString *)identifierFromASIdentifierManager:(BOOL)obfuscate; + +/** +* Return MoPub UUID +*/ + (NSString *)obfuscatedIdentifier; + + (BOOL)advertisingTrackingEnabled; /** diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPIdentityProvider.m b/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPIdentityProvider.m index 15877d2b3b..02b6b8ae79 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPIdentityProvider.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPIdentityProvider.m @@ -7,6 +7,7 @@ #import "MPIdentityProvider.h" #import "MPGlobal.h" +#import "MPConsentManager.h" #import #define MOPUB_IDENTIFIER_DEFAULTS_KEY @"com.mopub.identifier" @@ -18,7 +19,6 @@ static BOOL gFrequencyCappingIdUsageEnabled = YES; @interface MPIdentityProvider () -+ (NSString *)identifierFromASIdentifierManager:(BOOL)obfuscate; + (NSString *)mopubIdentifier:(BOOL)obfuscate; @end @@ -37,7 +37,7 @@ static BOOL gFrequencyCappingIdUsageEnabled = YES; + (NSString *)_identifier:(BOOL)obfuscate { - if (![self isAdvertisingIdAllZero]) { + if (MPIdentityProvider.advertisingTrackingEnabled && [MPConsentManager sharedManager].canCollectPersonalInfo) { return [self identifierFromASIdentifierManager:obfuscate]; } else { return [self mopubIdentifier:obfuscate]; @@ -54,9 +54,11 @@ static BOOL gFrequencyCappingIdUsageEnabled = YES; if (obfuscate) { return @"ifa:XXXX"; } + if (!MPIdentityProvider.advertisingTrackingEnabled) { + return nil; + } NSString *identifier = [[ASIdentifierManager sharedManager].advertisingIdentifier UUIDString]; - return [NSString stringWithFormat:@"ifa:%@", [identifier uppercaseString]]; } @@ -107,19 +109,4 @@ static BOOL gFrequencyCappingIdUsageEnabled = YES; return gFrequencyCappingIdUsageEnabled; } - - -// Beginning in iOS 10, when a user enables "Limit Ad Tracking", the OS will send advertising identifier with value of -// 00000000-0000-0000-0000-000000000000 - -+ (BOOL)isAdvertisingIdAllZero { - NSString *identifier = [[ASIdentifierManager sharedManager].advertisingIdentifier UUIDString]; - if (!identifier) { - // when identifier is nil, ifa:(null) is sent. - return false; - } else { - return [identifier isEqualToString:MOPUB_ALL_ZERO_UUID]; - } -} - @end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPLogging.h b/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPLogging.h index 02b3069c46..6f897044e7 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPLogging.h +++ b/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPLogging.h @@ -7,23 +7,11 @@ #import #import "MPConstants.h" +#import "MPLogLevel.h" extern NSString * const kMPClearErrorLogFormatWithAdUnitID; extern NSString * const kMPWarmingUpErrorLogFormatWithAdUnitID; -// Lower = finer-grained logs. -typedef enum -{ - MPLogLevelAll = 0, - MPLogLevelTrace = 10, - MPLogLevelDebug = 20, - MPLogLevelInfo = 30, - MPLogLevelWarn = 40, - MPLogLevelError = 50, - MPLogLevelFatal = 60, - MPLogLevelOff = 70 -} MPLogLevel; - MPLogLevel MPLogGetLevel(void); void MPLogSetLevel(MPLogLevel level); void _MPLogTrace(NSString *format, ...); diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPSessionTracker.m b/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPSessionTracker.m index d9ed3e707f..c5781c4aea 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPSessionTracker.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPSessionTracker.m @@ -11,6 +11,9 @@ #import "MPGlobal.h" #import "MPCoreInstanceProvider.h" #import "MPAPIEndpoints.h" +#import "MPHTTPNetworkSession.h" +#import "MPURLRequest.h" +#import "MPAdServerURLBuilder.h" @implementation MPSessionTracker @@ -31,21 +34,8 @@ + (void)trackEvent { - [NSURLConnection connectionWithRequest:[[MPCoreInstanceProvider sharedProvider] buildConfiguredURLRequestWithURL:[self URL]] - delegate:nil]; -} - -+ (NSURL *)URL -{ - NSString *path = [NSString stringWithFormat:@"%@?v=%@&udid=%@&id=%@&av=%@&st=1", - [MPAPIEndpoints baseURLStringWithPath:MOPUB_API_PATH_SESSION testing:NO], - MP_SERVER_VERSION, - [MPIdentityProvider identifier], - [[[NSBundle mainBundle] bundleIdentifier] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding], - [[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] - ]; - - return [NSURL URLWithString:path]; + MPURLRequest * request = [[MPURLRequest alloc] initWithURL:[MPAdServerURLBuilder sessionTrackingURL]]; + [MPHTTPNetworkSession startTaskWithHttpRequest:request responseHandler:nil errorHandler:nil]; } @end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPStoreKitProvider.h b/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPStoreKitProvider.h index 716120d388..35821561c2 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPStoreKitProvider.h +++ b/iphone/Maps/3party/MoPubSDK/Internal/Utility/MPStoreKitProvider.h @@ -7,24 +7,16 @@ #import #import "MPGlobal.h" -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= MP_IOS_6_0 #import -#endif @class SKStoreProductViewController; @interface MPStoreKitProvider : NSObject + (BOOL)deviceHasStoreKit; -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= MP_IOS_6_0 + (SKStoreProductViewController *)buildController; -#endif @end -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= MP_IOS_6_0 @protocol MPSKStoreProductViewControllerDelegate -#else -@protocol MPSKStoreProductViewControllerDelegate -#endif @end diff --git a/iphone/Maps/3party/MoPubSDK/Internal/VAST/MPVASTMacroProcessor.m b/iphone/Maps/3party/MoPubSDK/Internal/VAST/MPVASTMacroProcessor.m index 40e7589759..2faaa80c32 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/VAST/MPVASTMacroProcessor.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/VAST/MPVASTMacroProcessor.m @@ -8,6 +8,7 @@ #import "MPVASTMacroProcessor.h" #import "MPGlobal.h" #import "MPVASTStringUtilities.h" +#import "NSString+MPAdditions.h" @implementation MPVASTMacroProcessor diff --git a/iphone/Maps/3party/MoPubSDK/Internal/VAST/MPVASTManager.m b/iphone/Maps/3party/MoPubSDK/Internal/VAST/MPVASTManager.m index 765f4dadb8..6701ea0d6f 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/VAST/MPVASTManager.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/VAST/MPVASTManager.m @@ -9,6 +9,8 @@ #import "MPVASTAd.h" #import "MPVASTWrapper.h" #import "MPXMLParser.h" +#import "MPHTTPNetworkSession.h" +#import "MPURLRequest.h" @interface MPVASTWrapper (MPVASTManager) @@ -25,11 +27,13 @@ static NSString * const kMPVASTManagerErrorDomain = @"com.mopub.MPVASTManager"; + (void)fetchVASTWithURL:(NSURL *)URL completion:(void (^)(MPVASTResponse *, NSError *))completion { - [NSURLConnection sendAsynchronousRequest:[NSURLRequest requestWithURL:URL] - queue:[NSOperationQueue mainQueue] - completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) { - [self fetchVASTWithData:data completion:completion]; - }]; + [MPHTTPNetworkSession startTaskWithHttpRequest:[MPURLRequest requestWithURL:URL] responseHandler:^(NSData * _Nonnull data, NSHTTPURLResponse * _Nonnull response) { + [MPVASTManager fetchVASTWithData:data completion:completion]; + } errorHandler:^(NSError * _Nonnull error) { + if (completion != nil) { + completion(nil, error); + } + }]; } + (void)fetchVASTWithData:(NSData *)data completion:(void (^)(MPVASTResponse *, NSError *))completion @@ -74,40 +78,40 @@ static NSString * const kMPVASTManagerErrorDomain = @"com.mopub.MPVASTManager"; } } + __weak __typeof__(self) weakSelf = self; __block NSInteger wrappersFetched = 0; for (MPVASTWrapper *wrapper in wrappers) { - [NSURLConnection sendAsynchronousRequest:[NSURLRequest requestWithURL:wrapper.VASTAdTagURI] - queue:[NSOperationQueue mainQueue] - completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) { - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - if (connectionError) { - wrapper.wrappedVASTResponse = nil; - } else if (data) { - [self parseVASTResponseFromData:data depth:depth + 1 completion:^(MPVASTResponse *response, NSError *error) { - if (error) { - completion(nil, error); - return; - } + [MPHTTPNetworkSession startTaskWithHttpRequest:[MPURLRequest requestWithURL:wrapper.VASTAdTagURI] responseHandler:^(NSData * _Nonnull data, NSHTTPURLResponse * _Nonnull response) { + // Dispatch the VAST XML parsing. + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + __typeof__(self) strongSelf = weakSelf; + [strongSelf parseVASTResponseFromData:data depth:depth + 1 completion:^(MPVASTResponse *response, NSError *error) { + if (error) { + completion(nil, error); + return; + } - wrapper.wrappedVASTResponse = response; - wrappersFetched++; + wrapper.wrappedVASTResponse = response; + wrappersFetched++; - // Once we've fetched all wrappers within the VAST - // response, we can call the top-level completion - // handler. - if (wrappersFetched == [wrappers count]) { - if ([self VASTResponseContainsAtLeastOneAd:VASTResponse]) { - completion(VASTResponse, nil); - return; - } else { - completion(nil, [NSError errorWithDomain:kMPVASTManagerErrorDomain code:MPVASTErrorNoAdsFound userInfo:nil]); - return; - } - } - }]; - } - }); - }]; + // Once we've fetched all wrappers within the VAST + // response, we can call the top-level completion + // handler. + if (wrappersFetched == [wrappers count]) { + if ([self VASTResponseContainsAtLeastOneAd:VASTResponse]) { + completion(VASTResponse, nil); + return; + } else { + completion(nil, [NSError errorWithDomain:kMPVASTManagerErrorDomain code:MPVASTErrorNoAdsFound userInfo:nil]); + return; + } + } + }]; + + }); + } errorHandler:^(NSError * _Nonnull error) { + wrapper.wrappedVASTResponse = nil; + }]; } } diff --git a/iphone/Maps/3party/MoPubSDK/Internal/VAST/MPVASTModel.h b/iphone/Maps/3party/MoPubSDK/Internal/VAST/MPVASTModel.h index bbee686b22..d7147d4653 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/VAST/MPVASTModel.h +++ b/iphone/Maps/3party/MoPubSDK/Internal/VAST/MPVASTModel.h @@ -17,9 +17,9 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// id MPParseArrayOf(id internalMapper); -id MPParseURLFromString(); +id MPParseURLFromString(void); id MPParseNumberFromString(NSNumberFormatterStyle numberStyle); -id MPParseTimeIntervalFromDurationString(); +id MPParseTimeIntervalFromDurationString(void); id MPParseClass(Class destinationClass); //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/iphone/Maps/3party/MoPubSDK/Internal/VAST/MPVASTTrackingEvent.m b/iphone/Maps/3party/MoPubSDK/Internal/VAST/MPVASTTrackingEvent.m index a89a122291..e3abdaddd5 100644 --- a/iphone/Maps/3party/MoPubSDK/Internal/VAST/MPVASTTrackingEvent.m +++ b/iphone/Maps/3party/MoPubSDK/Internal/VAST/MPVASTTrackingEvent.m @@ -35,10 +35,16 @@ NSString * const MPVASTTrackingEventTypeProgress = @"progress"; self = [super initWithDictionary:dictionary]; if (self) { _eventType = dictionary[@"event"]; + _URL = [self generateModelFromDictionaryValue:dictionary modelProvider:^id(NSDictionary *dictionary) { return [NSURL URLWithString:[dictionary[@"text"] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]]; }]; + // a tracker that does not specify a URL is not valid + if (_URL == nil) { + return nil; + } + _progressOffset = [self generateModelFromDictionaryValue:dictionary modelProvider:^id(NSDictionary *dictionary) { return [[MPVASTDurationOffset alloc] initWithDictionary:dictionary]; diff --git a/iphone/Maps/3party/MoPubSDK/MOPUBDisplayAgentType.h b/iphone/Maps/3party/MoPubSDK/MOPUBDisplayAgentType.h new file mode 100644 index 0000000000..231107899e --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/MOPUBDisplayAgentType.h @@ -0,0 +1,12 @@ +// +// MOPUBDisplayAgentType.h +// MoPubSDK +// +// Copyright © 2018 MoPub. All rights reserved. +// + +typedef NS_ENUM(NSInteger, MOPUBDisplayAgentType) { + MOPUBDisplayAgentTypeInApp = 0, + MOPUBDisplayAgentTypeNativeSafari, + MOPUBDisplayAgentTypeSafariViewController +}; diff --git a/iphone/Maps/3party/MoPubSDK/MPAdConversionTracker.h b/iphone/Maps/3party/MoPubSDK/MPAdConversionTracker.h index 3672d70a49..acef5bcf28 100644 --- a/iphone/Maps/3party/MoPubSDK/MPAdConversionTracker.h +++ b/iphone/Maps/3party/MoPubSDK/MPAdConversionTracker.h @@ -8,6 +8,9 @@ #import +#define MOPUB_CONVERSION_DEFAULTS_KEY @"com.mopub.conversion" +#define MOPUB_CONVERSION_APP_ID_KEY @"com.mopub.conversion.appId" + /** * The `MPAdConversionTracker` class provides a mechanism for reporting application download * (conversion) events to MoPub. This type of tracking is important for measuring the effectiveness @@ -22,7 +25,7 @@ * events. */ -@interface MPAdConversionTracker : NSObject +@interface MPAdConversionTracker : NSObject /** @name Recording Conversions */ diff --git a/iphone/Maps/3party/MoPubSDK/MPAdConversionTracker.m b/iphone/Maps/3party/MoPubSDK/MPAdConversionTracker.m index 2f4b85b501..5554d9be56 100644 --- a/iphone/Maps/3party/MoPubSDK/MPAdConversionTracker.m +++ b/iphone/Maps/3party/MoPubSDK/MPAdConversionTracker.m @@ -13,23 +13,17 @@ #import "MPIdentityProvider.h" #import "MPCoreInstanceProvider.h" #import "MPAPIEndpoints.h" - -#define MOPUB_CONVERSION_DEFAULTS_KEY @"com.mopub.conversion" +#import "MPHTTPNetworkSession.h" +#import "MPURLRequest.h" +#import "MPConsentManager.h" +#import "MPAdServerURLBuilder.h" @interface MPAdConversionTracker () - -@property (nonatomic, strong) NSMutableData *responseData; -@property (nonatomic, assign) NSInteger statusCode; - -- (NSURL *)URLForAppID:(NSString *)appID; - +@property (nonatomic, strong) NSURLSessionTask * task; @end @implementation MPAdConversionTracker -@synthesize responseData = _responseData; -@synthesize statusCode = _statusCode; - + (MPAdConversionTracker *)sharedConversionTracker { static MPAdConversionTracker *sharedConversionTracker; @@ -45,52 +39,26 @@ - (void)reportApplicationOpenForApplicationID:(NSString *)appID { + // Store app ID in case retry is needed. + [[NSUserDefaults standardUserDefaults] setObject:appID forKey:MOPUB_CONVERSION_APP_ID_KEY]; + [[NSUserDefaults standardUserDefaults] synchronize]; + + // Do not send app conversion request if collecting personal information is not allowed. + if (![MPConsentManager sharedManager].canCollectPersonalInfo) { + return; + } + if (![[NSUserDefaults standardUserDefaults] boolForKey:MOPUB_CONVERSION_DEFAULTS_KEY]) { MPLogInfo(@"Tracking conversion"); - NSMutableURLRequest *request = [[MPCoreInstanceProvider sharedProvider] buildConfiguredURLRequestWithURL:[self URLForAppID:appID]]; - self.responseData = [NSMutableData data]; - [NSURLConnection connectionWithRequest:request delegate:self]; + MPURLRequest * request = [[MPURLRequest alloc] initWithURL:[MPAdServerURLBuilder conversionTrackingURLForAppID:appID]]; + self.task = [MPHTTPNetworkSession startTaskWithHttpRequest:request responseHandler:^(NSData * data, NSHTTPURLResponse * response) { + if (response.statusCode == 200 && data.length > 0) { + [[NSUserDefaults standardUserDefaults] removeObjectForKey:MOPUB_CONVERSION_APP_ID_KEY]; + [[NSUserDefaults standardUserDefaults] setBool:YES forKey:MOPUB_CONVERSION_DEFAULTS_KEY]; + [[NSUserDefaults standardUserDefaults] synchronize]; + } + } errorHandler:nil]; } } -#pragma mark - - -- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response -{ - self.statusCode = [(NSHTTPURLResponse *)response statusCode]; -} - -- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data -{ - [self.responseData appendData:data]; -} - -- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error -{ - //NOOP -} - -- (void)connectionDidFinishLoading:(NSURLConnection *)connection -{ - if (self.statusCode == 200 && [self.responseData length] > 0) { - [[NSUserDefaults standardUserDefaults] setBool:YES forKey:MOPUB_CONVERSION_DEFAULTS_KEY]; - [[NSUserDefaults standardUserDefaults] synchronize]; - } -} - -#pragma mark - -#pragma mark Internal - -- (NSURL *)URLForAppID:(NSString *)appID -{ - NSString *path = [NSString stringWithFormat:@"%@?v=%@&udid=%@&id=%@&av=%@", - [MPAPIEndpoints baseURLStringWithPath:MOPUB_API_PATH_CONVERSION testing:NO], - MP_SERVER_VERSION, - [MPIdentityProvider identifier], - appID, - [[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] - ]; - - return [NSURL URLWithString:path]; -} @end diff --git a/iphone/Maps/3party/MoPubSDK/MPAdView.h b/iphone/Maps/3party/MoPubSDK/MPAdView.h index 686a9f93a1..6b1e30bb56 100644 --- a/iphone/Maps/3party/MoPubSDK/MPAdView.h +++ b/iphone/Maps/3party/MoPubSDK/MPAdView.h @@ -58,7 +58,16 @@ typedef enum @property (nonatomic, copy) NSString *adUnitId; /** - * A string representing a set of keywords that should be passed to the MoPub ad server to receive + * A string representing a set of non-personally identifiable keywords that should be passed to the MoPub ad server to receive + * more relevant advertising. + + * Note: If a user is in General Data Protection Regulation (GDPR) region and MoPub doesn't obtain consent from the user, "keywords" will still be sent to the server. + * + */ +@property (nonatomic, copy) NSString *keywords; + +/** + * A string representing a set of personally identifiable keywords that should be passed to the MoPub ad server to receive * more relevant advertising. * * Keywords are typically used to target ad campaigns at specific user segments. They should be @@ -66,8 +75,10 @@ typedef enum * * On the MoPub website, keyword targeting options can be found under the "Advanced Targeting" * section when managing campaigns. + +* Note: If a user is in General Data Protection Regulation (GDPR) region and MoPub doesn't obtain consent from the user, "userDataKeywords" will not be sent to the server. */ -@property (nonatomic, copy) NSString *keywords; +@property (nonatomic, copy) NSString *userDataKeywords; /** * A `CLLocation` object representing a user's location that should be passed to the MoPub ad server @@ -75,17 +86,6 @@ typedef enum */ @property (nonatomic, copy) CLLocation *location; -/** @name Enabling Test Mode */ - -/** - * A Boolean value that determines whether the ad view should request ads in test mode. - * - * The default value is NO. - * @warning **Important**: If you set this value to YES, make sure to reset it to NO before - * submitting your application to the App Store. - */ -@property (nonatomic, assign, getter = isTesting) BOOL testing; - /** @name Loading a Banner Ad */ /** @@ -133,12 +133,11 @@ typedef enum * MPNativeAdOrientationPortrait, * MPNativeAdOrientationLandscape * } MPNativeAdOrientation; - * + * * * @see unlockNativeAdsOrientation * @see allowedNativeAdsOrientation */ - - (void)lockNativeAdsToOrientation:(MPNativeAdOrientation)orientation; /** diff --git a/iphone/Maps/3party/MoPubSDK/MPAdView.m b/iphone/Maps/3party/MoPubSDK/MPAdView.m index c46ebdee1a..361f056a16 100644 --- a/iphone/Maps/3party/MoPubSDK/MPAdView.m +++ b/iphone/Maps/3party/MoPubSDK/MPAdView.m @@ -23,15 +23,6 @@ @end @implementation MPAdView -@synthesize location = _location; -@synthesize adManager = _adManager; -@synthesize adUnitId = _adUnitId; -@synthesize keywords = _keywords; -@synthesize delegate = _delegate; -@synthesize originalSize = _originalSize; -@synthesize testing = _testing; -@synthesize adContentView = _adContentView; -@synthesize allowedNativeAdOrientation = _allowedNativeAdOrientation; #pragma mark - #pragma mark Lifecycle @@ -46,7 +37,8 @@ self.originalSize = size; self.allowedNativeAdOrientation = MPNativeAdOrientationAny; self.adUnitId = (adUnitId) ? adUnitId : DEFAULT_PUB_ID; - self.adManager = [[MPInstanceProvider sharedProvider] buildMPBannerAdManagerWithDelegate:self]; + self.adManager = [[MPBannerAdManager alloc] initWithDelegate:self]; + self.userInteractionEnabled = NO; } return self; } @@ -63,6 +55,10 @@ [self.adContentView removeFromSuperview]; _adContentView = view; [self addSubview:view]; + + if (view != nil) { + self.userInteractionEnabled = YES; + } } - (CGSize)adContentViewSize diff --git a/iphone/Maps/3party/MoPubSDK/MPAdvancedBidder.h b/iphone/Maps/3party/MoPubSDK/MPAdvancedBidder.h new file mode 100644 index 0000000000..bfbb58c533 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/MPAdvancedBidder.h @@ -0,0 +1,22 @@ +// +// MPAdvancedBidder.h +// MoPubSDK +// +// Copyright © 2017 MoPub. All rights reserved. +// + +#import + +@protocol MPAdvancedBidder +@required +/** + * The name of the network that generated the token. + * @remark This value should correspond to `creative_network_name` in the dashboard. + */ +@property (nonatomic, copy, readonly) NSString * _Nonnull creativeNetworkName; + +/** + * An identity token needed for ORTB requests to the bidder. + */ +@property (nonatomic, copy, readonly) NSString * _Nonnull token; +@end diff --git a/iphone/Maps/3party/MoPubSDK/MPBannerCustomEvent.h b/iphone/Maps/3party/MoPubSDK/MPBannerCustomEvent.h index bc6d3483dd..2ee76d868e 100644 --- a/iphone/Maps/3party/MoPubSDK/MPBannerCustomEvent.h +++ b/iphone/Maps/3party/MoPubSDK/MPBannerCustomEvent.h @@ -36,11 +36,29 @@ * @param size The current size of the parent `MPAdView`. You should use this information to create * and request a banner of the appropriate size. * - * @param info A dictionary containing additional custom data associated with a given custom event + * @param info A dictionary containing additional custom data associated with a given custom event * request. This data is configurable on the MoPub website, and may be used to pass dynamic information, such as publisher IDs. */ - (void)requestAdWithSize:(CGSize)size customEventInfo:(NSDictionary *)info; +/** + * Called when the MoPub SDK requires a new banner ad. + * + * When the MoPub SDK receives a response indicating it should load a custom event, it will send + * this message to your custom event class. Your implementation of this method can either load a + * banner ad from a third-party ad network, or execute any application code. It must also notify the + * `MPBannerCustomEventDelegate` of certain lifecycle events. + * + * @param size The current size of the parent `MPAdView`. You should use this information to create + * and request a banner of the appropriate size. + * + * @param info A dictionary containing additional custom data associated with a given custom event + * request. This data is configurable on the MoPub website, and may be used to pass dynamic information, such as publisher IDs. + * + * @param adMarkup An optional ad markup to use. + */ +- (void)requestAdWithSize:(CGSize)size customEventInfo:(NSDictionary *)info adMarkup:(NSString *)adMarkup; + /** @name Callbacks */ /** diff --git a/iphone/Maps/3party/MoPubSDK/MPBannerCustomEvent.m b/iphone/Maps/3party/MoPubSDK/MPBannerCustomEvent.m index c1a8985707..c22bb08a5a 100644 --- a/iphone/Maps/3party/MoPubSDK/MPBannerCustomEvent.m +++ b/iphone/Maps/3party/MoPubSDK/MPBannerCustomEvent.m @@ -17,6 +17,13 @@ // and implement code to load a banner here. } +- (void)requestAdWithSize:(CGSize)size customEventInfo:(NSDictionary *)info adMarkup:(NSString *)adMarkup +{ + // By default, the original requestAdWithSize:customEventInfo: method will be called. + // Otherwise subclasses must override this method and implement code to load a banner here. + [self requestAdWithSize:size customEventInfo:info]; +} + - (void)didDisplayAd { // The default implementation of this method does nothing. Subclasses may override this method diff --git a/iphone/Maps/3party/MoPubSDK/MPBool.h b/iphone/Maps/3party/MoPubSDK/MPBool.h new file mode 100644 index 0000000000..a013d79029 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/MPBool.h @@ -0,0 +1,26 @@ +// +// MPBool.h +// MoPubSDK +// +// Copyright © 2018 MoPub. All rights reserved. +// + +/** + Tri-state boolean. + */ +typedef NS_ENUM(NSInteger, MPBool) { + /** + No + */ + MPBoolNo = -1, + + /** + Unknown + */ + MPBoolUnknown = 0, + + /** + Yes + */ + MPBoolYes = 1, +}; diff --git a/iphone/Maps/3party/MoPubSDK/MPConsentChangedNotification.h b/iphone/Maps/3party/MoPubSDK/MPConsentChangedNotification.h new file mode 100644 index 0000000000..9ffe16017e --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/MPConsentChangedNotification.h @@ -0,0 +1,33 @@ +// +// MPConsentChangedNotification.h +// MoPubSDK +// +// Copyright © 2018 MoPub. All rights reserved. +// + +#import + +/** + Notification fire whenever the current consent status has changed. The payload + will be included in the @NSNotification.userInfo dictionary. + */ +extern NSString * const kMPConsentChangedNotification; + +/** + The new consent state; represented as a @c MPConsentStatus value wrapped + in a @c NSNumber. + */ +extern NSString * const kMPConsentChangedInfoNewConsentStatusKey; + +/** + The previous consent state; represented as a @c MPConsentStatus value wrapped + in a @c NSNumber. + */ +extern NSString * const kMPConsentChangedInfoPreviousConsentStatusKey; + +/** + Boolean flag indicating that it is okay to collection any personally + identifiable information; represented as a @c BOOL value wrapped in + a @c NSNumber. + */ +extern NSString * const kMPConsentChangedInfoCanCollectPersonalInfoKey; diff --git a/iphone/Maps/3party/MoPubSDK/MPConsentChangedNotification.m b/iphone/Maps/3party/MoPubSDK/MPConsentChangedNotification.m new file mode 100644 index 0000000000..adac7f2e96 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/MPConsentChangedNotification.m @@ -0,0 +1,18 @@ +// +// MPConsentChangedNotification.m +// MoPubSDK +// +// Copyright © 2018 MoPub. All rights reserved. +// + +#import "MPConsentChangedNotification.h" + +#pragma mark - NSNotification Name + +NSString * const kMPConsentChangedNotification = @"com.mopub.mopub-ios-sdk.notification.consent.changed"; + +#pragma mark - NSNotification userInfo Keys + +NSString * const kMPConsentChangedInfoNewConsentStatusKey = @"newConsentStatus"; +NSString * const kMPConsentChangedInfoPreviousConsentStatusKey = @"previousConsentStatus"; +NSString * const kMPConsentChangedInfoCanCollectPersonalInfoKey = @"canCollectPersonalInfo"; diff --git a/iphone/Maps/3party/MoPubSDK/MPConsentChangedReason.h b/iphone/Maps/3party/MoPubSDK/MPConsentChangedReason.h new file mode 100644 index 0000000000..5d6243d760 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/MPConsentChangedReason.h @@ -0,0 +1,23 @@ +// +// MPConsentChangedReason.h +// MoPubSDK +// +// Copyright © 2018 MoPub. All rights reserved. +// + +#import + +extern NSString * const kConsentedChangedReasonGranted; +extern NSString * const kConsentedChangedReasonWhitelistGranted; +extern NSString * const kConsentedChangedReasonPotentialWhitelist; +extern NSString * const kConsentedChangedReasonDenied; +extern NSString * const kConsentedChangedReasonPublisherDenied; +extern NSString * const kConsentedChangedReasonDoNotTrackEnabled; +extern NSString * const kConsentedChangedReasonDoNotTrackDisabled; +extern NSString * const kConsentedChangedReasonDoNotTrackDisabledNeedConsent; +extern NSString * const kConsentedChangedReasonIfaChanged; +extern NSString * const kConsentedChangedReasonPrivacyPolicyChange; +extern NSString * const kConsentedChangedReasonVendorListChange; +extern NSString * const kConsentedChangedReasonIabVendorListChange; +extern NSString * const kConsentedChangedReasonServerDeniedConsent; +extern NSString * const kConsentedChangedReasonServerForceInvalidate; diff --git a/iphone/Maps/3party/MoPubSDK/MPConsentChangedReason.m b/iphone/Maps/3party/MoPubSDK/MPConsentChangedReason.m new file mode 100644 index 0000000000..9d7ef610d6 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/MPConsentChangedReason.m @@ -0,0 +1,24 @@ +// +// MPConsentChangedReason.m +// MoPubSDK +// +// Copyright © 2018 MoPub. All rights reserved. +// + +#import "MPConsentChangedReason.h" + +// Human readable descriptions of why consent changed. +NSString * const kConsentedChangedReasonGranted = @"Consent was explicitly granted by the user"; +NSString * const kConsentedChangedReasonWhitelistGranted = @"Consent was explicitly granted by a whitelisted publisher"; +NSString * const kConsentedChangedReasonPotentialWhitelist = @"Consent was explicitly granted by a publisher who is not whitelisted"; +NSString * const kConsentedChangedReasonDenied = @"Consent was explicitly denied by the user"; +NSString * const kConsentedChangedReasonPublisherDenied = @"Consent was explicitly denied by the publisher"; +NSString * const kConsentedChangedReasonDoNotTrackEnabled = @"Limit ad tracking was enabled and consent implicitly denied by the user"; +NSString * const kConsentedChangedReasonDoNotTrackDisabled = @"Limit ad tracking was disabled"; +NSString * const kConsentedChangedReasonDoNotTrackDisabledNeedConsent = @"Consent needs to be reacquired because the user disabled limit ad tracking"; +NSString * const kConsentedChangedReasonIfaChanged = @"Consent needs to be reacquired because the IFA has changed"; +NSString * const kConsentedChangedReasonPrivacyPolicyChange = @"Consent needs to be reacquired because the privacy policy has changed"; +NSString * const kConsentedChangedReasonVendorListChange = @"Consent needs to be reacquired because the vendor list has changed"; +NSString * const kConsentedChangedReasonIabVendorListChange = @"Consent needs to be reacquired because the IAB vendor list has changed"; +NSString * const kConsentedChangedReasonServerDeniedConsent = @"Consent was revoked by the server"; +NSString * const kConsentedChangedReasonServerForceInvalidate = @"Server requires that consent needs to be reacquired"; diff --git a/iphone/Maps/3party/MoPubSDK/MPConsentError.h b/iphone/Maps/3party/MoPubSDK/MPConsentError.h new file mode 100644 index 0000000000..4c1054fb19 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/MPConsentError.h @@ -0,0 +1,16 @@ +// +// MPConsentError.h +// MoPubSDK +// +// Copyright © 2018 MoPub. All rights reserved. +// + +static NSString * const kConsentErrorDomain = @"com.mopub.mopub-ios-sdk.consent"; + +/** + Error codes related to consent management. + */ +typedef NS_ENUM(NSUInteger, MPConsentErrorCode) { + MPConsentErrorCodeLimitAdTrackingEnabled = 1, + MPConsentErrorCodeFailedToParseSynchronizationResponse, +}; diff --git a/iphone/Maps/3party/MoPubSDK/MPConsentStatus.h b/iphone/Maps/3party/MoPubSDK/MPConsentStatus.h new file mode 100644 index 0000000000..ce1623293f --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/MPConsentStatus.h @@ -0,0 +1,42 @@ +// +// MPConsentStatus.h +// MoPubSDK +// +// Copyright © 2018 MoPub. All rights reserved. +// + +#import + +/** + Personally identifiable information (PII) consent status. + PII is allowed to be collected only if @c MPConsentStatus is @c MPConsentStatusConsented. + In all other cases, PII is not allowed to be collected. + */ +typedef NS_ENUM(NSInteger, MPConsentStatus) { + /** + Status is unknown. Either the status is currently updating or + @c initializeSdkWithConfiguration:completion: has not been called. + */ + MPConsentStatusUnknown = 0, + + /** + Consent is denied. + */ + MPConsentStatusDenied, + + /** + Advertiser tracking is disabled. + */ + MPConsentStatusDoNotTrack, + + /** + A potentially whitelisted publisher has attempted to grant consent on + the user's behalf. + */ + MPConsentStatusPotentialWhitelist, + + /** + Consented. + */ + MPConsentStatusConsented +}; diff --git a/iphone/Maps/3party/MoPubSDK/MPConstants.h b/iphone/Maps/3party/MoPubSDK/MPConstants.h index fa3a54dcce..a3df7c49e6 100644 --- a/iphone/Maps/3party/MoPubSDK/MPConstants.h +++ b/iphone/Maps/3party/MoPubSDK/MPConstants.h @@ -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.13.0" +#define MP_SDK_VERSION @"5.0.0" // Sizing constants. extern CGSize const MOPUB_BANNER_SIZE; @@ -28,6 +28,13 @@ extern CGSize const MOPUB_WIDE_SKYSCRAPER_SIZE; #define BANNER_TIMEOUT_INTERVAL 10 #define INTERSTITIAL_TIMEOUT_INTERVAL 30 #define REWARDED_VIDEO_TIMEOUT_INTERVAL 30 +#define MOPUB_ADS_EXPIRATION_INTERVAL 14400 // 4 hours converted to seconds // Feature Flags #define SESSION_TRACKING_ENABLED 1 + +@interface MPConstants : NSObject + ++ (NSTimeInterval)adsExpirationInterval; + +@end diff --git a/iphone/Maps/3party/MoPubSDK/MPConstants.m b/iphone/Maps/3party/MoPubSDK/MPConstants.m index b6d281a81f..075d33cacb 100644 --- a/iphone/Maps/3party/MoPubSDK/MPConstants.m +++ b/iphone/Maps/3party/MoPubSDK/MPConstants.m @@ -11,3 +11,11 @@ CGSize const MOPUB_BANNER_SIZE = { .width = 320.0f, .height = 50.0f }; CGSize const MOPUB_MEDIUM_RECT_SIZE = { .width = 300.0f, .height = 250.0f }; CGSize const MOPUB_LEADERBOARD_SIZE = { .width = 728.0f, .height = 90.0f }; CGSize const MOPUB_WIDE_SKYSCRAPER_SIZE = { .width = 160.0f, .height = 600.0f }; + +@implementation MPConstants + ++ (NSTimeInterval)adsExpirationInterval { + return MOPUB_ADS_EXPIRATION_INTERVAL; +} + +@end diff --git a/iphone/Maps/3party/MoPubSDK/MPInterstitialAdController.h b/iphone/Maps/3party/MoPubSDK/MPInterstitialAdController.h index bc0f37f038..36b94a7c62 100644 --- a/iphone/Maps/3party/MoPubSDK/MPInterstitialAdController.h +++ b/iphone/Maps/3party/MoPubSDK/MPInterstitialAdController.h @@ -52,7 +52,16 @@ @property (nonatomic, copy) NSString *adUnitId; /** - * A string representing a set of keywords that should be passed to the MoPub ad server to receive + * A string representing a set of non-personally identifiable keywords that should be passed to the MoPub ad server to receive + * more relevant advertising. + + * Note: If a user is in General Data Protection Regulation (GDPR) region and MoPub doesn't obtain consent from the user, "keywords" will still be sent to the server. + * + */ +@property (nonatomic, copy) NSString *keywords; + +/** + * A string representing a set of personally identifiable keywords that should be passed to the MoPub ad server to receive * more relevant advertising. * * Keywords are typically used to target ad campaigns at specific user segments. They should be @@ -60,8 +69,10 @@ * * On the MoPub website, keyword targeting options can be found under the "Advanced Targeting" * section when managing campaigns. + * + * Note: If a user is in General Data Protection Regulation (GDPR) region and MoPub doesn't obtain consent from the user, personally identifiable keywords will not be sent to the server. */ -@property (nonatomic, copy) NSString *keywords; +@property (nonatomic, copy) NSString *userDataKeywords; /** * A `CLLocation` object representing a user's location that should be passed to the MoPub ad server @@ -69,18 +80,6 @@ */ @property (nonatomic, copy) CLLocation *location; -/** @name Enabling Test Mode */ - -/** - * A Boolean value that determines whether the interstitial ad object should request ads in test - * mode. - * - * The default value is NO. - * @warning **Important**: If you set this value to YES, make sure to reset it to NO before - * submitting your application to the App Store. - */ -@property (nonatomic, assign, getter=isTesting) BOOL testing; - /** @name Loading an Interstitial Ad */ /** @@ -178,6 +177,15 @@ */ - (void)interstitialDidFailToLoadAd:(MPInterstitialAdController *)interstitial; +/** + * Sent when an interstitial ad object fails to load an ad. + * + * @param interstitial The interstitial ad object sending the message. + * @param error The error that occurred during the load. + */ +- (void)interstitialDidFailToLoadAd:(MPInterstitialAdController *)interstitial + withError:(NSError *)error; + /** @name Detecting When an Interstitial Ad is Presented */ /** diff --git a/iphone/Maps/3party/MoPubSDK/MPInterstitialAdController.m b/iphone/Maps/3party/MoPubSDK/MPInterstitialAdController.m index 785a56b61e..ff90604497 100644 --- a/iphone/Maps/3party/MoPubSDK/MPInterstitialAdController.m +++ b/iphone/Maps/3party/MoPubSDK/MPInterstitialAdController.m @@ -23,13 +23,6 @@ @implementation MPInterstitialAdController -@synthesize manager = _manager; -@synthesize delegate = _delegate; -@synthesize adUnitId = _adUnitId; -@synthesize keywords = _keywords; -@synthesize location = _location; -@synthesize testing = _testing; - - (id)initWithAdUnitId:(NSString *)adUnitId { if (self = [super init]) { @@ -79,8 +72,8 @@ { [self.manager loadInterstitialWithAdUnitID:self.adUnitId keywords:self.keywords - location:self.location - testing:self.testing]; + userDataKeywords:self.userDataKeywords + location:self.location]; } - (void)showFromViewController:(UIViewController *)controller @@ -135,7 +128,9 @@ - (void)manager:(MPInterstitialAdManager *)manager didFailToLoadInterstitialWithError:(NSError *)error { - if ([self.delegate respondsToSelector:@selector(interstitialDidFailToLoadAd:)]) { + if ([self.delegate respondsToSelector:@selector(interstitialDidFailToLoadAd:withError:)]) { + [self.delegate interstitialDidFailToLoadAd:self withError:error]; + } else if ([self.delegate respondsToSelector:@selector(interstitialDidFailToLoadAd:)]) { [self.delegate interstitialDidFailToLoadAd:self]; } } diff --git a/iphone/Maps/3party/MoPubSDK/MPInterstitialCustomEvent.h b/iphone/Maps/3party/MoPubSDK/MPInterstitialCustomEvent.h index dc76b68f8f..16b86a1431 100644 --- a/iphone/Maps/3party/MoPubSDK/MPInterstitialCustomEvent.h +++ b/iphone/Maps/3party/MoPubSDK/MPInterstitialCustomEvent.h @@ -40,6 +40,21 @@ - (void)requestInterstitialWithCustomEventInfo:(NSDictionary *)info; +/** + * Called when the MoPub SDK requires a new interstitial ad. + * + * When the MoPub SDK receives a response indicating it should load a custom event, it will send + * this message to your custom event class. Your implementation of this method should load an + * interstitial ad from a third-party ad network. It must also notify the + * `MPInterstitialCustomEventDelegate` of certain lifecycle events. + * + * @param info A dictionary containing additional custom data associated with a given custom event + * request. This data is configurable on the MoPub website, and may be used to pass dynamic information, such as publisher IDs. + * @param adMarkup An optional ad markup to use. + */ + +- (void)requestInterstitialWithCustomEventInfo:(NSDictionary *)info adMarkup:(NSString *)adMarkup; + /** * Called when the interstitial should be displayed. * diff --git a/iphone/Maps/3party/MoPubSDK/MPInterstitialCustomEvent.m b/iphone/Maps/3party/MoPubSDK/MPInterstitialCustomEvent.m index 7a36ec1058..43d84fcacb 100644 --- a/iphone/Maps/3party/MoPubSDK/MPInterstitialCustomEvent.m +++ b/iphone/Maps/3party/MoPubSDK/MPInterstitialCustomEvent.m @@ -17,6 +17,13 @@ // and implement code to load an interstitial here. } +- (void)requestInterstitialWithCustomEventInfo:(NSDictionary *)info adMarkup:(NSString *)adMarkup +{ + // By default, the original requestInterstitialWithCustomEventInfo: method will be called. + // Otherwise subclasses must override this method and implement code to load an interstitial here. + [self requestInterstitialWithCustomEventInfo:info]; +} + - (BOOL)enableAutomaticImpressionAndClickTracking { // Subclasses may override this method to return NO to perform impression and click tracking diff --git a/iphone/Maps/3party/MoPubSDK/MPLogLevel.h b/iphone/Maps/3party/MoPubSDK/MPLogLevel.h new file mode 100644 index 0000000000..3c10d4769a --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/MPLogLevel.h @@ -0,0 +1,23 @@ +// +// MPLogLevel.h +// MoPubSDK +// +// Copyright © 2017 MoPub. All rights reserved. +// + +#import + +/** + * SDK logging level. + * @remark Lower values equate to more detailed logs. + */ +typedef enum { + MPLogLevelAll = 0, + MPLogLevelTrace = 10, + MPLogLevelDebug = 20, + MPLogLevelInfo = 30, + MPLogLevelWarn = 40, + MPLogLevelError = 50, + MPLogLevelFatal = 60, + MPLogLevelOff = 70 +} MPLogLevel; diff --git a/iphone/Maps/3party/MoPubSDK/MPMediationSdkInitializable.h b/iphone/Maps/3party/MoPubSDK/MPMediationSdkInitializable.h new file mode 100644 index 0000000000..e5a7fbc4bd --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/MPMediationSdkInitializable.h @@ -0,0 +1,25 @@ +// +// MPMediationSdkInitializable.h +// MoPubSDK +// +// Copyright © 2018 MoPub. All rights reserved. +// + +#import + +/** + Indicates that the implementer is initializable by the MoPub SDK when + @c initializeSdkWithConfiguration:complete: is called, or whenever the + mediated network needs to be initialized. + */ +@protocol MPMediationSdkInitializable + +/** + Called when the MoPub SDK requires the underlying mediation SDK to be initialized. + + @param parameters A dictionary containing any mediation SDK-specific information + needed for initialization, such as app IDs and placement IDs. + */ +- (void)initializeSdkWithParameters:(NSDictionary * _Nullable)parameters; + +@end diff --git a/iphone/Maps/3party/MoPubSDK/RewardedVideo/MPMediationSettingsProtocol.h b/iphone/Maps/3party/MoPubSDK/MPMediationSettingsProtocol.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/RewardedVideo/MPMediationSettingsProtocol.h rename to iphone/Maps/3party/MoPubSDK/MPMediationSettingsProtocol.h diff --git a/iphone/Maps/3party/MoPubSDK/MPMoPubConfiguration.h b/iphone/Maps/3party/MoPubSDK/MPMoPubConfiguration.h new file mode 100644 index 0000000000..c44f03b2f8 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/MPMoPubConfiguration.h @@ -0,0 +1,61 @@ +// +// MPMoPubConfiguration.h +// MoPubSampleApp +// +// Copyright © 2017 MoPub. All rights reserved. +// + +#import +#import "MPAdvancedBidder.h" +#import "MPMediationSdkInitializable.h" +#import "MPMediationSettingsProtocol.h" +#import "MPRewardedVideo.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface MPMoPubConfiguration : NSObject +/** + Any valid ad unit ID used within the app used for app initialization. + @remark This is a required field. + */ +@property (nonatomic, strong, nonnull) NSString * adUnitIdForAppInitialization; + +/** + Optional list of advanced bidders to initialize. + */ +@property (nonatomic, strong, nullable) NSArray> * advancedBidders; + +/** + Optional global configurations for all ad networks your app supports. + */ +@property (nonatomic, strong, nullable) NSArray> * globalMediationSettings; + +/** + Optional list of mediated network SDKs to pre-initialize from the cache. If the mediated network + SDK has no cache entry, nothing will be done. If set to @c nil or empty array, no network + SDKs will be preinitialized. + + To initialize all existing cached networks use @c MoPub.sharedInstance.allCachedNetworks + */ +@property (nonatomic, strong, nullable) NSArray> * mediatedNetworks; + +/** + Initializes the @c MPMoPubConfiguration object with the required fields. + @param adUnitId Any valid ad unit ID used within the app used for app initialization. + @return A configuration instance. + */ +- (instancetype)initWithAdUnitIdForAppInitialization:(NSString *)adUnitId NS_DESIGNATED_INITIALIZER; + +/** + Usage of default initializer is disallowed. Use @c initWithAdUnitIdForAppInitialization: instead. + */ +- (instancetype)init NS_UNAVAILABLE; + +/** + Usage of @c new is disallowed. Use @c initWithAdUnitIdForAppInitialization: instead. + */ ++ (instancetype)new NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/MPMoPubConfiguration.m b/iphone/Maps/3party/MoPubSDK/MPMoPubConfiguration.m new file mode 100644 index 0000000000..3baed2b2dc --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/MPMoPubConfiguration.m @@ -0,0 +1,23 @@ +// +// MPMoPubConfiguration.m +// MoPubSampleApp +// +// Copyright © 2017 MoPub. All rights reserved. +// + +#import "MPMoPubConfiguration.h" + +@implementation MPMoPubConfiguration + +- (instancetype)initWithAdUnitIdForAppInitialization:(NSString * _Nonnull)adUnitId { + if (self = [super init]) { + _adUnitIdForAppInitialization = adUnitId; + _advancedBidders = nil; + _globalMediationSettings = nil; + _mediatedNetworks = nil; + } + + return self; +} + +@end diff --git a/iphone/Maps/3party/MoPubSDK/MoPub.h b/iphone/Maps/3party/MoPubSDK/MoPub.h index b815d89561..07eb12230b 100644 --- a/iphone/Maps/3party/MoPubSDK/MoPub.h +++ b/iphone/Maps/3party/MoPubSDK/MoPub.h @@ -7,18 +7,34 @@ #import "MPConstants.h" +#import "MOPUBDisplayAgentType.h" #import "MPAdConversionTracker.h" +#import "MPAdvancedBidder.h" #import "MPAdView.h" #import "MPBannerCustomEvent.h" #import "MPBannerCustomEventDelegate.h" +#import "MPBool.h" +#import "MPConsentChangedNotification.h" +#import "MPConsentError.h" +#import "MPConsentStatus.h" +#import "MPGlobal.h" +#import "MPIdentityProvider.h" #import "MPInterstitialAdController.h" #import "MPInterstitialCustomEvent.h" #import "MPInterstitialCustomEventDelegate.h" +#import "MPLogging.h" +#import "MPLogLevel.h" +#import "MPLogProvider.h" +#import "MPMediationSdkInitializable.h" #import "MPMediationSettingsProtocol.h" +#import "MPMoPubConfiguration.h" #import "MPRewardedVideo.h" #import "MPRewardedVideoReward.h" #import "MPRewardedVideoCustomEvent.h" +#import "MPRewardedVideoCustomEvent+Caching.h" #import "MPRewardedVideoError.h" +#import "MPViewabilityAdapter.h" +#import "MPViewabilityOption.h" #if MP_HAS_NATIVE_PACKAGE #import "MPNativeAd.h" @@ -43,6 +59,7 @@ #import "MOPUBNativeVideoAdRendererSettings.h" #import "MOPUBNativeVideoAdRenderer.h" #import "MPNativeAdRenderingImageLoader.h" +#import "MPStreamAdPlacer.h" #endif // Import these frameworks for module support. @@ -61,6 +78,8 @@ #define MoPubKit [MoPub sharedInstance] +NS_ASSUME_NONNULL_BEGIN + @interface MoPub : NSObject /** @@ -68,7 +87,7 @@ * * @return The MoPub singleton object. */ -+ (MoPub *)sharedInstance; ++ (MoPub * _Nonnull)sharedInstance; /** * A Boolean value indicating whether the MoPub SDK should use Core Location APIs to automatically @@ -79,11 +98,14 @@ * This only occurs if location services are enabled and the user has already authorized the use * of location services for the application. The default value is YES. * - * @param enabled A Boolean value indicating whether the SDK should listen for location updates. + * If a user is in General Data Protection Regulation (GDPR) region and + * MoPub doesn't obtain consent from the user for using his/her personal data, + * locationUpdatesEnabled will always be set to NO. + * + * @return A Boolean value indicating whether the SDK should listen for location updates. */ @property (nonatomic, assign) BOOL locationUpdatesEnabled; - /** * A Boolean value indicating whether the MoPub SDK should create a MoPub ID that can be used * for frequency capping when Limit ad tracking is on & the IDFA we get is @@ -95,28 +117,213 @@ */ @property (nonatomic) BOOL frequencyCappingIdUsageEnabled; -/** @name Rewarded Video */ /** - * Initializes the rewarded video system. - * - * This method should only be called once. It should also be called prior to requesting any rewarded video ads. - * Once the global mediation settings and delegate are set, they cannot be changed. - * - * @param globalMediationSettings Global configurations for all rewarded video ad networks your app supports. - * - * @param delegate The delegate that will receive all events related to rewarded video. + * Forces the usage of WKWebView (if able). */ -- (void)initializeRewardedVideoWithGlobalMediationSettings:(NSArray *)globalMediationSettings delegate:(id)delegate; +@property (nonatomic, assign) BOOL forceWKWebView; + +/** + * SDK log level. The default value is `MPLogLevelInfo`. + */ +@property (nonatomic, assign) MPLogLevel logLevel; + +/** + * A boolean value indicating whether advanced bidding is enabled. This boolean defaults to `YES`. + * To disable advanced bidding, set this value to `NO`. + */ +@property (nonatomic, assign) BOOL enableAdvancedBidding; + +/** + * Initializes the MoPub SDK asynchronously on a background thread. + * @remark This should be called from the app's `application:didFinishLaunchingWithOptions:` method. + * @param configuration Required SDK configuration options. + * @param completionBlock Optional completion block that will be called when initialization has completed. + */ +- (void)initializeSdkWithConfiguration:(MPMoPubConfiguration * _Nonnull)configuration + completion:(void(^_Nullable)(void))completionBlock; + +/** + * A boolean value indicating if the SDK has been initialized. This property's value is @c YES if + * @c initializeSdkWithConfiguration:completion: has been called and completed; the value is @c NO otherwise. + */ +@property (nonatomic, readonly) BOOL isSdkInitialized; /** * Retrieves the global mediation settings for a given class type. -* + * * @param aClass The type of mediation settings object you want to receive from the collection. */ -- (id)globalMediationSettingsForClass:(Class)aClass; +- (id _Nullable)globalMediationSettingsForClass:(Class)aClass; -- (void)start; -- (NSString *)version; -- (NSString *)bundleIdentifier; +- (NSString * _Nonnull)version; +- (NSString * _Nonnull)bundleIdentifier; + +/** + * Default is MOPUBDisplayAgentTypeInApp = 0. + * + * If displayType is set to MOPUBDisplayAgentTypeNativeSafari = 1, http/https clickthrough URLs are opened in native + * safari browser. + * If displayType is set to MOPUBDisplayAgentTypeSafariViewController = 2, http/https clickthrough URLs are opened in + * SafariViewController. + * + */ +- (void)setClickthroughDisplayAgentType:(MOPUBDisplayAgentType)displayAgentType; + +/** + * Disables viewability measurement via the specified vendor(s) for the rest of the app session. A given vendor cannot + * be re-enabled after being disabled. + * + * @param vendors The viewability vendor(s) to be disabled. This is a bitmask value; ORing vendors together is okay. + */ +- (void)disableViewability:(MPViewabilityOption)vendors; @end + +@interface MoPub (Mediation) +/** + * Retrieves all currently cached mediated networks. + * @return A list of all cached networks or @c nil. + */ +- (NSArray> * _Nullable)allCachedNetworks; + +/** + * Clears all currently cached mediated networks. + */ +- (void)clearCachedNetworks; + +@end + +@interface MoPub (Consent) + +/** + * Querying Consent State + */ + +/** + * Flag indicating that personally identifiable information can be collected. + */ +@property (nonatomic, readonly) BOOL canCollectPersonalInfo; + +/** + * Gives the current consent status of this user. + * Note: NSNotification with name @c kMPConsentChangedNotification can be listened for to be informed of changes + * in the @c currentConsentStatus value. Please see MPConsentChangedNotification.h for more information on this + * notification. + */ +@property (nonatomic, readonly) MPConsentStatus currentConsentStatus; + +/** + * Flag indicating that GDPR is applicable to the user. + */ +@property (nonatomic, readonly) MPBool isGDPRApplicable; + +/** + * Consent Acquisition + */ + +/** + * `YES` if a consent dialog is presently loaded and ready to be shown; `NO` otherwise + */ +@property (nonatomic, readonly) BOOL isConsentDialogReady; + +/** + * Attempts to load a consent dialog. `completion` is called when either the consent dialog has finished loading + * or has failed to load. If there was an error, the `error` parameter will be non-nil. + */ +- (void)loadConsentDialogWithCompletion:(void (^ _Nullable)(NSError * _Nullable error))completion; + +/** + * If a consent dialog is currently loaded, this method will present it modally on top of `viewController`. If no + * consent dialog is loaded, this method will do nothing. Completion is called upon successful presentation of the + * consent dialog; otherwise it is not called. + */ +- (void)showConsentDialogFromViewController:(UIViewController *)viewController completion:(void (^ _Nullable)(void))completion; + +/** + * Flag indicating that consent needs to be acquired (or reacquired) by the user, and that the consent dialog may need + * to be shown. (Note: This flag can be used for publishers that require use of MoPub's consent dialog, as well as + * publishers that specify their own consent interface) + */ +@property (nonatomic, readonly) BOOL shouldShowConsentDialog; + +/** + * Custom Consent Interface + * Note: publishers must have explicit permission from MoPub to use their own consent interface. + */ + +/** + URL to the MoPub privacy policy in the device's preferred language. If the device's + preferred language could not be determined, English will be used. + @returns The privacy policy URL for the desired language if successful; @c nil if + there is no current vendor list. + */ +- (NSURL * _Nullable)currentConsentPrivacyPolicyUrl; + +/** + URL to the MoPub privacy policy in the language of choice. + @param isoLanguageCode ISO 630-1 language code + @returns The privacy policy URL for the desired language if successful; @c nil if the + language code is invalid or if there is no current vendor list. + */ +- (NSURL * _Nullable)currentConsentPrivacyPolicyUrlWithISOLanguageCode:(NSString * _Nonnull)isoLanguageCode; + +/** + Current vendor list URL in the device's preferred language. If the device's + preferred language could not be determined, English will be used. + @returns The vendor list URL for the desired language if successful; @c nil if + there is no current vendor list. + */ +- (NSURL * _Nullable)currentConsentVendorListUrl; + +/** + Current vendor list URL in the language of choice. + @param isoLanguageCode ISO 630-1 language code + @returns The vendor list URL for the desired language if successful; @c nil if the + language code is invalid or if there is no current vendor list. + */ +- (NSURL * _Nullable)currentConsentVendorListUrlWithISOLanguageCode:(NSString * _Nonnull)isoLanguageCode; + +/** + * Grants consent on behalf of the current user. If you do not have permission from MoPub to use a custom consent + * interface, this method will always fail to grant consent. + */ +- (void)grantConsent; + +/** + * Revokes consent on behalf of the current user. + */ +- (void)revokeConsent; + +/** + * Current IAB format vendor list. + */ +@property (nonatomic, copy, readonly, nullable) NSString * currentConsentIabVendorListFormat; + +/** + * Current version of MoPub’s privacy policy. + */ +@property (nonatomic, copy, readonly, nullable) NSString * currentConsentPrivacyPolicyVersion; + +/** + * Current version of the vendor list. + */ +@property (nonatomic, copy, readonly, nullable) NSString * currentConsentVendorListVersion; + +/** + * IAB vendor list that has been consented to. + */ +@property (nonatomic, copy, readonly, nullable) NSString * previouslyConsentedIabVendorListFormat; + +/** + * MoPub privacy policy version that has been consented to. + */ +@property (nonatomic, copy, readonly, nullable) NSString * previouslyConsentedPrivacyPolicyVersion; + +/** + * Vendor list version that has been consented to. + */ +@property (nonatomic, copy, readonly, nullable) NSString * previouslyConsentedVendorListVersion; + +@end + +NS_ASSUME_NONNULL_END diff --git a/iphone/Maps/3party/MoPubSDK/MoPub.m b/iphone/Maps/3party/MoPubSDK/MoPub.m index 9662cf797c..b2dc1c0e26 100644 --- a/iphone/Maps/3party/MoPubSDK/MoPub.m +++ b/iphone/Maps/3party/MoPubSDK/MoPub.m @@ -6,16 +6,29 @@ // #import "MoPub.h" +#import "MPAdvancedBiddingManager.h" +#import "MPConsentManager.h" #import "MPConstants.h" #import "MPCoreInstanceProvider.h" #import "MPGeolocationProvider.h" +#import "MPLogging.h" +#import "MPMediationManager.h" #import "MPRewardedVideo.h" +#import "MPRewardedVideoCustomEvent+Caching.h" #import "MPIdentityProvider.h" +#import "MPWebView.h" +#import "MOPUBExperimentProvider.h" +#import "MPViewabilityTracker.h" +#import "MPAdConversionTracker.h" +#import "MPConsentManager.h" +#import "MPConsentChangedNotification.h" @interface MoPub () @property (nonatomic, strong) NSArray *globalMediationSettings; +@property (nonatomic, assign, readwrite) BOOL isSdkInitialized; + @end @implementation MoPub @@ -30,6 +43,15 @@ return sharedInstance; } +- (instancetype)init +{ + if (self = [super init]) { + // Processing personal data if a user is in GDPR region. + [self handlePersonalData]; + } + return self; +} + - (void)setLocationUpdatesEnabled:(BOOL)locationUpdatesEnabled { [[[MPCoreInstanceProvider sharedProvider] sharedMPGeolocationProvider] setLocationUpdatesEnabled:locationUpdatesEnabled]; @@ -45,16 +67,46 @@ [MPIdentityProvider setFrequencyCappingIdUsageEnabled:frequencyCappingIdUsageEnabled]; } +- (void)setForceWKWebView:(BOOL)forceWKWebView +{ + [MPWebView forceWKWebView:forceWKWebView]; +} + +- (BOOL)forceWKWebView +{ + return [MPWebView isForceWKWebView]; +} + +- (void)setLogLevel:(MPLogLevel)level +{ + MPLogSetLevel(level); +} + +- (MPLogLevel)logLevel +{ + return MPLogGetLevel(); +} + +- (void)setEnableAdvancedBidding:(BOOL)enableAdvancedBidding +{ + [MPAdvancedBiddingManager sharedManager].advancedBiddingEnabled = enableAdvancedBidding; +} + +- (BOOL)enableAdvancedBidding +{ + return [MPAdvancedBiddingManager sharedManager].advancedBiddingEnabled; +} + +- (void)setClickthroughDisplayAgentType:(MOPUBDisplayAgentType)displayAgentType +{ + [MOPUBExperimentProvider setDisplayAgentType:displayAgentType]; +} + - (BOOL)frequencyCappingIdUsageEnabled { return [MPIdentityProvider frequencyCappingIdUsageEnabled]; } -- (void)start -{ - -} - // Keep -version and -bundleIdentifier methods around for Fabric backwards compatibility. - (NSString *)version { @@ -66,11 +118,61 @@ return MP_BUNDLE_IDENTIFIER; } -- (void)initializeRewardedVideoWithGlobalMediationSettings:(NSArray *)globalMediationSettings delegate:(id)delegate +- (void)initializeSdkWithConfiguration:(MPMoPubConfiguration *)configuration + completion:(void(^_Nullable)(void))completionBlock { - // initializeWithDelegate: is a known private initialization method on MPRewardedVideo. So we forward the initialization call to that class. - [MPRewardedVideo performSelector:@selector(initializeWithDelegate:) withObject:delegate]; - self.globalMediationSettings = globalMediationSettings; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + [self setSdkWithConfiguration:configuration completion:completionBlock]; + }); +} + +- (void)setSdkWithConfiguration:(MPMoPubConfiguration *)configuration + completion:(void(^_Nullable)(void))completionBlock +{ + @synchronized (self) { + // Store the global mediation settings + self.globalMediationSettings = configuration.globalMediationSettings; + + // Create a dispatch group to synchronize mutliple asynchronous tasks. + dispatch_group_t initializationGroup = dispatch_group_create(); + + // Configure the consent manager and synchronize regardless of the result + // of `checkForDoNotTrackAndTransition`. + dispatch_group_enter(initializationGroup); + MPConsentManager.sharedManager.adUnitIdUsedForConsent = configuration.adUnitIdForAppInitialization; + [MPConsentManager.sharedManager checkForDoNotTrackAndTransition]; + [MPConsentManager.sharedManager synchronizeConsentWithCompletion:^(NSError * _Nullable error) { + dispatch_group_leave(initializationGroup); + }]; + + // Configure mediated network SDKs + dispatch_group_enter(initializationGroup); + NSArray> * mediatedNetworks = configuration.mediatedNetworks; + [MPMediationManager.sharedManager initializeMediatedNetworks:mediatedNetworks completion:^(NSError * _Nullable error) { + dispatch_group_leave(initializationGroup); + }]; + + // Configure advanced bidders + dispatch_group_enter(initializationGroup); + [MPAdvancedBiddingManager.sharedManager initializeBidders:configuration.advancedBidders complete:^{ + dispatch_group_leave(initializationGroup); + }]; + + // Once all of the asynchronous tasks have completed, notify the + // completion handler. + dispatch_group_notify(initializationGroup, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{ + self.isSdkInitialized = YES; + if (completionBlock) { + completionBlock(); + } + }); + } +} + +- (void)handlePersonalData +{ + [[MPConsentManager sharedManager] checkForIfaChange]; } - (id)globalMediationSettingsForClass:(Class)aClass @@ -86,4 +188,101 @@ return nil; } +- (void)disableViewability:(MPViewabilityOption)vendors +{ + [MPViewabilityTracker disableViewability:vendors]; +} + +@end + +@implementation MoPub (Mediation) + +- (NSArray> * _Nullable)allCachedNetworks { + return [MPMediationManager.sharedManager allCachedNetworks]; +} + +- (void)clearCachedNetworks { + return [MPMediationManager.sharedManager clearCache]; +} + +@end + +@implementation MoPub (Consent) + +- (BOOL)shouldShowConsentDialog { + return [MPConsentManager sharedManager].isConsentNeeded; +} + +- (BOOL)canCollectPersonalInfo { + return [MPConsentManager sharedManager].canCollectPersonalInfo; +} + +- (MPBool)isGDPRApplicable { + return [MPConsentManager sharedManager].isGDPRApplicable; +} + +- (MPConsentStatus)currentConsentStatus { + return [MPConsentManager sharedManager].currentStatus; +} + +- (NSString *)currentConsentIabVendorListFormat { + return [MPConsentManager sharedManager].iabVendorList; +} + +- (NSString *)currentConsentPrivacyPolicyVersion { + return [MPConsentManager sharedManager].privacyPolicyVersion; +} + +- (NSString *)currentConsentVendorListVersion { + return [MPConsentManager sharedManager].vendorListVersion; +} + +- (NSString *)previouslyConsentedIabVendorListFormat { + return [MPConsentManager sharedManager].consentedIabVendorList; +} + +- (NSString *)previouslyConsentedPrivacyPolicyVersion { + return [MPConsentManager sharedManager].consentedPrivacyPolicyVersion; +} + +- (NSString *)previouslyConsentedVendorListVersion { + return [MPConsentManager sharedManager].consentedVendorListVersion; +} + +- (void)loadConsentDialogWithCompletion:(void (^)(NSError * _Nullable))completion { + [[MPConsentManager sharedManager] loadConsentDialogWithCompletion:completion]; +} + +- (void)showConsentDialogFromViewController:(UIViewController *)viewController completion:(void (^ _Nullable)(void))completion { + [[MPConsentManager sharedManager] showConsentDialogFromViewController:viewController completion:completion]; +} + +- (BOOL)isConsentDialogReady { + return [MPConsentManager sharedManager].isConsentDialogLoaded; +} + +- (void)revokeConsent { + [[MPConsentManager sharedManager] revokeConsent]; +} + +- (void)grantConsent { + [[MPConsentManager sharedManager] grantConsent]; +} + +- (NSURL *)currentConsentPrivacyPolicyUrl { + return [[MPConsentManager sharedManager] privacyPolicyUrl]; +} + +- (NSURL *)currentConsentPrivacyPolicyUrlWithISOLanguageCode:(NSString *)isoLanguageCode { + return [[MPConsentManager sharedManager] privacyPolicyUrlWithISOLanguageCode:isoLanguageCode]; +} + +- (NSURL *)currentConsentVendorListUrl { + return [[MPConsentManager sharedManager] vendorListUrl]; +} + +- (NSURL *)currentConsentVendorListUrlWithISOLanguageCode:(NSString *)isoLanguageCode { + return [[MPConsentManager sharedManager] vendorListUrlWithISOLanguageCode:isoLanguageCode]; +} + @end diff --git a/iphone/Maps/3party/MoPubSDK/Mopub.xcodeproj/project.pbxproj b/iphone/Maps/3party/MoPubSDK/Mopub.xcodeproj/project.pbxproj index bfb682e2db..3c54a521d7 100644 --- a/iphone/Maps/3party/MoPubSDK/Mopub.xcodeproj/project.pbxproj +++ b/iphone/Maps/3party/MoPubSDK/Mopub.xcodeproj/project.pbxproj @@ -7,168 +7,192 @@ objects = { /* Begin PBXBuildFile section */ - 34F408E51E9E1DA400E57AC0 /* FacebookBannerCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407611E9E1DA400E57AC0 /* FacebookBannerCustomEvent.m */; }; - 34F408E61E9E1DA400E57AC0 /* FacebookInterstitialCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407631E9E1DA400E57AC0 /* FacebookInterstitialCustomEvent.m */; }; - 34F408E71E9E1DA400E57AC0 /* FacebookNativeAdAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407651E9E1DA400E57AC0 /* FacebookNativeAdAdapter.m */; }; - 34F408E81E9E1DA400E57AC0 /* FacebookNativeCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407671E9E1DA400E57AC0 /* FacebookNativeCustomEvent.m */; }; - 34F408EB1E9E1DA400E57AC0 /* MPBannerAdManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4076E1E9E1DA400E57AC0 /* MPBannerAdManager.m */; }; - 34F408EC1E9E1DA400E57AC0 /* MPBannerCustomEventAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407711E9E1DA400E57AC0 /* MPBannerCustomEventAdapter.m */; }; - 34F408ED1E9E1DA400E57AC0 /* MPBaseBannerAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407731E9E1DA400E57AC0 /* MPBaseBannerAdapter.m */; }; - 34F408EE1E9E1DA400E57AC0 /* MPAdAlertGestureRecognizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407781E9E1DA400E57AC0 /* MPAdAlertGestureRecognizer.m */; }; - 34F408EF1E9E1DA400E57AC0 /* MPAdAlertManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4077A1E9E1DA400E57AC0 /* MPAdAlertManager.m */; }; - 34F408F01E9E1DA400E57AC0 /* MPActivityViewControllerHelper+TweetShare.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4077C1E9E1DA400E57AC0 /* MPActivityViewControllerHelper+TweetShare.m */; }; - 34F408F11E9E1DA400E57AC0 /* MPActivityViewControllerHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4077E1E9E1DA400E57AC0 /* MPActivityViewControllerHelper.m */; }; - 34F408F21E9E1DA400E57AC0 /* MPAdBrowserController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407801E9E1DA400E57AC0 /* MPAdBrowserController.m */; }; - 34F408F31E9E1DA400E57AC0 /* MPAdConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407831E9E1DA400E57AC0 /* MPAdConfiguration.m */; }; - 34F408F41E9E1DA400E57AC0 /* MPAdDestinationDisplayAgent.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407851E9E1DA400E57AC0 /* MPAdDestinationDisplayAgent.m */; }; - 34F408F51E9E1DA400E57AC0 /* MPAdServerCommunicator.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407871E9E1DA400E57AC0 /* MPAdServerCommunicator.m */; }; - 34F408F61E9E1DA400E57AC0 /* MPAdServerURLBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407891E9E1DA400E57AC0 /* MPAdServerURLBuilder.m */; }; - 34F408F71E9E1DA400E57AC0 /* MPAPIEndpoints.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4078B1E9E1DA400E57AC0 /* MPAPIEndpoints.m */; }; - 34F408F81E9E1DA400E57AC0 /* MPClosableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4078D1E9E1DA400E57AC0 /* MPClosableView.m */; }; - 34F408F91E9E1DA400E57AC0 /* MPCountdownTimerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4078F1E9E1DA400E57AC0 /* MPCountdownTimerView.m */; }; - 34F408FA1E9E1DA400E57AC0 /* MPEnhancedDeeplinkRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407911E9E1DA400E57AC0 /* MPEnhancedDeeplinkRequest.m */; }; - 34F408FB1E9E1DA400E57AC0 /* MPFacebookKeywordProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407931E9E1DA400E57AC0 /* MPFacebookKeywordProvider.m */; }; - 34F408FC1E9E1DA400E57AC0 /* MPLastResortDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407961E9E1DA400E57AC0 /* MPLastResortDelegate.m */; }; - 34F408FD1E9E1DA400E57AC0 /* MPProgressOverlayView.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407981E9E1DA400E57AC0 /* MPProgressOverlayView.m */; }; - 34F408FE1E9E1DA400E57AC0 /* MPURLActionInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4079A1E9E1DA400E57AC0 /* MPURLActionInfo.m */; }; - 34F408FF1E9E1DA400E57AC0 /* MPURLResolver.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4079C1E9E1DA400E57AC0 /* MPURLResolver.m */; }; - 34F409001E9E1DA400E57AC0 /* MPVideoConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4079E1E9E1DA400E57AC0 /* MPVideoConfig.m */; }; - 34F409011E9E1DA400E57AC0 /* MPXMLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407A01E9E1DA400E57AC0 /* MPXMLParser.m */; }; - 34F409021E9E1DA400E57AC0 /* MPLogEvent+NativeVideo.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407A31E9E1DA400E57AC0 /* MPLogEvent+NativeVideo.m */; }; - 34F409031E9E1DA400E57AC0 /* MPLogEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407A51E9E1DA400E57AC0 /* MPLogEvent.m */; }; - 34F409041E9E1DA400E57AC0 /* MPLogEventCommunicator.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407A71E9E1DA400E57AC0 /* MPLogEventCommunicator.m */; }; - 34F409051E9E1DA400E57AC0 /* MPLogEventRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407A91E9E1DA400E57AC0 /* MPLogEventRecorder.m */; }; - 34F409061E9E1DA400E57AC0 /* MPNetworkManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407AB1E9E1DA400E57AC0 /* MPNetworkManager.m */; }; - 34F409071E9E1DA400E57AC0 /* MPQRunLoopOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407AD1E9E1DA400E57AC0 /* MPQRunLoopOperation.m */; }; - 34F409081E9E1DA400E57AC0 /* MPRetryingHTTPOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407AF1E9E1DA400E57AC0 /* MPRetryingHTTPOperation.m */; }; - 34F409091E9E1DA400E57AC0 /* MPAdWebViewAgent.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407B21E9E1DA400E57AC0 /* MPAdWebViewAgent.m */; }; - 34F4090A1E9E1DA400E57AC0 /* MPHTMLBannerCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407B41E9E1DA400E57AC0 /* MPHTMLBannerCustomEvent.m */; }; - 34F4090B1E9E1DA400E57AC0 /* MPHTMLInterstitialCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407B61E9E1DA400E57AC0 /* MPHTMLInterstitialCustomEvent.m */; }; - 34F4090C1E9E1DA400E57AC0 /* MPHTMLInterstitialViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407B81E9E1DA400E57AC0 /* MPHTMLInterstitialViewController.m */; }; - 34F4090D1E9E1DA400E57AC0 /* MPWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407BA1E9E1DA400E57AC0 /* MPWebView.m */; }; - 34F4090E1E9E1DA400E57AC0 /* MPBaseInterstitialAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407BD1E9E1DA400E57AC0 /* MPBaseInterstitialAdapter.m */; }; - 34F4090F1E9E1DA400E57AC0 /* MPInterstitialAdManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407BF1E9E1DA400E57AC0 /* MPInterstitialAdManager.m */; }; - 34F409101E9E1DA400E57AC0 /* MPInterstitialCustomEventAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407C21E9E1DA400E57AC0 /* MPInterstitialCustomEventAdapter.m */; }; - 34F409111E9E1DA400E57AC0 /* MPInterstitialViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407C41E9E1DA400E57AC0 /* MPInterstitialViewController.m */; }; - 34F409121E9E1DA400E57AC0 /* MPCoreInstanceProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407C71E9E1DA400E57AC0 /* MPCoreInstanceProvider.m */; }; - 34F409131E9E1DA400E57AC0 /* MPInstanceProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407C91E9E1DA400E57AC0 /* MPInstanceProvider.m */; }; - 34F409141E9E1DA400E57AC0 /* MPVASTTracking.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407CB1E9E1DA400E57AC0 /* MPVASTTracking.m */; }; - 34F409151E9E1DA400E57AC0 /* MPMRAIDBannerCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407D01E9E1DA400E57AC0 /* MPMRAIDBannerCustomEvent.m */; }; - 34F409161E9E1DA400E57AC0 /* MPMRAIDInterstitialCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407D21E9E1DA400E57AC0 /* MPMRAIDInterstitialCustomEvent.m */; }; - 34F409171E9E1DA400E57AC0 /* MPMRAIDInterstitialViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407D41E9E1DA400E57AC0 /* MPMRAIDInterstitialViewController.m */; }; - 34F409181E9E1DA400E57AC0 /* MRBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407D61E9E1DA400E57AC0 /* MRBridge.m */; }; - 34F409191E9E1DA400E57AC0 /* MRBundleManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407D81E9E1DA400E57AC0 /* MRBundleManager.m */; }; - 34F4091A1E9E1DA400E57AC0 /* MRCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407DA1E9E1DA400E57AC0 /* MRCommand.m */; }; - 34F4091B1E9E1DA400E57AC0 /* MRConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407DC1E9E1DA400E57AC0 /* MRConstants.m */; }; - 34F4091C1E9E1DA400E57AC0 /* MRController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407DE1E9E1DA400E57AC0 /* MRController.m */; }; - 34F4091D1E9E1DA400E57AC0 /* MRError.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407E01E9E1DA400E57AC0 /* MRError.m */; }; - 34F4091E1E9E1DA400E57AC0 /* MRExpandModalViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407E21E9E1DA400E57AC0 /* MRExpandModalViewController.m */; }; - 34F4091F1E9E1DA400E57AC0 /* MRNativeCommandHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407E41E9E1DA400E57AC0 /* MRNativeCommandHandler.m */; }; - 34F409201E9E1DA400E57AC0 /* MRProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407E61E9E1DA400E57AC0 /* MRProperty.m */; }; - 34F409211E9E1DA400E57AC0 /* MRVideoPlayerManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407E81E9E1DA400E57AC0 /* MRVideoPlayerManager.m */; }; - 34F409221E9E1DA400E57AC0 /* NSBundle+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407EC1E9E1DA400E57AC0 /* NSBundle+MPAdditions.m */; }; - 34F409231E9E1DA400E57AC0 /* NSHTTPURLResponse+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407EE1E9E1DA400E57AC0 /* NSHTTPURLResponse+MPAdditions.m */; }; - 34F409241E9E1DA400E57AC0 /* NSJSONSerialization+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407F01E9E1DA400E57AC0 /* NSJSONSerialization+MPAdditions.m */; }; - 34F409251E9E1DA400E57AC0 /* NSURL+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407F21E9E1DA400E57AC0 /* NSURL+MPAdditions.m */; }; - 34F409261E9E1DA400E57AC0 /* UIButton+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407F41E9E1DA400E57AC0 /* UIButton+MPAdditions.m */; }; - 34F409271E9E1DA400E57AC0 /* UIColor+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407F61E9E1DA400E57AC0 /* UIColor+MPAdditions.m */; }; - 34F409281E9E1DA400E57AC0 /* UIView+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407F81E9E1DA400E57AC0 /* UIView+MPAdditions.m */; }; - 34F409291E9E1DA400E57AC0 /* UIWebView+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407FA1E9E1DA400E57AC0 /* UIWebView+MPAdditions.m */; }; - 34F4092A1E9E1DA400E57AC0 /* MPAnalyticsTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407FC1E9E1DA400E57AC0 /* MPAnalyticsTracker.m */; }; - 34F4092B1E9E1DA400E57AC0 /* MPError.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F407FE1E9E1DA400E57AC0 /* MPError.m */; }; - 34F4092C1E9E1DA400E57AC0 /* MPGeolocationProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408001E9E1DA400E57AC0 /* MPGeolocationProvider.m */; }; - 34F4092D1E9E1DA400E57AC0 /* MPGlobal.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408021E9E1DA400E57AC0 /* MPGlobal.m */; }; - 34F4092E1E9E1DA400E57AC0 /* MPIdentityProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408041E9E1DA400E57AC0 /* MPIdentityProvider.m */; }; - 34F4092F1E9E1DA400E57AC0 /* MPInternalUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408061E9E1DA400E57AC0 /* MPInternalUtils.m */; }; - 34F409301E9E1DA400E57AC0 /* MPLogging.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408081E9E1DA400E57AC0 /* MPLogging.m */; }; - 34F409311E9E1DA400E57AC0 /* MPLogProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4080A1E9E1DA400E57AC0 /* MPLogProvider.m */; }; - 34F409321E9E1DA400E57AC0 /* MPReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4080C1E9E1DA400E57AC0 /* MPReachability.m */; }; - 34F409331E9E1DA400E57AC0 /* MPSessionTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4080E1E9E1DA400E57AC0 /* MPSessionTracker.m */; }; - 34F409341E9E1DA400E57AC0 /* MPStoreKitProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408101E9E1DA400E57AC0 /* MPStoreKitProvider.m */; }; - 34F409351E9E1DA400E57AC0 /* MPTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408121E9E1DA400E57AC0 /* MPTimer.m */; }; - 34F409361E9E1DA400E57AC0 /* MPUserInteractionGestureRecognizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408141E9E1DA400E57AC0 /* MPUserInteractionGestureRecognizer.m */; }; - 34F409371E9E1DA400E57AC0 /* MPVASTAd.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408171E9E1DA400E57AC0 /* MPVASTAd.m */; }; - 34F409381E9E1DA400E57AC0 /* MPVASTCompanionAd.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408191E9E1DA400E57AC0 /* MPVASTCompanionAd.m */; }; - 34F409391E9E1DA400E57AC0 /* MPVASTCreative.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4081B1E9E1DA400E57AC0 /* MPVASTCreative.m */; }; - 34F4093A1E9E1DA400E57AC0 /* MPVASTDurationOffset.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4081D1E9E1DA400E57AC0 /* MPVASTDurationOffset.m */; }; - 34F4093B1E9E1DA400E57AC0 /* MPVASTIndustryIcon.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4081F1E9E1DA400E57AC0 /* MPVASTIndustryIcon.m */; }; - 34F4093C1E9E1DA400E57AC0 /* MPVASTInline.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408211E9E1DA400E57AC0 /* MPVASTInline.m */; }; - 34F4093D1E9E1DA400E57AC0 /* MPVASTLinearAd.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408231E9E1DA400E57AC0 /* MPVASTLinearAd.m */; }; - 34F4093E1E9E1DA400E57AC0 /* MPVASTMacroProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408251E9E1DA400E57AC0 /* MPVASTMacroProcessor.m */; }; - 34F4093F1E9E1DA400E57AC0 /* MPVASTManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408271E9E1DA400E57AC0 /* MPVASTManager.m */; }; - 34F409401E9E1DA400E57AC0 /* MPVASTMediaFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408291E9E1DA400E57AC0 /* MPVASTMediaFile.m */; }; - 34F409411E9E1DA400E57AC0 /* MPVASTModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4082B1E9E1DA400E57AC0 /* MPVASTModel.m */; }; - 34F409421E9E1DA400E57AC0 /* MPVASTResource.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4082D1E9E1DA400E57AC0 /* MPVASTResource.m */; }; - 34F409431E9E1DA400E57AC0 /* MPVASTResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4082F1E9E1DA400E57AC0 /* MPVASTResponse.m */; }; - 34F409441E9E1DA400E57AC0 /* MPVASTStringUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408311E9E1DA400E57AC0 /* MPVASTStringUtilities.m */; }; - 34F409451E9E1DA400E57AC0 /* MPVASTTrackingEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408331E9E1DA400E57AC0 /* MPVASTTrackingEvent.m */; }; - 34F409461E9E1DA400E57AC0 /* MPVASTWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408351E9E1DA400E57AC0 /* MPVASTWrapper.m */; }; - 34F409471E9E1DA400E57AC0 /* MoPub.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408381E9E1DA400E57AC0 /* MoPub.m */; }; - 34F409481E9E1DA400E57AC0 /* MPAdConversionTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4083A1E9E1DA400E57AC0 /* MPAdConversionTracker.m */; }; - 34F409491E9E1DA400E57AC0 /* MPAdView.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4083C1E9E1DA400E57AC0 /* MPAdView.m */; }; - 34F4094A1E9E1DA400E57AC0 /* MPBannerCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4083E1E9E1DA400E57AC0 /* MPBannerCustomEvent.m */; }; - 34F4094B1E9E1DA400E57AC0 /* MPConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408411E9E1DA400E57AC0 /* MPConstants.m */; }; - 34F4094C1E9E1DA400E57AC0 /* MPInterstitialAdController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408431E9E1DA400E57AC0 /* MPInterstitialAdController.m */; }; - 34F4094D1E9E1DA400E57AC0 /* MPInterstitialCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408451E9E1DA400E57AC0 /* MPInterstitialCustomEvent.m */; }; - 34F4094E1E9E1DA400E57AC0 /* MPAdPlacerInvocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4084C1E9E1DA400E57AC0 /* MPAdPlacerInvocation.m */; }; - 34F4094F1E9E1DA400E57AC0 /* MPCollectionViewAdPlacerCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4084E1E9E1DA400E57AC0 /* MPCollectionViewAdPlacerCell.m */; }; - 34F409501E9E1DA400E57AC0 /* MPDiskLRUCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408501E9E1DA400E57AC0 /* MPDiskLRUCache.m */; }; - 34F409511E9E1DA400E57AC0 /* MPImageDownloadQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408521E9E1DA400E57AC0 /* MPImageDownloadQueue.m */; }; - 34F409521E9E1DA400E57AC0 /* MPMoPubNativeAdAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408541E9E1DA400E57AC0 /* MPMoPubNativeAdAdapter.m */; }; - 34F409531E9E1DA400E57AC0 /* MPMoPubNativeCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408561E9E1DA400E57AC0 /* MPMoPubNativeCustomEvent.m */; }; - 34F409541E9E1DA400E57AC0 /* MPNativeAd+Internal.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408581E9E1DA400E57AC0 /* MPNativeAd+Internal.m */; }; - 34F409551E9E1DA400E57AC0 /* MPNativeAdRendererImageHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4085B1E9E1DA400E57AC0 /* MPNativeAdRendererImageHandler.m */; }; - 34F409561E9E1DA400E57AC0 /* MPNativeAdSourceQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4085D1E9E1DA400E57AC0 /* MPNativeAdSourceQueue.m */; }; - 34F409571E9E1DA400E57AC0 /* MPNativeAdUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4085F1E9E1DA400E57AC0 /* MPNativeAdUtils.m */; }; - 34F409581E9E1DA400E57AC0 /* MPNativeCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408611E9E1DA400E57AC0 /* MPNativeCache.m */; }; - 34F409591E9E1DA400E57AC0 /* MPNativePositionResponseDeserializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408631E9E1DA400E57AC0 /* MPNativePositionResponseDeserializer.m */; }; - 34F4095A1E9E1DA400E57AC0 /* MPNativePositionSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408651E9E1DA400E57AC0 /* MPNativePositionSource.m */; }; - 34F4095B1E9E1DA400E57AC0 /* MPNativeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408671E9E1DA400E57AC0 /* MPNativeView.m */; }; - 34F4095C1E9E1DA400E57AC0 /* MPStaticNativeAdImpressionTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408691E9E1DA400E57AC0 /* MPStaticNativeAdImpressionTimer.m */; }; - 34F4095D1E9E1DA400E57AC0 /* MPTableViewAdPlacerCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4086B1E9E1DA400E57AC0 /* MPTableViewAdPlacerCell.m */; }; - 34F4095E1E9E1DA400E57AC0 /* MPTableViewCellImpressionTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4086D1E9E1DA400E57AC0 /* MPTableViewCellImpressionTracker.m */; }; - 34F4095F1E9E1DA400E57AC0 /* MPAdPositioning.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4086F1E9E1DA400E57AC0 /* MPAdPositioning.m */; }; - 34F409601E9E1DA400E57AC0 /* MPClientAdPositioning.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408711E9E1DA400E57AC0 /* MPClientAdPositioning.m */; }; - 34F409611E9E1DA400E57AC0 /* MPCollectionViewAdPlacer.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408731E9E1DA400E57AC0 /* MPCollectionViewAdPlacer.m */; }; - 34F409621E9E1DA400E57AC0 /* MPNativeAd.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408751E9E1DA400E57AC0 /* MPNativeAd.m */; }; - 34F409631E9E1DA400E57AC0 /* MPNativeAdConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408781E9E1DA400E57AC0 /* MPNativeAdConstants.m */; }; - 34F409641E9E1DA400E57AC0 /* MPNativeAdData.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4087A1E9E1DA400E57AC0 /* MPNativeAdData.m */; }; - 34F409651E9E1DA400E57AC0 /* MPNativeAdError.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4087D1E9E1DA400E57AC0 /* MPNativeAdError.m */; }; - 34F409661E9E1DA400E57AC0 /* MPNativeAdRendererConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408801E9E1DA400E57AC0 /* MPNativeAdRendererConfiguration.m */; }; - 34F409671E9E1DA400E57AC0 /* MPNativeAdRenderingImageLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408841E9E1DA400E57AC0 /* MPNativeAdRenderingImageLoader.m */; }; - 34F409681E9E1DA400E57AC0 /* MPNativeAdRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408861E9E1DA400E57AC0 /* MPNativeAdRequest.m */; }; - 34F409691E9E1DA400E57AC0 /* MPNativeAdRequestTargeting.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408881E9E1DA400E57AC0 /* MPNativeAdRequestTargeting.m */; }; - 34F4096A1E9E1DA400E57AC0 /* MPNativeAdSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4088A1E9E1DA400E57AC0 /* MPNativeAdSource.m */; }; - 34F4096B1E9E1DA400E57AC0 /* MPNativeCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4088D1E9E1DA400E57AC0 /* MPNativeCustomEvent.m */; }; - 34F4096C1E9E1DA400E57AC0 /* MPServerAdPositioning.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408901E9E1DA400E57AC0 /* MPServerAdPositioning.m */; }; - 34F4096D1E9E1DA400E57AC0 /* MPStaticNativeAdRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408921E9E1DA400E57AC0 /* MPStaticNativeAdRenderer.m */; }; - 34F4096E1E9E1DA400E57AC0 /* MPStaticNativeAdRendererSettings.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408941E9E1DA400E57AC0 /* MPStaticNativeAdRendererSettings.m */; }; - 34F4096F1E9E1DA400E57AC0 /* MPStreamAdPlacementData.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408961E9E1DA400E57AC0 /* MPStreamAdPlacementData.m */; }; - 34F409701E9E1DA400E57AC0 /* MPStreamAdPlacer.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408981E9E1DA400E57AC0 /* MPStreamAdPlacer.m */; }; - 34F409711E9E1DA400E57AC0 /* MPTableViewAdPlacer.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4089A1E9E1DA400E57AC0 /* MPTableViewAdPlacer.m */; }; - 34F409721E9E1DA400E57AC0 /* MOPUBActivityIndicatorView.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F4089E1E9E1DA400E57AC0 /* MOPUBActivityIndicatorView.m */; }; - 34F409731E9E1DA400E57AC0 /* MOPUBAVPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408A01E9E1DA400E57AC0 /* MOPUBAVPlayer.m */; }; - 34F409741E9E1DA400E57AC0 /* MOPUBAVPlayerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408A21E9E1DA400E57AC0 /* MOPUBAVPlayerView.m */; }; - 34F409751E9E1DA400E57AC0 /* MOPUBFullscreenPlayerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408A41E9E1DA400E57AC0 /* MOPUBFullscreenPlayerViewController.m */; }; - 34F409761E9E1DA400E57AC0 /* MOPUBNativeVideoAdAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408A61E9E1DA400E57AC0 /* MOPUBNativeVideoAdAdapter.m */; }; - 34F409771E9E1DA400E57AC0 /* MOPUBNativeVideoAdConfigValues.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408A81E9E1DA400E57AC0 /* MOPUBNativeVideoAdConfigValues.m */; }; - 34F409781E9E1DA400E57AC0 /* MOPUBNativeVideoCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408AA1E9E1DA400E57AC0 /* MOPUBNativeVideoCustomEvent.m */; }; - 34F409791E9E1DA400E57AC0 /* MOPUBNativeVideoImpressionAgent.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408AC1E9E1DA400E57AC0 /* MOPUBNativeVideoImpressionAgent.m */; }; - 34F4097A1E9E1DA400E57AC0 /* MOPUBPlayerManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408AE1E9E1DA400E57AC0 /* MOPUBPlayerManager.m */; }; - 34F4097B1E9E1DA400E57AC0 /* MOPUBPlayerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408B01E9E1DA400E57AC0 /* MOPUBPlayerView.m */; }; - 34F4097C1E9E1DA400E57AC0 /* MOPUBPlayerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408B21E9E1DA400E57AC0 /* MOPUBPlayerViewController.m */; }; - 34F4097D1E9E1DA400E57AC0 /* MOPUBReplayView.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408B41E9E1DA400E57AC0 /* MOPUBReplayView.m */; }; - 34F4097E1E9E1DA400E57AC0 /* MOPUBNativeVideoAdRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408B61E9E1DA400E57AC0 /* MOPUBNativeVideoAdRenderer.m */; }; - 34F4097F1E9E1DA400E57AC0 /* MOPUBNativeVideoAdRendererSettings.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408B81E9E1DA400E57AC0 /* MOPUBNativeVideoAdRendererSettings.m */; }; - 34F409801E9E1DA400E57AC0 /* MPMoPubRewardedPlayableCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408D11E9E1DA400E57AC0 /* MPMoPubRewardedPlayableCustomEvent.m */; }; - 34F409811E9E1DA400E57AC0 /* MPMoPubRewardedVideoCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408D31E9E1DA400E57AC0 /* MPMoPubRewardedVideoCustomEvent.m */; }; - 34F409821E9E1DA400E57AC0 /* MPRewardedVideoAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408D71E9E1DA400E57AC0 /* MPRewardedVideoAdapter.m */; }; - 34F409831E9E1DA400E57AC0 /* MPRewardedVideoAdManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408D91E9E1DA400E57AC0 /* MPRewardedVideoAdManager.m */; }; - 34F409841E9E1DA400E57AC0 /* MPRewardedVideoConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408DB1E9E1DA400E57AC0 /* MPRewardedVideoConnection.m */; }; - 34F409851E9E1DA400E57AC0 /* MPRewardedVideo.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408DE1E9E1DA400E57AC0 /* MPRewardedVideo.m */; }; - 34F409861E9E1DA400E57AC0 /* MPRewardedVideoCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408E01E9E1DA400E57AC0 /* MPRewardedVideoCustomEvent.m */; }; - 34F409871E9E1DA400E57AC0 /* MPRewardedVideoError.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408E21E9E1DA400E57AC0 /* MPRewardedVideoError.m */; }; - 34F409881E9E1DA400E57AC0 /* MPRewardedVideoReward.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F408E41E9E1DA400E57AC0 /* MPRewardedVideoReward.m */; }; + 45A37AAE20B3395D005FBDBB /* MPBannerCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A378E220B33955005FBDBB /* MPBannerCustomEvent.m */; }; + 45A37AB320B3395D005FBDBB /* MPViewabilityTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A378FB20B33955005FBDBB /* MPViewabilityTracker.m */; }; + 45A37AB420B3395D005FBDBB /* MPWebView+Viewability.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A378FC20B33955005FBDBB /* MPWebView+Viewability.m */; }; + 45A37AB520B3395D005FBDBB /* MPAdView.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A378FF20B33956005FBDBB /* MPAdView.m */; }; + 45A37AB620B3395D005FBDBB /* MPMoPubConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3790220B33956005FBDBB /* MPMoPubConfiguration.m */; }; + 45A37AB720B3395D005FBDBB /* MOPUBNativeVideoAdRendererSettings.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3790420B33956005FBDBB /* MOPUBNativeVideoAdRendererSettings.m */; }; + 45A37AB820B3395D005FBDBB /* MOPUBPlayerManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3790620B33956005FBDBB /* MOPUBPlayerManager.m */; }; + 45A37AB920B3395D005FBDBB /* MOPUBNativeVideoAdAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3790920B33956005FBDBB /* MOPUBNativeVideoAdAdapter.m */; }; + 45A37ABA20B3395D005FBDBB /* MOPUBNativeVideoCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3790A20B33956005FBDBB /* MOPUBNativeVideoCustomEvent.m */; }; + 45A37ABB20B3395D005FBDBB /* MOPUBPlayerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3790C20B33956005FBDBB /* MOPUBPlayerView.m */; }; + 45A37ABC20B3395D005FBDBB /* MOPUBFullscreenPlayerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3790D20B33956005FBDBB /* MOPUBFullscreenPlayerViewController.m */; }; + 45A37ABD20B3395D005FBDBB /* MOPUBNativeVideoImpressionAgent.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3790E20B33956005FBDBB /* MOPUBNativeVideoImpressionAgent.m */; }; + 45A37ABE20B3395D005FBDBB /* MOPUBActivityIndicatorView.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3790F20B33956005FBDBB /* MOPUBActivityIndicatorView.m */; }; + 45A37ABF20B3395D005FBDBB /* MOPUBPlayerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3791020B33956005FBDBB /* MOPUBPlayerViewController.m */; }; + 45A37AC020B3395D005FBDBB /* MOPUBReplayView.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3791320B33956005FBDBB /* MOPUBReplayView.m */; }; + 45A37AC120B3395D005FBDBB /* MOPUBNativeVideoAdConfigValues.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3791520B33956005FBDBB /* MOPUBNativeVideoAdConfigValues.m */; }; + 45A37AC220B3395D005FBDBB /* MOPUBAVPlayerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3791820B33956005FBDBB /* MOPUBAVPlayerView.m */; }; + 45A37AC320B3395D005FBDBB /* MOPUBAVPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3791A20B33956005FBDBB /* MOPUBAVPlayer.m */; }; + 45A37AC420B3395D005FBDBB /* MOPUBNativeVideoAdRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3792020B33956005FBDBB /* MOPUBNativeVideoAdRenderer.m */; }; + 45A37AC520B3395D005FBDBB /* MPServerAdPositioning.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3792320B33956005FBDBB /* MPServerAdPositioning.m */; }; + 45A37AC620B3395D005FBDBB /* MPNativeCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3792420B33956005FBDBB /* MPNativeCustomEvent.m */; }; + 45A37AC720B3395D005FBDBB /* MPNativeAdRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3792520B33956005FBDBB /* MPNativeAdRequest.m */; }; + 45A37AC820B3395D005FBDBB /* MPStreamAdPlacer.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3792620B33956005FBDBB /* MPStreamAdPlacer.m */; }; + 45A37AC920B3395D005FBDBB /* MPCollectionViewAdPlacer.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3792820B33956005FBDBB /* MPCollectionViewAdPlacer.m */; }; + 45A37ACA20B3395D005FBDBB /* MPNativeAdData.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3792B20B33956005FBDBB /* MPNativeAdData.m */; }; + 45A37ACB20B3395D005FBDBB /* MPStaticNativeAdRendererSettings.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3792C20B33956005FBDBB /* MPStaticNativeAdRendererSettings.m */; }; + 45A37ACC20B3395D005FBDBB /* MPNativeAdSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3792E20B33956005FBDBB /* MPNativeAdSource.m */; }; + 45A37ACD20B3395D005FBDBB /* MPNativeAdError.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3792F20B33956005FBDBB /* MPNativeAdError.m */; }; + 45A37ACE20B3395D005FBDBB /* MPStreamAdPlacementData.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3793120B33956005FBDBB /* MPStreamAdPlacementData.m */; }; + 45A37ACF20B3395D005FBDBB /* MPNativeAd+Internal.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3793520B33956005FBDBB /* MPNativeAd+Internal.m */; }; + 45A37AD020B3395D005FBDBB /* MPNativePositionSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3793820B33957005FBDBB /* MPNativePositionSource.m */; }; + 45A37AD120B3395D005FBDBB /* MPMoPubNativeAdAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3793920B33957005FBDBB /* MPMoPubNativeAdAdapter.m */; }; + 45A37AD220B3395D005FBDBB /* MPNativeAdUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3793F20B33957005FBDBB /* MPNativeAdUtils.m */; }; + 45A37AD320B3395D005FBDBB /* MPDiskLRUCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3794220B33957005FBDBB /* MPDiskLRUCache.m */; }; + 45A37AD420B3395D005FBDBB /* MPNativePositionResponseDeserializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3794420B33957005FBDBB /* MPNativePositionResponseDeserializer.m */; }; + 45A37AD520B3395D005FBDBB /* MPImageDownloadQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3794520B33957005FBDBB /* MPImageDownloadQueue.m */; }; + 45A37AD620B3395D005FBDBB /* MPNativeAdConfigValues.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3794620B33957005FBDBB /* MPNativeAdConfigValues.m */; }; + 45A37AD720B3395D005FBDBB /* MPCollectionViewAdPlacerCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3794920B33957005FBDBB /* MPCollectionViewAdPlacerCell.m */; }; + 45A37AD820B3395D005FBDBB /* MPTableViewAdPlacerCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3794A20B33957005FBDBB /* MPTableViewAdPlacerCell.m */; }; + 45A37AD920B3395D005FBDBB /* MPNativeAdConfigValues+Internal.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3794C20B33957005FBDBB /* MPNativeAdConfigValues+Internal.m */; }; + 45A37ADA20B3395D005FBDBB /* MPAdPlacerInvocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3794D20B33957005FBDBB /* MPAdPlacerInvocation.m */; }; + 45A37ADB20B3395D005FBDBB /* MPNativeAdSourceQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3794E20B33957005FBDBB /* MPNativeAdSourceQueue.m */; }; + 45A37ADC20B3395D005FBDBB /* MPNativeAdRendererImageHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3794F20B33957005FBDBB /* MPNativeAdRendererImageHandler.m */; }; + 45A37ADD20B3395D005FBDBB /* MPNativeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3795020B33957005FBDBB /* MPNativeView.m */; }; + 45A37ADE20B3395D005FBDBB /* MPTableViewCellImpressionTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3795120B33957005FBDBB /* MPTableViewCellImpressionTracker.m */; }; + 45A37ADF20B3395D005FBDBB /* MPMoPubNativeCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3795320B33957005FBDBB /* MPMoPubNativeCustomEvent.m */; }; + 45A37AE020B3395D005FBDBB /* MPNativeCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3795520B33957005FBDBB /* MPNativeCache.m */; }; + 45A37AE120B3395D005FBDBB /* MPTableViewAdPlacer.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3795D20B33957005FBDBB /* MPTableViewAdPlacer.m */; }; + 45A37AE220B3395D005FBDBB /* MPNativeAdConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3796620B33957005FBDBB /* MPNativeAdConstants.m */; }; + 45A37AE320B3395D005FBDBB /* MPAdPositioning.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3796820B33957005FBDBB /* MPAdPositioning.m */; }; + 45A37AE420B3395D005FBDBB /* MPNativeAdRendererConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3796920B33957005FBDBB /* MPNativeAdRendererConfiguration.m */; }; + 45A37AE520B3395D005FBDBB /* MPNativeAdRenderingImageLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3796D20B33957005FBDBB /* MPNativeAdRenderingImageLoader.m */; }; + 45A37AE620B3395D005FBDBB /* MPStaticNativeAdRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3796F20B33957005FBDBB /* MPStaticNativeAdRenderer.m */; }; + 45A37AE720B3395D005FBDBB /* MPNativeAd.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3797320B33957005FBDBB /* MPNativeAd.m */; }; + 45A37AE820B3395D005FBDBB /* MPNativeAdRequestTargeting.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3797420B33957005FBDBB /* MPNativeAdRequestTargeting.m */; }; + 45A37AE920B3395D005FBDBB /* MPClientAdPositioning.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3797720B33957005FBDBB /* MPClientAdPositioning.m */; }; + 45A37AEA20B3395D005FBDBB /* MPRewardedVideo.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3799120B33957005FBDBB /* MPRewardedVideo.m */; }; + 45A37AEB20B3395D005FBDBB /* MPMoPubRewardedVideoCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3799420B33957005FBDBB /* MPMoPubRewardedVideoCustomEvent.m */; }; + 45A37AEC20B3395D005FBDBB /* MPRewardedVideoAdManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3799520B33957005FBDBB /* MPRewardedVideoAdManager.m */; }; + 45A37AED20B3395D005FBDBB /* MPRewardedVideoAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3799620B33957005FBDBB /* MPRewardedVideoAdapter.m */; }; + 45A37AEE20B3395D005FBDBB /* MPMoPubRewardedPlayableCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3799820B33957005FBDBB /* MPMoPubRewardedPlayableCustomEvent.m */; }; + 45A37AEF20B3395D005FBDBB /* MPRewardedVideoConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A3799E20B33957005FBDBB /* MPRewardedVideoConnection.m */; }; + 45A37AF020B3395D005FBDBB /* MPRewardedVideoReward.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379A120B33957005FBDBB /* MPRewardedVideoReward.m */; }; + 45A37AF120B3395D005FBDBB /* MPRewardedVideoError.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379A220B33957005FBDBB /* MPRewardedVideoError.m */; }; + 45A37AF220B3395D005FBDBB /* MPRewardedVideoCustomEvent+Caching.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379A420B33957005FBDBB /* MPRewardedVideoCustomEvent+Caching.m */; }; + 45A37AF320B3395D005FBDBB /* MPRewardedVideoCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379A520B33957005FBDBB /* MPRewardedVideoCustomEvent.m */; }; + 45A37AF420B3395D005FBDBB /* MPInterstitialAdController.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379A820B33958005FBDBB /* MPInterstitialAdController.m */; }; + 45A37AF520B3395D005FBDBB /* MPConsentChangedNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379A920B33958005FBDBB /* MPConsentChangedNotification.m */; }; + 45A37AF620B3395D005FBDBB /* MPConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379AC20B33959005FBDBB /* MPConstants.m */; }; + 45A37AF720B3395D005FBDBB /* MPAdConversionTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379B220B3395A005FBDBB /* MPAdConversionTracker.m */; }; + 45A37AF820B3395D005FBDBB /* MPInterstitialCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379B320B3395A005FBDBB /* MPInterstitialCustomEvent.m */; }; + 45A37AF920B3395D005FBDBB /* MoPub.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379B620B3395B005FBDBB /* MoPub.m */; }; + 45A37AFA20B3395D005FBDBB /* MPURLRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379BB20B3395B005FBDBB /* MPURLRequest.m */; }; + 45A37AFB20B3395D005FBDBB /* MPHTTPNetworkTaskData.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379BC20B3395B005FBDBB /* MPHTTPNetworkTaskData.m */; }; + 45A37AFC20B3395D005FBDBB /* MPBaseInterstitialAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379C020B3395B005FBDBB /* MPBaseInterstitialAdapter.m */; }; + 45A37AFD20B3395D005FBDBB /* MPInterstitialViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379C220B3395B005FBDBB /* MPInterstitialViewController.m */; }; + 45A37AFE20B3395D005FBDBB /* MPInterstitialAdManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379C820B3395B005FBDBB /* MPInterstitialAdManager.m */; }; + 45A37AFF20B3395D005FBDBB /* MPInterstitialCustomEventAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379C920B3395B005FBDBB /* MPInterstitialCustomEventAdapter.m */; }; + 45A37B0020B3395D005FBDBB /* MPVASTTracking.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379CD20B3395B005FBDBB /* MPVASTTracking.m */; }; + 45A37B0120B3395D005FBDBB /* MPHTMLInterstitialCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379D320B3395B005FBDBB /* MPHTMLInterstitialCustomEvent.m */; }; + 45A37B0220B3395D005FBDBB /* MPHTMLInterstitialViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379D420B3395B005FBDBB /* MPHTMLInterstitialViewController.m */; }; + 45A37B0320B3395D005FBDBB /* MPAdWebViewAgent.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379D520B3395B005FBDBB /* MPAdWebViewAgent.m */; }; + 45A37B0420B3395D005FBDBB /* MPWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379D620B3395B005FBDBB /* MPWebView.m */; }; + 45A37B0520B3395D005FBDBB /* MPHTMLBannerCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379D720B3395B005FBDBB /* MPHTMLBannerCustomEvent.m */; }; + 45A37B0620B3395D005FBDBB /* MPCoreInstanceProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379D920B3395B005FBDBB /* MPCoreInstanceProvider.m */; }; + 45A37B0720B3395D005FBDBB /* MPBannerAdManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379DD20B3395B005FBDBB /* MPBannerAdManager.m */; }; + 45A37B0820B3395D005FBDBB /* MPBannerCustomEvent+Internal.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379E020B3395B005FBDBB /* MPBannerCustomEvent+Internal.m */; }; + 45A37B0920B3395D005FBDBB /* MPBaseBannerAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379E120B3395B005FBDBB /* MPBaseBannerAdapter.m */; }; + 45A37B0A20B3395D005FBDBB /* MPBannerCustomEventAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379E220B3395B005FBDBB /* MPBannerCustomEventAdapter.m */; }; + 45A37B0B20B3395D005FBDBB /* MPAdDestinationDisplayAgent.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379E720B3395B005FBDBB /* MPAdDestinationDisplayAgent.m */; }; + 45A37B0C20B3395D005FBDBB /* MPAPIEndpoints.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379E820B3395B005FBDBB /* MPAPIEndpoints.m */; }; + 45A37B0D20B3395D005FBDBB /* MPAdBrowserController.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379EC20B3395B005FBDBB /* MPAdBrowserController.m */; }; + 45A37B0E20B3395D005FBDBB /* MPAdServerCommunicator.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379ED20B3395B005FBDBB /* MPAdServerCommunicator.m */; }; + 45A37B0F20B3395D005FBDBB /* MPAdConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379EE20B3395B005FBDBB /* MPAdConfiguration.m */; }; + 45A37B1020B3395D005FBDBB /* MPActivityViewControllerHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379F120B3395B005FBDBB /* MPActivityViewControllerHelper.m */; }; + 45A37B1120B3395D005FBDBB /* MPAdServerURLBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379F320B3395B005FBDBB /* MPAdServerURLBuilder.m */; }; + 45A37B1220B3395D005FBDBB /* MPLastResortDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379F520B3395B005FBDBB /* MPLastResortDelegate.m */; }; + 45A37B1320B3395D005FBDBB /* MPProgressOverlayView.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379F620B3395B005FBDBB /* MPProgressOverlayView.m */; }; + 45A37B1420B3395D005FBDBB /* MPEnhancedDeeplinkRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379F820B3395B005FBDBB /* MPEnhancedDeeplinkRequest.m */; }; + 45A37B1520B3395D005FBDBB /* MPURLActionInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379F920B3395B005FBDBB /* MPURLActionInfo.m */; }; + 45A37B1620B3395D005FBDBB /* MPClosableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379FD20B3395B005FBDBB /* MPClosableView.m */; }; + 45A37B1720B3395D005FBDBB /* MPCountdownTimerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379FE20B3395B005FBDBB /* MPCountdownTimerView.m */; }; + 45A37B1820B3395D005FBDBB /* MPRealTimeTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A379FF20B3395B005FBDBB /* MPRealTimeTimer.m */; }; + 45A37B1920B3395D005FBDBB /* MPAdAlertManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A0220B3395B005FBDBB /* MPAdAlertManager.m */; }; + 45A37B1A20B3395D005FBDBB /* MPAdAlertGestureRecognizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A0320B3395B005FBDBB /* MPAdAlertGestureRecognizer.m */; }; + 45A37B1B20B3395D005FBDBB /* MPURLResolver.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A0820B3395B005FBDBB /* MPURLResolver.m */; }; + 45A37B1C20B3395D005FBDBB /* MPVideoConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A0A20B3395B005FBDBB /* MPVideoConfig.m */; }; + 45A37B1D20B3395D005FBDBB /* MPAdImpressionTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A0B20B3395B005FBDBB /* MPAdImpressionTimer.m */; }; + 45A37B1E20B3395D005FBDBB /* MPActivityViewControllerHelper+TweetShare.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A0D20B3395B005FBDBB /* MPActivityViewControllerHelper+TweetShare.m */; }; + 45A37B1F20B3395D005FBDBB /* MPXMLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A0E20B3395B005FBDBB /* MPXMLParser.m */; }; + 45A37B2020B3395D005FBDBB /* MPConsentManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A1420B3395B005FBDBB /* MPConsentManager.m */; }; + 45A37B2120B3395D005FBDBB /* MPInstanceProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A1620B3395B005FBDBB /* MPInstanceProvider.m */; }; + 45A37B2220B3395D005FBDBB /* MPMediationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A1720B3395B005FBDBB /* MPMediationManager.m */; }; + 45A37B2320B3395D005FBDBB /* MPConsentDialogViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A1820B3395B005FBDBB /* MPConsentDialogViewController.m */; }; + 45A37B2420B3395D005FBDBB /* MPMRAIDBannerCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A1A20B3395B005FBDBB /* MPMRAIDBannerCustomEvent.m */; }; + 45A37B2520B3395D005FBDBB /* MRConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A1B20B3395B005FBDBB /* MRConstants.m */; }; + 45A37B2620B3395D005FBDBB /* MRBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A1D20B3395B005FBDBB /* MRBridge.m */; }; + 45A37B2720B3395D005FBDBB /* MRNativeCommandHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A1E20B3395B005FBDBB /* MRNativeCommandHandler.m */; }; + 45A37B2820B3395D005FBDBB /* MRVideoPlayerManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A2020B3395B005FBDBB /* MRVideoPlayerManager.m */; }; + 45A37B2920B3395D005FBDBB /* MPMRAIDInterstitialViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A2220B3395B005FBDBB /* MPMRAIDInterstitialViewController.m */; }; + 45A37B2A20B3395D005FBDBB /* MRCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A2320B3395B005FBDBB /* MRCommand.m */; }; + 45A37B2B20B3395D005FBDBB /* MPMRAIDInterstitialCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A2420B3395B005FBDBB /* MPMRAIDInterstitialCustomEvent.m */; }; + 45A37B2C20B3395D005FBDBB /* MRProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A2620B3395B005FBDBB /* MRProperty.m */; }; + 45A37B2D20B3395D005FBDBB /* MRError.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A2B20B3395B005FBDBB /* MRError.m */; }; + 45A37B2E20B3395D005FBDBB /* MRController.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A3320B3395C005FBDBB /* MRController.m */; }; + 45A37B2F20B3395D005FBDBB /* MRExpandModalViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A3420B3395C005FBDBB /* MRExpandModalViewController.m */; }; + 45A37B3020B3395D005FBDBB /* MRBundleManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A3520B3395C005FBDBB /* MRBundleManager.m */; }; + 45A37B3120B3395D005FBDBB /* MPConsentAdServerKeys.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A3620B3395C005FBDBB /* MPConsentAdServerKeys.m */; }; + 45A37B3220B3395D005FBDBB /* MPHTTPNetworkSession.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A3720B3395C005FBDBB /* MPHTTPNetworkSession.m */; }; + 45A37B3320B3395D005FBDBB /* MPAdvancedBiddingManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A3820B3395C005FBDBB /* MPAdvancedBiddingManager.m */; }; + 45A37B3420B3395D005FBDBB /* MPSessionTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A3C20B3395C005FBDBB /* MPSessionTracker.m */; }; + 45A37B3520B3395E005FBDBB /* MPLogProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A3D20B3395C005FBDBB /* MPLogProvider.m */; }; + 45A37B3620B3395E005FBDBB /* MPGlobal.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A3E20B3395C005FBDBB /* MPGlobal.m */; }; + 45A37B3720B3395E005FBDBB /* MPTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A4120B3395C005FBDBB /* MPTimer.m */; }; + 45A37B3820B3395E005FBDBB /* MPLogging.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A4220B3395C005FBDBB /* MPLogging.m */; }; + 45A37B3920B3395E005FBDBB /* MOPUBExperimentProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A4320B3395C005FBDBB /* MOPUBExperimentProvider.m */; }; + 45A37B3A20B3395E005FBDBB /* MPGeolocationProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A4620B3395C005FBDBB /* MPGeolocationProvider.m */; }; + 45A37B3B20B3395E005FBDBB /* MPReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A4720B3395C005FBDBB /* MPReachability.m */; }; + 45A37B3C20B3395E005FBDBB /* MPUserInteractionGestureRecognizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A4820B3395C005FBDBB /* MPUserInteractionGestureRecognizer.m */; }; + 45A37B3D20B3395E005FBDBB /* MPAnalyticsTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A4920B3395C005FBDBB /* MPAnalyticsTracker.m */; }; + 45A37B3E20B3395E005FBDBB /* MPIdentityProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A4A20B3395C005FBDBB /* MPIdentityProvider.m */; }; + 45A37B3F20B3395E005FBDBB /* MPInternalUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A4B20B3395C005FBDBB /* MPInternalUtils.m */; }; + 45A37B4020B3395E005FBDBB /* MPError.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A4F20B3395C005FBDBB /* MPError.m */; }; + 45A37B4120B3395E005FBDBB /* MPStoreKitProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A5020B3395C005FBDBB /* MPStoreKitProvider.m */; }; + 45A37B4220B3395E005FBDBB /* NSURL+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A5A20B3395C005FBDBB /* NSURL+MPAdditions.m */; }; + 45A37B4320B3395E005FBDBB /* UIColor+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A5B20B3395C005FBDBB /* UIColor+MPAdditions.m */; }; + 45A37B4420B3395E005FBDBB /* UIButton+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A5E20B3395C005FBDBB /* UIButton+MPAdditions.m */; }; + 45A37B4520B3395E005FBDBB /* NSBundle+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A6120B3395C005FBDBB /* NSBundle+MPAdditions.m */; }; + 45A37B4620B3395E005FBDBB /* NSHTTPURLResponse+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A6220B3395C005FBDBB /* NSHTTPURLResponse+MPAdditions.m */; }; + 45A37B4720B3395E005FBDBB /* NSString+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A6320B3395C005FBDBB /* NSString+MPAdditions.m */; }; + 45A37B4820B3395E005FBDBB /* NSJSONSerialization+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A6420B3395C005FBDBB /* NSJSONSerialization+MPAdditions.m */; }; + 45A37B4920B3395E005FBDBB /* UIWebView+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A6520B3395C005FBDBB /* UIWebView+MPAdditions.m */; }; + 45A37B4A20B3395E005FBDBB /* UIView+MPAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A6820B3395C005FBDBB /* UIView+MPAdditions.m */; }; + 45A37B4B20B3395E005FBDBB /* NSString+MPConsentStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A6C20B3395C005FBDBB /* NSString+MPConsentStatus.m */; }; + 45A37B4C20B3395E005FBDBB /* MPVASTCreative.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A7420B3395C005FBDBB /* MPVASTCreative.m */; }; + 45A37B4D20B3395E005FBDBB /* MPVASTMediaFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A7820B3395C005FBDBB /* MPVASTMediaFile.m */; }; + 45A37B4E20B3395E005FBDBB /* MPVASTAd.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A7920B3395C005FBDBB /* MPVASTAd.m */; }; + 45A37B4F20B3395E005FBDBB /* MPVASTResource.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A7D20B3395C005FBDBB /* MPVASTResource.m */; }; + 45A37B5020B3395E005FBDBB /* MPVASTModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A7E20B3395C005FBDBB /* MPVASTModel.m */; }; + 45A37B5120B3395E005FBDBB /* MPVASTWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A7F20B3395C005FBDBB /* MPVASTWrapper.m */; }; + 45A37B5220B3395E005FBDBB /* MPVASTLinearAd.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A8020B3395C005FBDBB /* MPVASTLinearAd.m */; }; + 45A37B5320B3395E005FBDBB /* MPVASTCompanionAd.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A8120B3395C005FBDBB /* MPVASTCompanionAd.m */; }; + 45A37B5420B3395E005FBDBB /* MPVASTMacroProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A8220B3395C005FBDBB /* MPVASTMacroProcessor.m */; }; + 45A37B5520B3395E005FBDBB /* MPVASTDurationOffset.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A8320B3395C005FBDBB /* MPVASTDurationOffset.m */; }; + 45A37B5620B3395E005FBDBB /* MPVASTIndustryIcon.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A8520B3395C005FBDBB /* MPVASTIndustryIcon.m */; }; + 45A37B5720B3395E005FBDBB /* MPVASTInline.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A8620B3395C005FBDBB /* MPVASTInline.m */; }; + 45A37B5820B3395E005FBDBB /* MPVASTTrackingEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A8720B3395C005FBDBB /* MPVASTTrackingEvent.m */; }; + 45A37B5920B3395E005FBDBB /* MPVASTStringUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A8A20B3395C005FBDBB /* MPVASTStringUtilities.m */; }; + 45A37B5A20B3395E005FBDBB /* MPVASTResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A8B20B3395C005FBDBB /* MPVASTResponse.m */; }; + 45A37B5B20B3395E005FBDBB /* MPVASTManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A8C20B3395C005FBDBB /* MPVASTManager.m */; }; + 45A37B5C20B3395E005FBDBB /* MPConsentChangedReason.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37A8E20B3395C005FBDBB /* MPConsentChangedReason.m */; }; + 45A37B9020B33D63005FBDBB /* FacebookNativeCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37B6B20B33D63005FBDBB /* FacebookNativeCustomEvent.m */; }; + 45A37B9120B33D63005FBDBB /* FacebookInterstitialCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37B6C20B33D63005FBDBB /* FacebookInterstitialCustomEvent.m */; }; + 45A37B9220B33D63005FBDBB /* FacebookAdvancedBidder.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37B6E20B33D63005FBDBB /* FacebookAdvancedBidder.m */; }; + 45A37B9320B33D63005FBDBB /* FacebookRewardedVideoCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37B7320B33D63005FBDBB /* FacebookRewardedVideoCustomEvent.m */; }; + 45A37B9420B33D63005FBDBB /* FacebookNativeAdAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37B7420B33D63005FBDBB /* FacebookNativeAdAdapter.m */; }; + 45A37B9520B33D63005FBDBB /* FacebookBannerCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37B7920B33D63005FBDBB /* FacebookBannerCustomEvent.m */; }; + 45A37B9620B33D63005FBDBB /* MPGoogleAdMobNativeAdAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37B8120B33D63005FBDBB /* MPGoogleAdMobNativeAdAdapter.m */; }; + 45A37B9720B33D63005FBDBB /* MPGoogleAdMobNativeCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37B8220B33D63005FBDBB /* MPGoogleAdMobNativeCustomEvent.m */; }; + 45A37B9820B33D63005FBDBB /* MPGoogleAdMobRewardedVideoCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37B8620B33D63005FBDBB /* MPGoogleAdMobRewardedVideoCustomEvent.m */; }; + 45A37B9920B33D63005FBDBB /* MPGoogleAdMobBannerCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37B8920B33D63005FBDBB /* MPGoogleAdMobBannerCustomEvent.m */; }; + 45A37B9A20B33D63005FBDBB /* MPGoogleAdMobNativeRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37B8C20B33D63005FBDBB /* MPGoogleAdMobNativeRenderer.m */; }; + 45A37B9B20B33D63005FBDBB /* UIView+MPGoogleAdMobAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37B8D20B33D63005FBDBB /* UIView+MPGoogleAdMobAdditions.m */; }; + 45A37B9C20B33D63005FBDBB /* MPGoogleAdMobInterstitialCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 45A37B8E20B33D63005FBDBB /* MPGoogleAdMobInterstitialCustomEvent.m */; }; + EBDA7B7620B35AF30054165B /* GoogleMobileAds.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EBDA7B7120B356270054165B /* GoogleMobileAds.framework */; }; + EBDA7B7720B35B0E0054165B /* FBAudienceNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 45A37BA320B33FC1005FBDBB /* FBAudienceNetwork.framework */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -184,392 +208,438 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 349CFCF620456F8C00569949 /* MPGoogleAdMobBannerCustomEvent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPGoogleAdMobBannerCustomEvent.h; sourceTree = ""; }; - 349CFCF720456F8C00569949 /* MPGoogleAdMobNativeAdAdapter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MPGoogleAdMobNativeAdAdapter.m; sourceTree = ""; }; - 349CFCF820456F8C00569949 /* MPGoogleAdMobNativeCustomEvent.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MPGoogleAdMobNativeCustomEvent.m; sourceTree = ""; }; - 349CFCF920456F8C00569949 /* UIView+MPGoogleAdMobAdditions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIView+MPGoogleAdMobAdditions.h"; sourceTree = ""; }; - 349CFCFA20456F8C00569949 /* MPGoogleAdMobNativeRenderer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPGoogleAdMobNativeRenderer.h; sourceTree = ""; }; - 349CFCFB20456F8C00569949 /* MPGoogleAdMobRewardedVideoCustomEvent.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MPGoogleAdMobRewardedVideoCustomEvent.m; sourceTree = ""; }; - 349CFCFC20456F8C00569949 /* MPGoogleAdMobInterstitialCustomEvent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPGoogleAdMobInterstitialCustomEvent.h; sourceTree = ""; }; - 349CFCFD20456F8C00569949 /* MPGoogleAdMobBannerCustomEvent.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MPGoogleAdMobBannerCustomEvent.m; sourceTree = ""; }; - 349CFCFF20456F8C00569949 /* GoogleMobileAds.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = GoogleMobileAds.framework; sourceTree = ""; }; - 349CFD0020456F8C00569949 /* MPGoogleAdMobNativeCustomEvent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPGoogleAdMobNativeCustomEvent.h; sourceTree = ""; }; - 349CFD0120456F8C00569949 /* MPGoogleAdMobNativeAdAdapter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPGoogleAdMobNativeAdAdapter.h; sourceTree = ""; }; - 349CFD0220456F8C00569949 /* MPGoogleAdMobNativeRenderer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MPGoogleAdMobNativeRenderer.m; sourceTree = ""; }; - 349CFD0320456F8C00569949 /* UIView+MPGoogleAdMobAdditions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIView+MPGoogleAdMobAdditions.m"; sourceTree = ""; }; - 349CFD0420456F8C00569949 /* MPGoogleAdMobInterstitialCustomEvent.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MPGoogleAdMobInterstitialCustomEvent.m; sourceTree = ""; }; - 349CFD0520456F8C00569949 /* MPGoogleAdMobRewardedVideoCustomEvent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPGoogleAdMobRewardedVideoCustomEvent.h; sourceTree = ""; }; 34F4074C1E9E1D3500E57AC0 /* libMopub.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMopub.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 34F407601E9E1DA400E57AC0 /* FacebookBannerCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FacebookBannerCustomEvent.h; sourceTree = ""; }; - 34F407611E9E1DA400E57AC0 /* FacebookBannerCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FacebookBannerCustomEvent.m; sourceTree = ""; }; - 34F407621E9E1DA400E57AC0 /* FacebookInterstitialCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FacebookInterstitialCustomEvent.h; sourceTree = ""; }; - 34F407631E9E1DA400E57AC0 /* FacebookInterstitialCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FacebookInterstitialCustomEvent.m; sourceTree = ""; }; - 34F407641E9E1DA400E57AC0 /* FacebookNativeAdAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FacebookNativeAdAdapter.h; sourceTree = ""; }; - 34F407651E9E1DA400E57AC0 /* FacebookNativeAdAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FacebookNativeAdAdapter.m; sourceTree = ""; }; - 34F407661E9E1DA400E57AC0 /* FacebookNativeCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FacebookNativeCustomEvent.h; sourceTree = ""; }; - 34F407671E9E1DA400E57AC0 /* FacebookNativeCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FacebookNativeCustomEvent.m; sourceTree = ""; }; - 34F407691E9E1DA400E57AC0 /* FBAudienceNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = FBAudienceNetwork.framework; sourceTree = ""; }; - 34F4076D1E9E1DA400E57AC0 /* MPBannerAdManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPBannerAdManager.h; sourceTree = ""; }; - 34F4076E1E9E1DA400E57AC0 /* MPBannerAdManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPBannerAdManager.m; sourceTree = ""; }; - 34F4076F1E9E1DA400E57AC0 /* MPBannerAdManagerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPBannerAdManagerDelegate.h; sourceTree = ""; }; - 34F407701E9E1DA400E57AC0 /* MPBannerCustomEventAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPBannerCustomEventAdapter.h; sourceTree = ""; }; - 34F407711E9E1DA400E57AC0 /* MPBannerCustomEventAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPBannerCustomEventAdapter.m; sourceTree = ""; }; - 34F407721E9E1DA400E57AC0 /* MPBaseBannerAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPBaseBannerAdapter.h; sourceTree = ""; }; - 34F407731E9E1DA400E57AC0 /* MPBaseBannerAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPBaseBannerAdapter.m; sourceTree = ""; }; - 34F407741E9E1DA400E57AC0 /* MPPrivateBannerCustomEventDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPPrivateBannerCustomEventDelegate.h; sourceTree = ""; }; - 34F407771E9E1DA400E57AC0 /* MPAdAlertGestureRecognizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAdAlertGestureRecognizer.h; sourceTree = ""; }; - 34F407781E9E1DA400E57AC0 /* MPAdAlertGestureRecognizer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAdAlertGestureRecognizer.m; sourceTree = ""; }; - 34F407791E9E1DA400E57AC0 /* MPAdAlertManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAdAlertManager.h; sourceTree = ""; }; - 34F4077A1E9E1DA400E57AC0 /* MPAdAlertManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAdAlertManager.m; sourceTree = ""; }; - 34F4077B1E9E1DA400E57AC0 /* MPActivityViewControllerHelper+TweetShare.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MPActivityViewControllerHelper+TweetShare.h"; sourceTree = ""; }; - 34F4077C1E9E1DA400E57AC0 /* MPActivityViewControllerHelper+TweetShare.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MPActivityViewControllerHelper+TweetShare.m"; sourceTree = ""; }; - 34F4077D1E9E1DA400E57AC0 /* MPActivityViewControllerHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPActivityViewControllerHelper.h; sourceTree = ""; }; - 34F4077E1E9E1DA400E57AC0 /* MPActivityViewControllerHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPActivityViewControllerHelper.m; sourceTree = ""; }; - 34F4077F1E9E1DA400E57AC0 /* MPAdBrowserController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAdBrowserController.h; sourceTree = ""; }; - 34F407801E9E1DA400E57AC0 /* MPAdBrowserController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAdBrowserController.m; sourceTree = ""; }; - 34F407811E9E1DA400E57AC0 /* MPAdBrowserController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MPAdBrowserController.xib; sourceTree = ""; }; - 34F407821E9E1DA400E57AC0 /* MPAdConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAdConfiguration.h; sourceTree = ""; }; - 34F407831E9E1DA400E57AC0 /* MPAdConfiguration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAdConfiguration.m; sourceTree = ""; }; - 34F407841E9E1DA400E57AC0 /* MPAdDestinationDisplayAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAdDestinationDisplayAgent.h; sourceTree = ""; }; - 34F407851E9E1DA400E57AC0 /* MPAdDestinationDisplayAgent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAdDestinationDisplayAgent.m; sourceTree = ""; }; - 34F407861E9E1DA400E57AC0 /* MPAdServerCommunicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAdServerCommunicator.h; sourceTree = ""; }; - 34F407871E9E1DA400E57AC0 /* MPAdServerCommunicator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAdServerCommunicator.m; sourceTree = ""; }; - 34F407881E9E1DA400E57AC0 /* MPAdServerURLBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAdServerURLBuilder.h; sourceTree = ""; }; - 34F407891E9E1DA400E57AC0 /* MPAdServerURLBuilder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAdServerURLBuilder.m; sourceTree = ""; }; - 34F4078A1E9E1DA400E57AC0 /* MPAPIEndpoints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAPIEndpoints.h; sourceTree = ""; }; - 34F4078B1E9E1DA400E57AC0 /* MPAPIEndpoints.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAPIEndpoints.m; sourceTree = ""; }; - 34F4078C1E9E1DA400E57AC0 /* MPClosableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPClosableView.h; sourceTree = ""; }; - 34F4078D1E9E1DA400E57AC0 /* MPClosableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPClosableView.m; sourceTree = ""; }; - 34F4078E1E9E1DA400E57AC0 /* MPCountdownTimerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPCountdownTimerView.h; sourceTree = ""; }; - 34F4078F1E9E1DA400E57AC0 /* MPCountdownTimerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPCountdownTimerView.m; sourceTree = ""; }; - 34F407901E9E1DA400E57AC0 /* MPEnhancedDeeplinkRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPEnhancedDeeplinkRequest.h; sourceTree = ""; }; - 34F407911E9E1DA400E57AC0 /* MPEnhancedDeeplinkRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPEnhancedDeeplinkRequest.m; sourceTree = ""; }; - 34F407921E9E1DA400E57AC0 /* MPFacebookKeywordProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPFacebookKeywordProvider.h; sourceTree = ""; }; - 34F407931E9E1DA400E57AC0 /* MPFacebookKeywordProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPFacebookKeywordProvider.m; sourceTree = ""; }; - 34F407941E9E1DA400E57AC0 /* MPKeywordProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPKeywordProvider.h; sourceTree = ""; }; - 34F407951E9E1DA400E57AC0 /* MPLastResortDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPLastResortDelegate.h; sourceTree = ""; }; - 34F407961E9E1DA400E57AC0 /* MPLastResortDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPLastResortDelegate.m; sourceTree = ""; }; - 34F407971E9E1DA400E57AC0 /* MPProgressOverlayView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPProgressOverlayView.h; sourceTree = ""; }; - 34F407981E9E1DA400E57AC0 /* MPProgressOverlayView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPProgressOverlayView.m; sourceTree = ""; }; - 34F407991E9E1DA400E57AC0 /* MPURLActionInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPURLActionInfo.h; sourceTree = ""; }; - 34F4079A1E9E1DA400E57AC0 /* MPURLActionInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPURLActionInfo.m; sourceTree = ""; }; - 34F4079B1E9E1DA400E57AC0 /* MPURLResolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPURLResolver.h; sourceTree = ""; }; - 34F4079C1E9E1DA400E57AC0 /* MPURLResolver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPURLResolver.m; sourceTree = ""; }; - 34F4079D1E9E1DA400E57AC0 /* MPVideoConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVideoConfig.h; sourceTree = ""; }; - 34F4079E1E9E1DA400E57AC0 /* MPVideoConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVideoConfig.m; sourceTree = ""; }; - 34F4079F1E9E1DA400E57AC0 /* MPXMLParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPXMLParser.h; sourceTree = ""; }; - 34F407A01E9E1DA400E57AC0 /* MPXMLParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPXMLParser.m; sourceTree = ""; }; - 34F407A21E9E1DA400E57AC0 /* MPLogEvent+NativeVideo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MPLogEvent+NativeVideo.h"; sourceTree = ""; }; - 34F407A31E9E1DA400E57AC0 /* MPLogEvent+NativeVideo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MPLogEvent+NativeVideo.m"; sourceTree = ""; }; - 34F407A41E9E1DA400E57AC0 /* MPLogEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPLogEvent.h; sourceTree = ""; }; - 34F407A51E9E1DA400E57AC0 /* MPLogEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPLogEvent.m; sourceTree = ""; }; - 34F407A61E9E1DA400E57AC0 /* MPLogEventCommunicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPLogEventCommunicator.h; sourceTree = ""; }; - 34F407A71E9E1DA400E57AC0 /* MPLogEventCommunicator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPLogEventCommunicator.m; sourceTree = ""; }; - 34F407A81E9E1DA400E57AC0 /* MPLogEventRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPLogEventRecorder.h; sourceTree = ""; }; - 34F407A91E9E1DA400E57AC0 /* MPLogEventRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPLogEventRecorder.m; sourceTree = ""; }; - 34F407AA1E9E1DA400E57AC0 /* MPNetworkManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNetworkManager.h; sourceTree = ""; }; - 34F407AB1E9E1DA400E57AC0 /* MPNetworkManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNetworkManager.m; sourceTree = ""; }; - 34F407AC1E9E1DA400E57AC0 /* MPQRunLoopOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPQRunLoopOperation.h; sourceTree = ""; }; - 34F407AD1E9E1DA400E57AC0 /* MPQRunLoopOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPQRunLoopOperation.m; sourceTree = ""; }; - 34F407AE1E9E1DA400E57AC0 /* MPRetryingHTTPOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPRetryingHTTPOperation.h; sourceTree = ""; }; - 34F407AF1E9E1DA400E57AC0 /* MPRetryingHTTPOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPRetryingHTTPOperation.m; sourceTree = ""; }; - 34F407B11E9E1DA400E57AC0 /* MPAdWebViewAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAdWebViewAgent.h; sourceTree = ""; }; - 34F407B21E9E1DA400E57AC0 /* MPAdWebViewAgent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAdWebViewAgent.m; sourceTree = ""; }; - 34F407B31E9E1DA400E57AC0 /* MPHTMLBannerCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPHTMLBannerCustomEvent.h; sourceTree = ""; }; - 34F407B41E9E1DA400E57AC0 /* MPHTMLBannerCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPHTMLBannerCustomEvent.m; sourceTree = ""; }; - 34F407B51E9E1DA400E57AC0 /* MPHTMLInterstitialCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPHTMLInterstitialCustomEvent.h; sourceTree = ""; }; - 34F407B61E9E1DA400E57AC0 /* MPHTMLInterstitialCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPHTMLInterstitialCustomEvent.m; sourceTree = ""; }; - 34F407B71E9E1DA400E57AC0 /* MPHTMLInterstitialViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPHTMLInterstitialViewController.h; sourceTree = ""; }; - 34F407B81E9E1DA400E57AC0 /* MPHTMLInterstitialViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPHTMLInterstitialViewController.m; sourceTree = ""; }; - 34F407B91E9E1DA400E57AC0 /* MPWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPWebView.h; sourceTree = ""; }; - 34F407BA1E9E1DA400E57AC0 /* MPWebView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPWebView.m; sourceTree = ""; }; - 34F407BC1E9E1DA400E57AC0 /* MPBaseInterstitialAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPBaseInterstitialAdapter.h; sourceTree = ""; }; - 34F407BD1E9E1DA400E57AC0 /* MPBaseInterstitialAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPBaseInterstitialAdapter.m; sourceTree = ""; }; - 34F407BE1E9E1DA400E57AC0 /* MPInterstitialAdManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPInterstitialAdManager.h; sourceTree = ""; }; - 34F407BF1E9E1DA400E57AC0 /* MPInterstitialAdManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPInterstitialAdManager.m; sourceTree = ""; }; - 34F407C01E9E1DA400E57AC0 /* MPInterstitialAdManagerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPInterstitialAdManagerDelegate.h; sourceTree = ""; }; - 34F407C11E9E1DA400E57AC0 /* MPInterstitialCustomEventAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPInterstitialCustomEventAdapter.h; sourceTree = ""; }; - 34F407C21E9E1DA400E57AC0 /* MPInterstitialCustomEventAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPInterstitialCustomEventAdapter.m; sourceTree = ""; }; - 34F407C31E9E1DA400E57AC0 /* MPInterstitialViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPInterstitialViewController.h; sourceTree = ""; }; - 34F407C41E9E1DA400E57AC0 /* MPInterstitialViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPInterstitialViewController.m; sourceTree = ""; }; - 34F407C51E9E1DA400E57AC0 /* MPPrivateInterstitialCustomEventDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPPrivateInterstitialCustomEventDelegate.h; sourceTree = ""; }; - 34F407C61E9E1DA400E57AC0 /* MPCoreInstanceProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPCoreInstanceProvider.h; sourceTree = ""; }; - 34F407C71E9E1DA400E57AC0 /* MPCoreInstanceProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPCoreInstanceProvider.m; sourceTree = ""; }; - 34F407C81E9E1DA400E57AC0 /* MPInstanceProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPInstanceProvider.h; sourceTree = ""; }; - 34F407C91E9E1DA400E57AC0 /* MPInstanceProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPInstanceProvider.m; sourceTree = ""; }; - 34F407CA1E9E1DA400E57AC0 /* MPVASTTracking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTTracking.h; sourceTree = ""; }; - 34F407CB1E9E1DA400E57AC0 /* MPVASTTracking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTTracking.m; sourceTree = ""; }; - 34F407CD1E9E1DA400E57AC0 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; - 34F407CE1E9E1DA400E57AC0 /* MPForceableOrientationProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPForceableOrientationProtocol.h; sourceTree = ""; }; - 34F407CF1E9E1DA400E57AC0 /* MPMRAIDBannerCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPMRAIDBannerCustomEvent.h; sourceTree = ""; }; - 34F407D01E9E1DA400E57AC0 /* MPMRAIDBannerCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPMRAIDBannerCustomEvent.m; sourceTree = ""; }; - 34F407D11E9E1DA400E57AC0 /* MPMRAIDInterstitialCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPMRAIDInterstitialCustomEvent.h; sourceTree = ""; }; - 34F407D21E9E1DA400E57AC0 /* MPMRAIDInterstitialCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPMRAIDInterstitialCustomEvent.m; sourceTree = ""; }; - 34F407D31E9E1DA400E57AC0 /* MPMRAIDInterstitialViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPMRAIDInterstitialViewController.h; sourceTree = ""; }; - 34F407D41E9E1DA400E57AC0 /* MPMRAIDInterstitialViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPMRAIDInterstitialViewController.m; sourceTree = ""; }; - 34F407D51E9E1DA400E57AC0 /* MRBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MRBridge.h; sourceTree = ""; }; - 34F407D61E9E1DA400E57AC0 /* MRBridge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MRBridge.m; sourceTree = ""; }; - 34F407D71E9E1DA400E57AC0 /* MRBundleManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MRBundleManager.h; sourceTree = ""; }; - 34F407D81E9E1DA400E57AC0 /* MRBundleManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MRBundleManager.m; sourceTree = ""; }; - 34F407D91E9E1DA400E57AC0 /* MRCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MRCommand.h; sourceTree = ""; }; - 34F407DA1E9E1DA400E57AC0 /* MRCommand.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MRCommand.m; sourceTree = ""; }; - 34F407DB1E9E1DA400E57AC0 /* MRConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MRConstants.h; sourceTree = ""; }; - 34F407DC1E9E1DA400E57AC0 /* MRConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MRConstants.m; sourceTree = ""; }; - 34F407DD1E9E1DA400E57AC0 /* MRController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MRController.h; sourceTree = ""; }; - 34F407DE1E9E1DA400E57AC0 /* MRController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MRController.m; sourceTree = ""; }; - 34F407DF1E9E1DA400E57AC0 /* MRError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MRError.h; sourceTree = ""; }; - 34F407E01E9E1DA400E57AC0 /* MRError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MRError.m; sourceTree = ""; }; - 34F407E11E9E1DA400E57AC0 /* MRExpandModalViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MRExpandModalViewController.h; sourceTree = ""; }; - 34F407E21E9E1DA400E57AC0 /* MRExpandModalViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MRExpandModalViewController.m; sourceTree = ""; }; - 34F407E31E9E1DA400E57AC0 /* MRNativeCommandHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MRNativeCommandHandler.h; sourceTree = ""; }; - 34F407E41E9E1DA400E57AC0 /* MRNativeCommandHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MRNativeCommandHandler.m; sourceTree = ""; }; - 34F407E51E9E1DA400E57AC0 /* MRProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MRProperty.h; sourceTree = ""; }; - 34F407E61E9E1DA400E57AC0 /* MRProperty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MRProperty.m; sourceTree = ""; }; - 34F407E71E9E1DA400E57AC0 /* MRVideoPlayerManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MRVideoPlayerManager.h; sourceTree = ""; }; - 34F407E81E9E1DA400E57AC0 /* MRVideoPlayerManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MRVideoPlayerManager.m; sourceTree = ""; }; - 34F407EB1E9E1DA400E57AC0 /* NSBundle+MPAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSBundle+MPAdditions.h"; sourceTree = ""; }; - 34F407EC1E9E1DA400E57AC0 /* NSBundle+MPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSBundle+MPAdditions.m"; sourceTree = ""; }; - 34F407ED1E9E1DA400E57AC0 /* NSHTTPURLResponse+MPAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSHTTPURLResponse+MPAdditions.h"; sourceTree = ""; }; - 34F407EE1E9E1DA400E57AC0 /* NSHTTPURLResponse+MPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSHTTPURLResponse+MPAdditions.m"; sourceTree = ""; }; - 34F407EF1E9E1DA400E57AC0 /* NSJSONSerialization+MPAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSJSONSerialization+MPAdditions.h"; sourceTree = ""; }; - 34F407F01E9E1DA400E57AC0 /* NSJSONSerialization+MPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSJSONSerialization+MPAdditions.m"; sourceTree = ""; }; - 34F407F11E9E1DA400E57AC0 /* NSURL+MPAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSURL+MPAdditions.h"; sourceTree = ""; }; - 34F407F21E9E1DA400E57AC0 /* NSURL+MPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSURL+MPAdditions.m"; sourceTree = ""; }; - 34F407F31E9E1DA400E57AC0 /* UIButton+MPAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIButton+MPAdditions.h"; sourceTree = ""; }; - 34F407F41E9E1DA400E57AC0 /* UIButton+MPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIButton+MPAdditions.m"; sourceTree = ""; }; - 34F407F51E9E1DA400E57AC0 /* UIColor+MPAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIColor+MPAdditions.h"; sourceTree = ""; }; - 34F407F61E9E1DA400E57AC0 /* UIColor+MPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIColor+MPAdditions.m"; sourceTree = ""; }; - 34F407F71E9E1DA400E57AC0 /* UIView+MPAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+MPAdditions.h"; sourceTree = ""; }; - 34F407F81E9E1DA400E57AC0 /* UIView+MPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+MPAdditions.m"; sourceTree = ""; }; - 34F407F91E9E1DA400E57AC0 /* UIWebView+MPAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIWebView+MPAdditions.h"; sourceTree = ""; }; - 34F407FA1E9E1DA400E57AC0 /* UIWebView+MPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIWebView+MPAdditions.m"; sourceTree = ""; }; - 34F407FB1E9E1DA400E57AC0 /* MPAnalyticsTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAnalyticsTracker.h; sourceTree = ""; }; - 34F407FC1E9E1DA400E57AC0 /* MPAnalyticsTracker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAnalyticsTracker.m; sourceTree = ""; }; - 34F407FD1E9E1DA400E57AC0 /* MPError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPError.h; sourceTree = ""; }; - 34F407FE1E9E1DA400E57AC0 /* MPError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPError.m; sourceTree = ""; }; - 34F407FF1E9E1DA400E57AC0 /* MPGeolocationProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPGeolocationProvider.h; sourceTree = ""; }; - 34F408001E9E1DA400E57AC0 /* MPGeolocationProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPGeolocationProvider.m; sourceTree = ""; }; - 34F408011E9E1DA400E57AC0 /* MPGlobal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPGlobal.h; sourceTree = ""; }; - 34F408021E9E1DA400E57AC0 /* MPGlobal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPGlobal.m; sourceTree = ""; }; - 34F408031E9E1DA400E57AC0 /* MPIdentityProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPIdentityProvider.h; sourceTree = ""; }; - 34F408041E9E1DA400E57AC0 /* MPIdentityProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPIdentityProvider.m; sourceTree = ""; }; - 34F408051E9E1DA400E57AC0 /* MPInternalUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPInternalUtils.h; sourceTree = ""; }; - 34F408061E9E1DA400E57AC0 /* MPInternalUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPInternalUtils.m; sourceTree = ""; }; - 34F408071E9E1DA400E57AC0 /* MPLogging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPLogging.h; sourceTree = ""; }; - 34F408081E9E1DA400E57AC0 /* MPLogging.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPLogging.m; sourceTree = ""; }; - 34F408091E9E1DA400E57AC0 /* MPLogProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPLogProvider.h; sourceTree = ""; }; - 34F4080A1E9E1DA400E57AC0 /* MPLogProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPLogProvider.m; sourceTree = ""; }; - 34F4080B1E9E1DA400E57AC0 /* MPReachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPReachability.h; sourceTree = ""; }; - 34F4080C1E9E1DA400E57AC0 /* MPReachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPReachability.m; sourceTree = ""; }; - 34F4080D1E9E1DA400E57AC0 /* MPSessionTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPSessionTracker.h; sourceTree = ""; }; - 34F4080E1E9E1DA400E57AC0 /* MPSessionTracker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPSessionTracker.m; sourceTree = ""; }; - 34F4080F1E9E1DA400E57AC0 /* MPStoreKitProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPStoreKitProvider.h; sourceTree = ""; }; - 34F408101E9E1DA400E57AC0 /* MPStoreKitProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPStoreKitProvider.m; sourceTree = ""; }; - 34F408111E9E1DA400E57AC0 /* MPTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPTimer.h; sourceTree = ""; }; - 34F408121E9E1DA400E57AC0 /* MPTimer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPTimer.m; sourceTree = ""; }; - 34F408131E9E1DA400E57AC0 /* MPUserInteractionGestureRecognizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPUserInteractionGestureRecognizer.h; sourceTree = ""; }; - 34F408141E9E1DA400E57AC0 /* MPUserInteractionGestureRecognizer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPUserInteractionGestureRecognizer.m; sourceTree = ""; }; - 34F408161E9E1DA400E57AC0 /* MPVASTAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTAd.h; sourceTree = ""; }; - 34F408171E9E1DA400E57AC0 /* MPVASTAd.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTAd.m; sourceTree = ""; }; - 34F408181E9E1DA400E57AC0 /* MPVASTCompanionAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTCompanionAd.h; sourceTree = ""; }; - 34F408191E9E1DA400E57AC0 /* MPVASTCompanionAd.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTCompanionAd.m; sourceTree = ""; }; - 34F4081A1E9E1DA400E57AC0 /* MPVASTCreative.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTCreative.h; sourceTree = ""; }; - 34F4081B1E9E1DA400E57AC0 /* MPVASTCreative.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTCreative.m; sourceTree = ""; }; - 34F4081C1E9E1DA400E57AC0 /* MPVASTDurationOffset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTDurationOffset.h; sourceTree = ""; }; - 34F4081D1E9E1DA400E57AC0 /* MPVASTDurationOffset.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTDurationOffset.m; sourceTree = ""; }; - 34F4081E1E9E1DA400E57AC0 /* MPVASTIndustryIcon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTIndustryIcon.h; sourceTree = ""; }; - 34F4081F1E9E1DA400E57AC0 /* MPVASTIndustryIcon.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTIndustryIcon.m; sourceTree = ""; }; - 34F408201E9E1DA400E57AC0 /* MPVASTInline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTInline.h; sourceTree = ""; }; - 34F408211E9E1DA400E57AC0 /* MPVASTInline.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTInline.m; sourceTree = ""; }; - 34F408221E9E1DA400E57AC0 /* MPVASTLinearAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTLinearAd.h; sourceTree = ""; }; - 34F408231E9E1DA400E57AC0 /* MPVASTLinearAd.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTLinearAd.m; sourceTree = ""; }; - 34F408241E9E1DA400E57AC0 /* MPVASTMacroProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTMacroProcessor.h; sourceTree = ""; }; - 34F408251E9E1DA400E57AC0 /* MPVASTMacroProcessor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTMacroProcessor.m; sourceTree = ""; }; - 34F408261E9E1DA400E57AC0 /* MPVASTManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTManager.h; sourceTree = ""; }; - 34F408271E9E1DA400E57AC0 /* MPVASTManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTManager.m; sourceTree = ""; }; - 34F408281E9E1DA400E57AC0 /* MPVASTMediaFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTMediaFile.h; sourceTree = ""; }; - 34F408291E9E1DA400E57AC0 /* MPVASTMediaFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTMediaFile.m; sourceTree = ""; }; - 34F4082A1E9E1DA400E57AC0 /* MPVASTModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTModel.h; sourceTree = ""; }; - 34F4082B1E9E1DA400E57AC0 /* MPVASTModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTModel.m; sourceTree = ""; }; - 34F4082C1E9E1DA400E57AC0 /* MPVASTResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTResource.h; sourceTree = ""; }; - 34F4082D1E9E1DA400E57AC0 /* MPVASTResource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTResource.m; sourceTree = ""; }; - 34F4082E1E9E1DA400E57AC0 /* MPVASTResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTResponse.h; sourceTree = ""; }; - 34F4082F1E9E1DA400E57AC0 /* MPVASTResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTResponse.m; sourceTree = ""; }; - 34F408301E9E1DA400E57AC0 /* MPVASTStringUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTStringUtilities.h; sourceTree = ""; }; - 34F408311E9E1DA400E57AC0 /* MPVASTStringUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTStringUtilities.m; sourceTree = ""; }; - 34F408321E9E1DA400E57AC0 /* MPVASTTrackingEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTTrackingEvent.h; sourceTree = ""; }; - 34F408331E9E1DA400E57AC0 /* MPVASTTrackingEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTTrackingEvent.m; sourceTree = ""; }; - 34F408341E9E1DA400E57AC0 /* MPVASTWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTWrapper.h; sourceTree = ""; }; - 34F408351E9E1DA400E57AC0 /* MPVASTWrapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTWrapper.m; sourceTree = ""; }; - 34F408361E9E1DA400E57AC0 /* MoPub-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MoPub-Bridging-Header.h"; sourceTree = ""; }; - 34F408371E9E1DA400E57AC0 /* MoPub.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MoPub.h; sourceTree = ""; }; - 34F408381E9E1DA400E57AC0 /* MoPub.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MoPub.m; sourceTree = ""; }; - 34F408391E9E1DA400E57AC0 /* MPAdConversionTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAdConversionTracker.h; sourceTree = ""; }; - 34F4083A1E9E1DA400E57AC0 /* MPAdConversionTracker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAdConversionTracker.m; sourceTree = ""; }; - 34F4083B1E9E1DA400E57AC0 /* MPAdView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAdView.h; sourceTree = ""; }; - 34F4083C1E9E1DA400E57AC0 /* MPAdView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAdView.m; sourceTree = ""; }; - 34F4083D1E9E1DA400E57AC0 /* MPBannerCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPBannerCustomEvent.h; sourceTree = ""; }; - 34F4083E1E9E1DA400E57AC0 /* MPBannerCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPBannerCustomEvent.m; sourceTree = ""; }; - 34F4083F1E9E1DA400E57AC0 /* MPBannerCustomEventDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPBannerCustomEventDelegate.h; sourceTree = ""; }; - 34F408401E9E1DA400E57AC0 /* MPConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPConstants.h; sourceTree = ""; }; - 34F408411E9E1DA400E57AC0 /* MPConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPConstants.m; sourceTree = ""; }; - 34F408421E9E1DA400E57AC0 /* MPInterstitialAdController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPInterstitialAdController.h; sourceTree = ""; }; - 34F408431E9E1DA400E57AC0 /* MPInterstitialAdController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPInterstitialAdController.m; sourceTree = ""; }; - 34F408441E9E1DA400E57AC0 /* MPInterstitialCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPInterstitialCustomEvent.h; sourceTree = ""; }; - 34F408451E9E1DA400E57AC0 /* MPInterstitialCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPInterstitialCustomEvent.m; sourceTree = ""; }; - 34F408461E9E1DA400E57AC0 /* MPInterstitialCustomEventDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPInterstitialCustomEventDelegate.h; sourceTree = ""; }; - 34F4084A1E9E1DA400E57AC0 /* MPNativeAdRequest+MPNativeAdSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MPNativeAdRequest+MPNativeAdSource.h"; sourceTree = ""; }; - 34F4084B1E9E1DA400E57AC0 /* MPAdPlacerInvocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAdPlacerInvocation.h; sourceTree = ""; }; - 34F4084C1E9E1DA400E57AC0 /* MPAdPlacerInvocation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAdPlacerInvocation.m; sourceTree = ""; }; - 34F4084D1E9E1DA400E57AC0 /* MPCollectionViewAdPlacerCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPCollectionViewAdPlacerCell.h; sourceTree = ""; }; - 34F4084E1E9E1DA400E57AC0 /* MPCollectionViewAdPlacerCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPCollectionViewAdPlacerCell.m; sourceTree = ""; }; - 34F4084F1E9E1DA400E57AC0 /* MPDiskLRUCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPDiskLRUCache.h; sourceTree = ""; }; - 34F408501E9E1DA400E57AC0 /* MPDiskLRUCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPDiskLRUCache.m; sourceTree = ""; }; - 34F408511E9E1DA400E57AC0 /* MPImageDownloadQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPImageDownloadQueue.h; sourceTree = ""; }; - 34F408521E9E1DA400E57AC0 /* MPImageDownloadQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPImageDownloadQueue.m; sourceTree = ""; }; - 34F408531E9E1DA400E57AC0 /* MPMoPubNativeAdAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPMoPubNativeAdAdapter.h; sourceTree = ""; }; - 34F408541E9E1DA400E57AC0 /* MPMoPubNativeAdAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPMoPubNativeAdAdapter.m; sourceTree = ""; }; - 34F408551E9E1DA400E57AC0 /* MPMoPubNativeCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPMoPubNativeCustomEvent.h; sourceTree = ""; }; - 34F408561E9E1DA400E57AC0 /* MPMoPubNativeCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPMoPubNativeCustomEvent.m; sourceTree = ""; }; - 34F408571E9E1DA400E57AC0 /* MPNativeAd+Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MPNativeAd+Internal.h"; sourceTree = ""; }; - 34F408581E9E1DA400E57AC0 /* MPNativeAd+Internal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MPNativeAd+Internal.m"; sourceTree = ""; }; - 34F408591E9E1DA400E57AC0 /* MPNativeAdRendererConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdRendererConstants.h; sourceTree = ""; }; - 34F4085A1E9E1DA400E57AC0 /* MPNativeAdRendererImageHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdRendererImageHandler.h; sourceTree = ""; }; - 34F4085B1E9E1DA400E57AC0 /* MPNativeAdRendererImageHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeAdRendererImageHandler.m; sourceTree = ""; }; - 34F4085C1E9E1DA400E57AC0 /* MPNativeAdSourceQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdSourceQueue.h; sourceTree = ""; }; - 34F4085D1E9E1DA400E57AC0 /* MPNativeAdSourceQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeAdSourceQueue.m; sourceTree = ""; }; - 34F4085E1E9E1DA400E57AC0 /* MPNativeAdUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdUtils.h; sourceTree = ""; }; - 34F4085F1E9E1DA400E57AC0 /* MPNativeAdUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeAdUtils.m; sourceTree = ""; }; - 34F408601E9E1DA400E57AC0 /* MPNativeCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeCache.h; sourceTree = ""; }; - 34F408611E9E1DA400E57AC0 /* MPNativeCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeCache.m; sourceTree = ""; }; - 34F408621E9E1DA400E57AC0 /* MPNativePositionResponseDeserializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativePositionResponseDeserializer.h; sourceTree = ""; }; - 34F408631E9E1DA400E57AC0 /* MPNativePositionResponseDeserializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativePositionResponseDeserializer.m; sourceTree = ""; }; - 34F408641E9E1DA400E57AC0 /* MPNativePositionSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativePositionSource.h; sourceTree = ""; }; - 34F408651E9E1DA400E57AC0 /* MPNativePositionSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativePositionSource.m; sourceTree = ""; }; - 34F408661E9E1DA400E57AC0 /* MPNativeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeView.h; sourceTree = ""; }; - 34F408671E9E1DA400E57AC0 /* MPNativeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeView.m; sourceTree = ""; }; - 34F408681E9E1DA400E57AC0 /* MPStaticNativeAdImpressionTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPStaticNativeAdImpressionTimer.h; sourceTree = ""; }; - 34F408691E9E1DA400E57AC0 /* MPStaticNativeAdImpressionTimer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPStaticNativeAdImpressionTimer.m; sourceTree = ""; }; - 34F4086A1E9E1DA400E57AC0 /* MPTableViewAdPlacerCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPTableViewAdPlacerCell.h; sourceTree = ""; }; - 34F4086B1E9E1DA400E57AC0 /* MPTableViewAdPlacerCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPTableViewAdPlacerCell.m; sourceTree = ""; }; - 34F4086C1E9E1DA400E57AC0 /* MPTableViewCellImpressionTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPTableViewCellImpressionTracker.h; sourceTree = ""; }; - 34F4086D1E9E1DA400E57AC0 /* MPTableViewCellImpressionTracker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPTableViewCellImpressionTracker.m; sourceTree = ""; }; - 34F4086E1E9E1DA400E57AC0 /* MPAdPositioning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAdPositioning.h; sourceTree = ""; }; - 34F4086F1E9E1DA400E57AC0 /* MPAdPositioning.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAdPositioning.m; sourceTree = ""; }; - 34F408701E9E1DA400E57AC0 /* MPClientAdPositioning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPClientAdPositioning.h; sourceTree = ""; }; - 34F408711E9E1DA400E57AC0 /* MPClientAdPositioning.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPClientAdPositioning.m; sourceTree = ""; }; - 34F408721E9E1DA400E57AC0 /* MPCollectionViewAdPlacer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPCollectionViewAdPlacer.h; sourceTree = ""; }; - 34F408731E9E1DA400E57AC0 /* MPCollectionViewAdPlacer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPCollectionViewAdPlacer.m; sourceTree = ""; }; - 34F408741E9E1DA400E57AC0 /* MPNativeAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAd.h; sourceTree = ""; }; - 34F408751E9E1DA400E57AC0 /* MPNativeAd.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeAd.m; sourceTree = ""; }; - 34F408761E9E1DA400E57AC0 /* MPNativeAdAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdAdapter.h; sourceTree = ""; }; - 34F408771E9E1DA400E57AC0 /* MPNativeAdConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdConstants.h; sourceTree = ""; }; - 34F408781E9E1DA400E57AC0 /* MPNativeAdConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeAdConstants.m; sourceTree = ""; }; - 34F408791E9E1DA400E57AC0 /* MPNativeAdData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdData.h; sourceTree = ""; }; - 34F4087A1E9E1DA400E57AC0 /* MPNativeAdData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeAdData.m; sourceTree = ""; }; - 34F4087B1E9E1DA400E57AC0 /* MPNativeAdDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdDelegate.h; sourceTree = ""; }; - 34F4087C1E9E1DA400E57AC0 /* MPNativeAdError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdError.h; sourceTree = ""; }; - 34F4087D1E9E1DA400E57AC0 /* MPNativeAdError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeAdError.m; sourceTree = ""; }; - 34F4087E1E9E1DA400E57AC0 /* MPNativeAdRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdRenderer.h; sourceTree = ""; }; - 34F4087F1E9E1DA400E57AC0 /* MPNativeAdRendererConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdRendererConfiguration.h; sourceTree = ""; }; - 34F408801E9E1DA400E57AC0 /* MPNativeAdRendererConfiguration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeAdRendererConfiguration.m; sourceTree = ""; }; - 34F408811E9E1DA400E57AC0 /* MPNativeAdRendererSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdRendererSettings.h; sourceTree = ""; }; - 34F408821E9E1DA400E57AC0 /* MPNativeAdRendering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdRendering.h; sourceTree = ""; }; - 34F408831E9E1DA400E57AC0 /* MPNativeAdRenderingImageLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdRenderingImageLoader.h; sourceTree = ""; }; - 34F408841E9E1DA400E57AC0 /* MPNativeAdRenderingImageLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeAdRenderingImageLoader.m; sourceTree = ""; }; - 34F408851E9E1DA400E57AC0 /* MPNativeAdRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdRequest.h; sourceTree = ""; }; - 34F408861E9E1DA400E57AC0 /* MPNativeAdRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeAdRequest.m; sourceTree = ""; }; - 34F408871E9E1DA400E57AC0 /* MPNativeAdRequestTargeting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdRequestTargeting.h; sourceTree = ""; }; - 34F408881E9E1DA400E57AC0 /* MPNativeAdRequestTargeting.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeAdRequestTargeting.m; sourceTree = ""; }; - 34F408891E9E1DA400E57AC0 /* MPNativeAdSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdSource.h; sourceTree = ""; }; - 34F4088A1E9E1DA400E57AC0 /* MPNativeAdSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeAdSource.m; sourceTree = ""; }; - 34F4088B1E9E1DA400E57AC0 /* MPNativeAdSourceDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdSourceDelegate.h; sourceTree = ""; }; - 34F4088C1E9E1DA400E57AC0 /* MPNativeCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeCustomEvent.h; sourceTree = ""; }; - 34F4088D1E9E1DA400E57AC0 /* MPNativeCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeCustomEvent.m; sourceTree = ""; }; - 34F4088E1E9E1DA400E57AC0 /* MPNativeCustomEventDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeCustomEventDelegate.h; sourceTree = ""; }; - 34F4088F1E9E1DA400E57AC0 /* MPServerAdPositioning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPServerAdPositioning.h; sourceTree = ""; }; - 34F408901E9E1DA400E57AC0 /* MPServerAdPositioning.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPServerAdPositioning.m; sourceTree = ""; }; - 34F408911E9E1DA400E57AC0 /* MPStaticNativeAdRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPStaticNativeAdRenderer.h; sourceTree = ""; }; - 34F408921E9E1DA400E57AC0 /* MPStaticNativeAdRenderer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPStaticNativeAdRenderer.m; sourceTree = ""; }; - 34F408931E9E1DA400E57AC0 /* MPStaticNativeAdRendererSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPStaticNativeAdRendererSettings.h; sourceTree = ""; }; - 34F408941E9E1DA400E57AC0 /* MPStaticNativeAdRendererSettings.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPStaticNativeAdRendererSettings.m; sourceTree = ""; }; - 34F408951E9E1DA400E57AC0 /* MPStreamAdPlacementData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPStreamAdPlacementData.h; sourceTree = ""; }; - 34F408961E9E1DA400E57AC0 /* MPStreamAdPlacementData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPStreamAdPlacementData.m; sourceTree = ""; }; - 34F408971E9E1DA400E57AC0 /* MPStreamAdPlacer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPStreamAdPlacer.h; sourceTree = ""; }; - 34F408981E9E1DA400E57AC0 /* MPStreamAdPlacer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPStreamAdPlacer.m; sourceTree = ""; }; - 34F408991E9E1DA400E57AC0 /* MPTableViewAdPlacer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPTableViewAdPlacer.h; sourceTree = ""; }; - 34F4089A1E9E1DA400E57AC0 /* MPTableViewAdPlacer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPTableViewAdPlacer.m; sourceTree = ""; }; - 34F4089D1E9E1DA400E57AC0 /* MOPUBActivityIndicatorView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBActivityIndicatorView.h; sourceTree = ""; }; - 34F4089E1E9E1DA400E57AC0 /* MOPUBActivityIndicatorView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBActivityIndicatorView.m; sourceTree = ""; }; - 34F4089F1E9E1DA400E57AC0 /* MOPUBAVPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBAVPlayer.h; sourceTree = ""; }; - 34F408A01E9E1DA400E57AC0 /* MOPUBAVPlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBAVPlayer.m; sourceTree = ""; }; - 34F408A11E9E1DA400E57AC0 /* MOPUBAVPlayerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBAVPlayerView.h; sourceTree = ""; }; - 34F408A21E9E1DA400E57AC0 /* MOPUBAVPlayerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBAVPlayerView.m; sourceTree = ""; }; - 34F408A31E9E1DA400E57AC0 /* MOPUBFullscreenPlayerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBFullscreenPlayerViewController.h; sourceTree = ""; }; - 34F408A41E9E1DA400E57AC0 /* MOPUBFullscreenPlayerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBFullscreenPlayerViewController.m; sourceTree = ""; }; - 34F408A51E9E1DA400E57AC0 /* MOPUBNativeVideoAdAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBNativeVideoAdAdapter.h; sourceTree = ""; }; - 34F408A61E9E1DA400E57AC0 /* MOPUBNativeVideoAdAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBNativeVideoAdAdapter.m; sourceTree = ""; }; - 34F408A71E9E1DA400E57AC0 /* MOPUBNativeVideoAdConfigValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBNativeVideoAdConfigValues.h; sourceTree = ""; }; - 34F408A81E9E1DA400E57AC0 /* MOPUBNativeVideoAdConfigValues.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBNativeVideoAdConfigValues.m; sourceTree = ""; }; - 34F408A91E9E1DA400E57AC0 /* MOPUBNativeVideoCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBNativeVideoCustomEvent.h; sourceTree = ""; }; - 34F408AA1E9E1DA400E57AC0 /* MOPUBNativeVideoCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBNativeVideoCustomEvent.m; sourceTree = ""; }; - 34F408AB1E9E1DA400E57AC0 /* MOPUBNativeVideoImpressionAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBNativeVideoImpressionAgent.h; sourceTree = ""; }; - 34F408AC1E9E1DA400E57AC0 /* MOPUBNativeVideoImpressionAgent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBNativeVideoImpressionAgent.m; sourceTree = ""; }; - 34F408AD1E9E1DA400E57AC0 /* MOPUBPlayerManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBPlayerManager.h; sourceTree = ""; }; - 34F408AE1E9E1DA400E57AC0 /* MOPUBPlayerManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBPlayerManager.m; sourceTree = ""; }; - 34F408AF1E9E1DA400E57AC0 /* MOPUBPlayerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBPlayerView.h; sourceTree = ""; }; - 34F408B01E9E1DA400E57AC0 /* MOPUBPlayerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBPlayerView.m; sourceTree = ""; }; - 34F408B11E9E1DA400E57AC0 /* MOPUBPlayerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBPlayerViewController.h; sourceTree = ""; }; - 34F408B21E9E1DA400E57AC0 /* MOPUBPlayerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBPlayerViewController.m; sourceTree = ""; }; - 34F408B31E9E1DA400E57AC0 /* MOPUBReplayView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBReplayView.h; sourceTree = ""; }; - 34F408B41E9E1DA400E57AC0 /* MOPUBReplayView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBReplayView.m; sourceTree = ""; }; - 34F408B51E9E1DA400E57AC0 /* MOPUBNativeVideoAdRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBNativeVideoAdRenderer.h; sourceTree = ""; }; - 34F408B61E9E1DA400E57AC0 /* MOPUBNativeVideoAdRenderer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBNativeVideoAdRenderer.m; sourceTree = ""; }; - 34F408B71E9E1DA400E57AC0 /* MOPUBNativeVideoAdRendererSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBNativeVideoAdRendererSettings.h; sourceTree = ""; }; - 34F408B81E9E1DA400E57AC0 /* MOPUBNativeVideoAdRendererSettings.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBNativeVideoAdRendererSettings.m; sourceTree = ""; }; - 34F408BA1E9E1DA400E57AC0 /* MPCloseBtn.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = MPCloseBtn.png; sourceTree = ""; }; - 34F408BB1E9E1DA400E57AC0 /* MPCloseBtn@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPCloseBtn@2x.png"; sourceTree = ""; }; - 34F408BC1E9E1DA400E57AC0 /* MPCloseBtn@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPCloseBtn@3x.png"; sourceTree = ""; }; - 34F408BD1E9E1DA400E57AC0 /* MPCloseButtonX.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = MPCloseButtonX.png; sourceTree = ""; }; - 34F408BE1E9E1DA400E57AC0 /* MPCloseButtonX@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPCloseButtonX@2x.png"; sourceTree = ""; }; - 34F408BF1E9E1DA400E57AC0 /* MPCloseButtonX@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPCloseButtonX@3x.png"; sourceTree = ""; }; - 34F408C01E9E1DA400E57AC0 /* MPCountdownTimer.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = MPCountdownTimer.html; sourceTree = ""; }; - 34F408C11E9E1DA400E57AC0 /* MPDAAIcon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = MPDAAIcon.png; sourceTree = ""; }; - 34F408C21E9E1DA400E57AC0 /* MPDAAIcon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPDAAIcon@2x.png"; sourceTree = ""; }; - 34F408C31E9E1DA400E57AC0 /* MPDAAIcon@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPDAAIcon@3x.png"; sourceTree = ""; }; - 34F408C41E9E1DA400E57AC0 /* MPMutedBtn.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = MPMutedBtn.png; sourceTree = ""; }; - 34F408C51E9E1DA400E57AC0 /* MPMutedBtn@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPMutedBtn@2x.png"; sourceTree = ""; }; - 34F408C61E9E1DA400E57AC0 /* MPMutedBtn@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPMutedBtn@3x.png"; sourceTree = ""; }; - 34F408C71E9E1DA400E57AC0 /* MPPlayBtn.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = MPPlayBtn.png; sourceTree = ""; }; - 34F408C81E9E1DA400E57AC0 /* MPPlayBtn@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPPlayBtn@2x.png"; sourceTree = ""; }; - 34F408C91E9E1DA400E57AC0 /* MPPlayBtn@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPPlayBtn@3x.png"; sourceTree = ""; }; - 34F408CA1E9E1DA400E57AC0 /* MPUnmutedBtn.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = MPUnmutedBtn.png; sourceTree = ""; }; - 34F408CB1E9E1DA400E57AC0 /* MPUnmutedBtn@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPUnmutedBtn@2x.png"; sourceTree = ""; }; - 34F408CC1E9E1DA400E57AC0 /* MPUnmutedBtn@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPUnmutedBtn@3x.png"; sourceTree = ""; }; - 34F408CD1E9E1DA400E57AC0 /* MRAID.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = MRAID.bundle; sourceTree = ""; }; - 34F408D01E9E1DA400E57AC0 /* MPMoPubRewardedPlayableCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPMoPubRewardedPlayableCustomEvent.h; sourceTree = ""; }; - 34F408D11E9E1DA400E57AC0 /* MPMoPubRewardedPlayableCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPMoPubRewardedPlayableCustomEvent.m; sourceTree = ""; }; - 34F408D21E9E1DA400E57AC0 /* MPMoPubRewardedVideoCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPMoPubRewardedVideoCustomEvent.h; sourceTree = ""; }; - 34F408D31E9E1DA400E57AC0 /* MPMoPubRewardedVideoCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPMoPubRewardedVideoCustomEvent.m; sourceTree = ""; }; - 34F408D41E9E1DA400E57AC0 /* MPPrivateRewardedVideoCustomEventDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPPrivateRewardedVideoCustomEventDelegate.h; sourceTree = ""; }; - 34F408D51E9E1DA400E57AC0 /* MPRewardedVideo+Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MPRewardedVideo+Internal.h"; sourceTree = ""; }; - 34F408D61E9E1DA400E57AC0 /* MPRewardedVideoAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPRewardedVideoAdapter.h; sourceTree = ""; }; - 34F408D71E9E1DA400E57AC0 /* MPRewardedVideoAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPRewardedVideoAdapter.m; sourceTree = ""; }; - 34F408D81E9E1DA400E57AC0 /* MPRewardedVideoAdManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPRewardedVideoAdManager.h; sourceTree = ""; }; - 34F408D91E9E1DA400E57AC0 /* MPRewardedVideoAdManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPRewardedVideoAdManager.m; sourceTree = ""; }; - 34F408DA1E9E1DA400E57AC0 /* MPRewardedVideoConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPRewardedVideoConnection.h; sourceTree = ""; }; - 34F408DB1E9E1DA400E57AC0 /* MPRewardedVideoConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPRewardedVideoConnection.m; sourceTree = ""; }; - 34F408DC1E9E1DA400E57AC0 /* MPMediationSettingsProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPMediationSettingsProtocol.h; sourceTree = ""; }; - 34F408DD1E9E1DA400E57AC0 /* MPRewardedVideo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPRewardedVideo.h; sourceTree = ""; }; - 34F408DE1E9E1DA400E57AC0 /* MPRewardedVideo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPRewardedVideo.m; sourceTree = ""; }; - 34F408DF1E9E1DA400E57AC0 /* MPRewardedVideoCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPRewardedVideoCustomEvent.h; sourceTree = ""; }; - 34F408E01E9E1DA400E57AC0 /* MPRewardedVideoCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPRewardedVideoCustomEvent.m; sourceTree = ""; }; - 34F408E11E9E1DA400E57AC0 /* MPRewardedVideoError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPRewardedVideoError.h; sourceTree = ""; }; - 34F408E21E9E1DA400E57AC0 /* MPRewardedVideoError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPRewardedVideoError.m; sourceTree = ""; }; - 34F408E31E9E1DA400E57AC0 /* MPRewardedVideoReward.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPRewardedVideoReward.h; sourceTree = ""; }; - 34F408E41E9E1DA400E57AC0 /* MPRewardedVideoReward.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPRewardedVideoReward.m; sourceTree = ""; }; 34F4098E1E9E27DB00E57AC0 /* common-debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "common-debug.xcconfig"; path = "../../../../xcode/common-debug.xcconfig"; sourceTree = ""; }; 34F4098F1E9E27DB00E57AC0 /* common-release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "common-release.xcconfig"; path = "../../../../xcode/common-release.xcconfig"; sourceTree = ""; }; + 45A378E220B33955005FBDBB /* MPBannerCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPBannerCustomEvent.m; sourceTree = ""; }; + 45A378E320B33955005FBDBB /* MPMediationSdkInitializable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPMediationSdkInitializable.h; sourceTree = ""; }; + 45A378F820B33955005FBDBB /* MPViewabilityTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPViewabilityTracker.h; sourceTree = ""; }; + 45A378F920B33955005FBDBB /* MPViewabilityOption.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPViewabilityOption.h; sourceTree = ""; }; + 45A378FA20B33955005FBDBB /* MPWebView+Viewability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MPWebView+Viewability.h"; sourceTree = ""; }; + 45A378FB20B33955005FBDBB /* MPViewabilityTracker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPViewabilityTracker.m; sourceTree = ""; }; + 45A378FC20B33955005FBDBB /* MPWebView+Viewability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MPWebView+Viewability.m"; sourceTree = ""; }; + 45A378FD20B33955005FBDBB /* MPViewabilityAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPViewabilityAdapter.h; sourceTree = ""; }; + 45A378FE20B33955005FBDBB /* MoPub.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MoPub.h; sourceTree = ""; }; + 45A378FF20B33956005FBDBB /* MPAdView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAdView.m; sourceTree = ""; }; + 45A3790020B33956005FBDBB /* MPConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPConstants.h; sourceTree = ""; }; + 45A3790120B33956005FBDBB /* MPMediationSettingsProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPMediationSettingsProtocol.h; sourceTree = ""; }; + 45A3790220B33956005FBDBB /* MPMoPubConfiguration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPMoPubConfiguration.m; sourceTree = ""; }; + 45A3790420B33956005FBDBB /* MOPUBNativeVideoAdRendererSettings.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBNativeVideoAdRendererSettings.m; sourceTree = ""; }; + 45A3790620B33956005FBDBB /* MOPUBPlayerManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBPlayerManager.m; sourceTree = ""; }; + 45A3790720B33956005FBDBB /* MOPUBNativeVideoAdConfigValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBNativeVideoAdConfigValues.h; sourceTree = ""; }; + 45A3790820B33956005FBDBB /* MOPUBReplayView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBReplayView.h; sourceTree = ""; }; + 45A3790920B33956005FBDBB /* MOPUBNativeVideoAdAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBNativeVideoAdAdapter.m; sourceTree = ""; }; + 45A3790A20B33956005FBDBB /* MOPUBNativeVideoCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBNativeVideoCustomEvent.m; sourceTree = ""; }; + 45A3790B20B33956005FBDBB /* MOPUBAVPlayerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBAVPlayerView.h; sourceTree = ""; }; + 45A3790C20B33956005FBDBB /* MOPUBPlayerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBPlayerView.m; sourceTree = ""; }; + 45A3790D20B33956005FBDBB /* MOPUBFullscreenPlayerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBFullscreenPlayerViewController.m; sourceTree = ""; }; + 45A3790E20B33956005FBDBB /* MOPUBNativeVideoImpressionAgent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBNativeVideoImpressionAgent.m; sourceTree = ""; }; + 45A3790F20B33956005FBDBB /* MOPUBActivityIndicatorView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBActivityIndicatorView.m; sourceTree = ""; }; + 45A3791020B33956005FBDBB /* MOPUBPlayerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBPlayerViewController.m; sourceTree = ""; }; + 45A3791120B33956005FBDBB /* MOPUBAVPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBAVPlayer.h; sourceTree = ""; }; + 45A3791220B33956005FBDBB /* MOPUBPlayerManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBPlayerManager.h; sourceTree = ""; }; + 45A3791320B33956005FBDBB /* MOPUBReplayView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBReplayView.m; sourceTree = ""; }; + 45A3791420B33956005FBDBB /* MOPUBNativeVideoAdAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBNativeVideoAdAdapter.h; sourceTree = ""; }; + 45A3791520B33956005FBDBB /* MOPUBNativeVideoAdConfigValues.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBNativeVideoAdConfigValues.m; sourceTree = ""; }; + 45A3791620B33956005FBDBB /* MOPUBFullscreenPlayerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBFullscreenPlayerViewController.h; sourceTree = ""; }; + 45A3791720B33956005FBDBB /* MOPUBPlayerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBPlayerView.h; sourceTree = ""; }; + 45A3791820B33956005FBDBB /* MOPUBAVPlayerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBAVPlayerView.m; sourceTree = ""; }; + 45A3791920B33956005FBDBB /* MOPUBNativeVideoCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBNativeVideoCustomEvent.h; sourceTree = ""; }; + 45A3791A20B33956005FBDBB /* MOPUBAVPlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBAVPlayer.m; sourceTree = ""; }; + 45A3791B20B33956005FBDBB /* MOPUBPlayerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBPlayerViewController.h; sourceTree = ""; }; + 45A3791C20B33956005FBDBB /* MOPUBActivityIndicatorView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBActivityIndicatorView.h; sourceTree = ""; }; + 45A3791D20B33956005FBDBB /* MOPUBNativeVideoImpressionAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBNativeVideoImpressionAgent.h; sourceTree = ""; }; + 45A3791E20B33956005FBDBB /* MOPUBNativeVideoAdRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBNativeVideoAdRenderer.h; sourceTree = ""; }; + 45A3791F20B33956005FBDBB /* MOPUBNativeVideoAdRendererSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBNativeVideoAdRendererSettings.h; sourceTree = ""; }; + 45A3792020B33956005FBDBB /* MOPUBNativeVideoAdRenderer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBNativeVideoAdRenderer.m; sourceTree = ""; }; + 45A3792120B33956005FBDBB /* MPAdView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAdView.h; sourceTree = ""; }; + 45A3792320B33956005FBDBB /* MPServerAdPositioning.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPServerAdPositioning.m; sourceTree = ""; }; + 45A3792420B33956005FBDBB /* MPNativeCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeCustomEvent.m; sourceTree = ""; }; + 45A3792520B33956005FBDBB /* MPNativeAdRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeAdRequest.m; sourceTree = ""; }; + 45A3792620B33956005FBDBB /* MPStreamAdPlacer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPStreamAdPlacer.m; sourceTree = ""; }; + 45A3792720B33956005FBDBB /* MPNativeAdRendererConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdRendererConfiguration.h; sourceTree = ""; }; + 45A3792820B33956005FBDBB /* MPCollectionViewAdPlacer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPCollectionViewAdPlacer.m; sourceTree = ""; }; + 45A3792920B33956005FBDBB /* MPAdPositioning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAdPositioning.h; sourceTree = ""; }; + 45A3792A20B33956005FBDBB /* MPNativeAdConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdConstants.h; sourceTree = ""; }; + 45A3792B20B33956005FBDBB /* MPNativeAdData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeAdData.m; sourceTree = ""; }; + 45A3792C20B33956005FBDBB /* MPStaticNativeAdRendererSettings.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPStaticNativeAdRendererSettings.m; sourceTree = ""; }; + 45A3792D20B33956005FBDBB /* MPNativeAdAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdAdapter.h; sourceTree = ""; }; + 45A3792E20B33956005FBDBB /* MPNativeAdSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeAdSource.m; sourceTree = ""; }; + 45A3792F20B33956005FBDBB /* MPNativeAdError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeAdError.m; sourceTree = ""; }; + 45A3793020B33956005FBDBB /* MPStaticNativeAdRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPStaticNativeAdRenderer.h; sourceTree = ""; }; + 45A3793120B33956005FBDBB /* MPStreamAdPlacementData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPStreamAdPlacementData.m; sourceTree = ""; }; + 45A3793220B33956005FBDBB /* MPNativeCustomEventDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeCustomEventDelegate.h; sourceTree = ""; }; + 45A3793320B33956005FBDBB /* MPNativeAdRenderingImageLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdRenderingImageLoader.h; sourceTree = ""; }; + 45A3793520B33956005FBDBB /* MPNativeAd+Internal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MPNativeAd+Internal.m"; sourceTree = ""; }; + 45A3793620B33956005FBDBB /* MPTableViewAdPlacerCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPTableViewAdPlacerCell.h; sourceTree = ""; }; + 45A3793720B33957005FBDBB /* MPCollectionViewAdPlacerCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPCollectionViewAdPlacerCell.h; sourceTree = ""; }; + 45A3793820B33957005FBDBB /* MPNativePositionSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativePositionSource.m; sourceTree = ""; }; + 45A3793920B33957005FBDBB /* MPMoPubNativeAdAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPMoPubNativeAdAdapter.m; sourceTree = ""; }; + 45A3793A20B33957005FBDBB /* MPNativeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeView.h; sourceTree = ""; }; + 45A3793B20B33957005FBDBB /* MPNativeAdRendererImageHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdRendererImageHandler.h; sourceTree = ""; }; + 45A3793C20B33957005FBDBB /* MPAdPlacerInvocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAdPlacerInvocation.h; sourceTree = ""; }; + 45A3793D20B33957005FBDBB /* MPNativeAdSourceQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdSourceQueue.h; sourceTree = ""; }; + 45A3793E20B33957005FBDBB /* MPNativeAdConfigValues+Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MPNativeAdConfigValues+Internal.h"; sourceTree = ""; }; + 45A3793F20B33957005FBDBB /* MPNativeAdUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeAdUtils.m; sourceTree = ""; }; + 45A3794020B33957005FBDBB /* MPNativeCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeCache.h; sourceTree = ""; }; + 45A3794120B33957005FBDBB /* MPMoPubNativeCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPMoPubNativeCustomEvent.h; sourceTree = ""; }; + 45A3794220B33957005FBDBB /* MPDiskLRUCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPDiskLRUCache.m; sourceTree = ""; }; + 45A3794320B33957005FBDBB /* MPTableViewCellImpressionTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPTableViewCellImpressionTracker.h; sourceTree = ""; }; + 45A3794420B33957005FBDBB /* MPNativePositionResponseDeserializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativePositionResponseDeserializer.m; sourceTree = ""; }; + 45A3794520B33957005FBDBB /* MPImageDownloadQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPImageDownloadQueue.m; sourceTree = ""; }; + 45A3794620B33957005FBDBB /* MPNativeAdConfigValues.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeAdConfigValues.m; sourceTree = ""; }; + 45A3794720B33957005FBDBB /* MPMoPubNativeAdAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPMoPubNativeAdAdapter.h; sourceTree = ""; }; + 45A3794820B33957005FBDBB /* MPNativePositionSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativePositionSource.h; sourceTree = ""; }; + 45A3794920B33957005FBDBB /* MPCollectionViewAdPlacerCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPCollectionViewAdPlacerCell.m; sourceTree = ""; }; + 45A3794A20B33957005FBDBB /* MPTableViewAdPlacerCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPTableViewAdPlacerCell.m; sourceTree = ""; }; + 45A3794B20B33957005FBDBB /* MPNativeAd+Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MPNativeAd+Internal.h"; sourceTree = ""; }; + 45A3794C20B33957005FBDBB /* MPNativeAdConfigValues+Internal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MPNativeAdConfigValues+Internal.m"; sourceTree = ""; }; + 45A3794D20B33957005FBDBB /* MPAdPlacerInvocation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAdPlacerInvocation.m; sourceTree = ""; }; + 45A3794E20B33957005FBDBB /* MPNativeAdSourceQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeAdSourceQueue.m; sourceTree = ""; }; + 45A3794F20B33957005FBDBB /* MPNativeAdRendererImageHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeAdRendererImageHandler.m; sourceTree = ""; }; + 45A3795020B33957005FBDBB /* MPNativeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeView.m; sourceTree = ""; }; + 45A3795120B33957005FBDBB /* MPTableViewCellImpressionTracker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPTableViewCellImpressionTracker.m; sourceTree = ""; }; + 45A3795220B33957005FBDBB /* MPDiskLRUCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPDiskLRUCache.h; sourceTree = ""; }; + 45A3795320B33957005FBDBB /* MPMoPubNativeCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPMoPubNativeCustomEvent.m; sourceTree = ""; }; + 45A3795420B33957005FBDBB /* MPNativeAdRendererConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdRendererConstants.h; sourceTree = ""; }; + 45A3795520B33957005FBDBB /* MPNativeCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeCache.m; sourceTree = ""; }; + 45A3795620B33957005FBDBB /* MPNativeAdUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdUtils.h; sourceTree = ""; }; + 45A3795720B33957005FBDBB /* MPNativeAdConfigValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdConfigValues.h; sourceTree = ""; }; + 45A3795920B33957005FBDBB /* MPNativeAdRequest+MPNativeAdSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MPNativeAdRequest+MPNativeAdSource.h"; sourceTree = ""; }; + 45A3795A20B33957005FBDBB /* MPImageDownloadQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPImageDownloadQueue.h; sourceTree = ""; }; + 45A3795B20B33957005FBDBB /* MPNativePositionResponseDeserializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativePositionResponseDeserializer.h; sourceTree = ""; }; + 45A3795C20B33957005FBDBB /* MPClientAdPositioning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPClientAdPositioning.h; sourceTree = ""; }; + 45A3795D20B33957005FBDBB /* MPTableViewAdPlacer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPTableViewAdPlacer.m; sourceTree = ""; }; + 45A3795E20B33957005FBDBB /* MPNativeAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAd.h; sourceTree = ""; }; + 45A3795F20B33957005FBDBB /* MPNativeAdRequestTargeting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdRequestTargeting.h; sourceTree = ""; }; + 45A3796020B33957005FBDBB /* MPNativeCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeCustomEvent.h; sourceTree = ""; }; + 45A3796120B33957005FBDBB /* MPNativeAdSourceDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdSourceDelegate.h; sourceTree = ""; }; + 45A3796220B33957005FBDBB /* MPNativeAdRendererSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdRendererSettings.h; sourceTree = ""; }; + 45A3796320B33957005FBDBB /* MPNativeAdRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdRenderer.h; sourceTree = ""; }; + 45A3796420B33957005FBDBB /* MPServerAdPositioning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPServerAdPositioning.h; sourceTree = ""; }; + 45A3796520B33957005FBDBB /* MPNativeAdData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdData.h; sourceTree = ""; }; + 45A3796620B33957005FBDBB /* MPNativeAdConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeAdConstants.m; sourceTree = ""; }; + 45A3796720B33957005FBDBB /* MPCollectionViewAdPlacer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPCollectionViewAdPlacer.h; sourceTree = ""; }; + 45A3796820B33957005FBDBB /* MPAdPositioning.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAdPositioning.m; sourceTree = ""; }; + 45A3796920B33957005FBDBB /* MPNativeAdRendererConfiguration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeAdRendererConfiguration.m; sourceTree = ""; }; + 45A3796A20B33957005FBDBB /* MPStreamAdPlacer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPStreamAdPlacer.h; sourceTree = ""; }; + 45A3796B20B33957005FBDBB /* MPNativeAdRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdRequest.h; sourceTree = ""; }; + 45A3796C20B33957005FBDBB /* MPNativeAdDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdDelegate.h; sourceTree = ""; }; + 45A3796D20B33957005FBDBB /* MPNativeAdRenderingImageLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeAdRenderingImageLoader.m; sourceTree = ""; }; + 45A3796E20B33957005FBDBB /* MPStreamAdPlacementData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPStreamAdPlacementData.h; sourceTree = ""; }; + 45A3796F20B33957005FBDBB /* MPStaticNativeAdRenderer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPStaticNativeAdRenderer.m; sourceTree = ""; }; + 45A3797020B33957005FBDBB /* MPNativeAdSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdSource.h; sourceTree = ""; }; + 45A3797120B33957005FBDBB /* MPNativeAdError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdError.h; sourceTree = ""; }; + 45A3797220B33957005FBDBB /* MPStaticNativeAdRendererSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPStaticNativeAdRendererSettings.h; sourceTree = ""; }; + 45A3797320B33957005FBDBB /* MPNativeAd.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeAd.m; sourceTree = ""; }; + 45A3797420B33957005FBDBB /* MPNativeAdRequestTargeting.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPNativeAdRequestTargeting.m; sourceTree = ""; }; + 45A3797520B33957005FBDBB /* MPNativeAdRendering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPNativeAdRendering.h; sourceTree = ""; }; + 45A3797620B33957005FBDBB /* MPTableViewAdPlacer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPTableViewAdPlacer.h; sourceTree = ""; }; + 45A3797720B33957005FBDBB /* MPClientAdPositioning.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPClientAdPositioning.m; sourceTree = ""; }; + 45A3797820B33957005FBDBB /* MPAdConversionTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAdConversionTracker.h; sourceTree = ""; }; + 45A3797A20B33957005FBDBB /* MPUnmutedBtn.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = MPUnmutedBtn.png; sourceTree = ""; }; + 45A3797B20B33957005FBDBB /* MRAID.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = MRAID.bundle; sourceTree = ""; }; + 45A3797C20B33957005FBDBB /* MPDAAIcon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = MPDAAIcon.png; sourceTree = ""; }; + 45A3797D20B33957005FBDBB /* MPUnmutedBtn@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPUnmutedBtn@3x.png"; sourceTree = ""; }; + 45A3797E20B33957005FBDBB /* MPPlayBtn@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPPlayBtn@2x.png"; sourceTree = ""; }; + 45A3797F20B33957005FBDBB /* MPCloseBtn@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPCloseBtn@2x.png"; sourceTree = ""; }; + 45A3798020B33957005FBDBB /* MPCloseBtn@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPCloseBtn@3x.png"; sourceTree = ""; }; + 45A3798120B33957005FBDBB /* MPCloseBtn.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = MPCloseBtn.png; sourceTree = ""; }; + 45A3798220B33957005FBDBB /* MPPlayBtn@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPPlayBtn@3x.png"; sourceTree = ""; }; + 45A3798320B33957005FBDBB /* MPUnmutedBtn@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPUnmutedBtn@2x.png"; sourceTree = ""; }; + 45A3798420B33957005FBDBB /* MPCountdownTimer.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = MPCountdownTimer.html; sourceTree = ""; }; + 45A3798520B33957005FBDBB /* MPCloseButtonX@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPCloseButtonX@2x.png"; sourceTree = ""; }; + 45A3798620B33957005FBDBB /* MPCloseButtonX@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPCloseButtonX@3x.png"; sourceTree = ""; }; + 45A3798720B33957005FBDBB /* MPCloseButtonX.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = MPCloseButtonX.png; sourceTree = ""; }; + 45A3798820B33957005FBDBB /* MPDAAIcon@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPDAAIcon@3x.png"; sourceTree = ""; }; + 45A3798920B33957005FBDBB /* MPMutedBtn@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPMutedBtn@3x.png"; sourceTree = ""; }; + 45A3798A20B33957005FBDBB /* MPPlayBtn.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = MPPlayBtn.png; sourceTree = ""; }; + 45A3798B20B33957005FBDBB /* MPMutedBtn.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = MPMutedBtn.png; sourceTree = ""; }; + 45A3798C20B33957005FBDBB /* MPMutedBtn@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPMutedBtn@2x.png"; sourceTree = ""; }; + 45A3798D20B33957005FBDBB /* MPDAAIcon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MPDAAIcon@2x.png"; sourceTree = ""; }; + 45A3798F20B33957005FBDBB /* MPRewardedVideoReward.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPRewardedVideoReward.h; sourceTree = ""; }; + 45A3799020B33957005FBDBB /* MPRewardedVideoError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPRewardedVideoError.h; sourceTree = ""; }; + 45A3799120B33957005FBDBB /* MPRewardedVideo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPRewardedVideo.m; sourceTree = ""; }; + 45A3799220B33957005FBDBB /* MPRewardedVideoCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPRewardedVideoCustomEvent.h; sourceTree = ""; }; + 45A3799420B33957005FBDBB /* MPMoPubRewardedVideoCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPMoPubRewardedVideoCustomEvent.m; sourceTree = ""; }; + 45A3799520B33957005FBDBB /* MPRewardedVideoAdManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPRewardedVideoAdManager.m; sourceTree = ""; }; + 45A3799620B33957005FBDBB /* MPRewardedVideoAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPRewardedVideoAdapter.m; sourceTree = ""; }; + 45A3799720B33957005FBDBB /* MPRewardedVideo+Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MPRewardedVideo+Internal.h"; sourceTree = ""; }; + 45A3799820B33957005FBDBB /* MPMoPubRewardedPlayableCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPMoPubRewardedPlayableCustomEvent.m; sourceTree = ""; }; + 45A3799920B33957005FBDBB /* MPRewardedVideoConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPRewardedVideoConnection.h; sourceTree = ""; }; + 45A3799A20B33957005FBDBB /* MPRewardedVideoAdManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPRewardedVideoAdManager.h; sourceTree = ""; }; + 45A3799B20B33957005FBDBB /* MPMoPubRewardedVideoCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPMoPubRewardedVideoCustomEvent.h; sourceTree = ""; }; + 45A3799C20B33957005FBDBB /* MPRewardedVideoAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPRewardedVideoAdapter.h; sourceTree = ""; }; + 45A3799D20B33957005FBDBB /* MPPrivateRewardedVideoCustomEventDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPPrivateRewardedVideoCustomEventDelegate.h; sourceTree = ""; }; + 45A3799E20B33957005FBDBB /* MPRewardedVideoConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPRewardedVideoConnection.m; sourceTree = ""; }; + 45A3799F20B33957005FBDBB /* MPMoPubRewardedPlayableCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPMoPubRewardedPlayableCustomEvent.h; sourceTree = ""; }; + 45A379A020B33957005FBDBB /* MPRewardedVideoCustomEvent+Caching.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MPRewardedVideoCustomEvent+Caching.h"; sourceTree = ""; }; + 45A379A120B33957005FBDBB /* MPRewardedVideoReward.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPRewardedVideoReward.m; sourceTree = ""; }; + 45A379A220B33957005FBDBB /* MPRewardedVideoError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPRewardedVideoError.m; sourceTree = ""; }; + 45A379A320B33957005FBDBB /* MPRewardedVideo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPRewardedVideo.h; sourceTree = ""; }; + 45A379A420B33957005FBDBB /* MPRewardedVideoCustomEvent+Caching.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MPRewardedVideoCustomEvent+Caching.m"; sourceTree = ""; }; + 45A379A520B33957005FBDBB /* MPRewardedVideoCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPRewardedVideoCustomEvent.m; sourceTree = ""; }; + 45A379A620B33957005FBDBB /* MPInterstitialAdController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPInterstitialAdController.h; sourceTree = ""; }; + 45A379A720B33958005FBDBB /* MPLogLevel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPLogLevel.h; sourceTree = ""; }; + 45A379A820B33958005FBDBB /* MPInterstitialAdController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPInterstitialAdController.m; sourceTree = ""; }; + 45A379A920B33958005FBDBB /* MPConsentChangedNotification.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPConsentChangedNotification.m; sourceTree = ""; }; + 45A379AA20B33958005FBDBB /* MPBool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPBool.h; sourceTree = ""; }; + 45A379AB20B33958005FBDBB /* MOPUBDisplayAgentType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBDisplayAgentType.h; sourceTree = ""; }; + 45A379AC20B33959005FBDBB /* MPConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPConstants.m; sourceTree = ""; }; + 45A379AD20B33959005FBDBB /* MPBannerCustomEventDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPBannerCustomEventDelegate.h; sourceTree = ""; }; + 45A379AE20B33959005FBDBB /* MPConsentChangedReason.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPConsentChangedReason.h; sourceTree = ""; }; + 45A379AF20B33959005FBDBB /* MPBannerCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPBannerCustomEvent.h; sourceTree = ""; }; + 45A379B020B33959005FBDBB /* MPAdvancedBidder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAdvancedBidder.h; sourceTree = ""; }; + 45A379B120B3395A005FBDBB /* MoPub-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MoPub-Bridging-Header.h"; sourceTree = ""; }; + 45A379B220B3395A005FBDBB /* MPAdConversionTracker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAdConversionTracker.m; sourceTree = ""; }; + 45A379B320B3395A005FBDBB /* MPInterstitialCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPInterstitialCustomEvent.m; sourceTree = ""; }; + 45A379B420B3395A005FBDBB /* MPInterstitialCustomEventDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPInterstitialCustomEventDelegate.h; sourceTree = ""; }; + 45A379B520B3395A005FBDBB /* MPInterstitialCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPInterstitialCustomEvent.h; sourceTree = ""; }; + 45A379B620B3395B005FBDBB /* MoPub.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MoPub.m; sourceTree = ""; }; + 45A379B720B3395B005FBDBB /* MPConsentChangedNotification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPConsentChangedNotification.h; sourceTree = ""; }; + 45A379B820B3395B005FBDBB /* MPConsentStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPConsentStatus.h; sourceTree = ""; }; + 45A379BA20B3395B005FBDBB /* MPConsentManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPConsentManager.h; sourceTree = ""; }; + 45A379BB20B3395B005FBDBB /* MPURLRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPURLRequest.m; sourceTree = ""; }; + 45A379BC20B3395B005FBDBB /* MPHTTPNetworkTaskData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPHTTPNetworkTaskData.m; sourceTree = ""; }; + 45A379BD20B3395B005FBDBB /* MPHTTPNetworkSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPHTTPNetworkSession.h; sourceTree = ""; }; + 45A379BE20B3395B005FBDBB /* MPConsentAdServerKeys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPConsentAdServerKeys.h; sourceTree = ""; }; + 45A379C020B3395B005FBDBB /* MPBaseInterstitialAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPBaseInterstitialAdapter.m; sourceTree = ""; }; + 45A379C120B3395B005FBDBB /* MPPrivateInterstitialCustomEventDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPPrivateInterstitialCustomEventDelegate.h; sourceTree = ""; }; + 45A379C220B3395B005FBDBB /* MPInterstitialViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPInterstitialViewController.m; sourceTree = ""; }; + 45A379C320B3395B005FBDBB /* MPInterstitialAdManagerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPInterstitialAdManagerDelegate.h; sourceTree = ""; }; + 45A379C420B3395B005FBDBB /* MPInterstitialCustomEventAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPInterstitialCustomEventAdapter.h; sourceTree = ""; }; + 45A379C520B3395B005FBDBB /* MPInterstitialAdManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPInterstitialAdManager.h; sourceTree = ""; }; + 45A379C620B3395B005FBDBB /* MPBaseInterstitialAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPBaseInterstitialAdapter.h; sourceTree = ""; }; + 45A379C720B3395B005FBDBB /* MPInterstitialViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPInterstitialViewController.h; sourceTree = ""; }; + 45A379C820B3395B005FBDBB /* MPInterstitialAdManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPInterstitialAdManager.m; sourceTree = ""; }; + 45A379C920B3395B005FBDBB /* MPInterstitialCustomEventAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPInterstitialCustomEventAdapter.m; sourceTree = ""; }; + 45A379CA20B3395B005FBDBB /* MPConsentDialogViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPConsentDialogViewController.h; sourceTree = ""; }; + 45A379CB20B3395B005FBDBB /* MPMediationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPMediationManager.h; sourceTree = ""; }; + 45A379CC20B3395B005FBDBB /* MPInstanceProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPInstanceProvider.h; sourceTree = ""; }; + 45A379CD20B3395B005FBDBB /* MPVASTTracking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTTracking.m; sourceTree = ""; }; + 45A379CF20B3395B005FBDBB /* MPAdWebViewAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAdWebViewAgent.h; sourceTree = ""; }; + 45A379D020B3395B005FBDBB /* MPHTMLInterstitialViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPHTMLInterstitialViewController.h; sourceTree = ""; }; + 45A379D120B3395B005FBDBB /* MPHTMLBannerCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPHTMLBannerCustomEvent.h; sourceTree = ""; }; + 45A379D220B3395B005FBDBB /* MPWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPWebView.h; sourceTree = ""; }; + 45A379D320B3395B005FBDBB /* MPHTMLInterstitialCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPHTMLInterstitialCustomEvent.m; sourceTree = ""; }; + 45A379D420B3395B005FBDBB /* MPHTMLInterstitialViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPHTMLInterstitialViewController.m; sourceTree = ""; }; + 45A379D520B3395B005FBDBB /* MPAdWebViewAgent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAdWebViewAgent.m; sourceTree = ""; }; + 45A379D620B3395B005FBDBB /* MPWebView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPWebView.m; sourceTree = ""; }; + 45A379D720B3395B005FBDBB /* MPHTMLBannerCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPHTMLBannerCustomEvent.m; sourceTree = ""; }; + 45A379D820B3395B005FBDBB /* MPHTMLInterstitialCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPHTMLInterstitialCustomEvent.h; sourceTree = ""; }; + 45A379D920B3395B005FBDBB /* MPCoreInstanceProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPCoreInstanceProvider.m; sourceTree = ""; }; + 45A379DA20B3395B005FBDBB /* MPAdvancedBiddingManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAdvancedBiddingManager.h; sourceTree = ""; }; + 45A379DC20B3395B005FBDBB /* MPPrivateBannerCustomEventDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPPrivateBannerCustomEventDelegate.h; sourceTree = ""; }; + 45A379DD20B3395B005FBDBB /* MPBannerAdManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPBannerAdManager.m; sourceTree = ""; }; + 45A379DE20B3395B005FBDBB /* MPBannerCustomEventAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPBannerCustomEventAdapter.h; sourceTree = ""; }; + 45A379DF20B3395B005FBDBB /* MPBannerAdManagerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPBannerAdManagerDelegate.h; sourceTree = ""; }; + 45A379E020B3395B005FBDBB /* MPBannerCustomEvent+Internal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MPBannerCustomEvent+Internal.m"; sourceTree = ""; }; + 45A379E120B3395B005FBDBB /* MPBaseBannerAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPBaseBannerAdapter.m; sourceTree = ""; }; + 45A379E220B3395B005FBDBB /* MPBannerCustomEventAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPBannerCustomEventAdapter.m; sourceTree = ""; }; + 45A379E320B3395B005FBDBB /* MPBannerAdManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPBannerAdManager.h; sourceTree = ""; }; + 45A379E420B3395B005FBDBB /* MPBaseBannerAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPBaseBannerAdapter.h; sourceTree = ""; }; + 45A379E520B3395B005FBDBB /* MPBannerCustomEvent+Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MPBannerCustomEvent+Internal.h"; sourceTree = ""; }; + 45A379E720B3395B005FBDBB /* MPAdDestinationDisplayAgent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAdDestinationDisplayAgent.m; sourceTree = ""; }; + 45A379E820B3395B005FBDBB /* MPAPIEndpoints.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAPIEndpoints.m; sourceTree = ""; }; + 45A379E920B3395B005FBDBB /* MPRealTimeTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPRealTimeTimer.h; sourceTree = ""; }; + 45A379EA20B3395B005FBDBB /* MPCountdownTimerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPCountdownTimerView.h; sourceTree = ""; }; + 45A379EB20B3395B005FBDBB /* MPClosableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPClosableView.h; sourceTree = ""; }; + 45A379EC20B3395B005FBDBB /* MPAdBrowserController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAdBrowserController.m; sourceTree = ""; }; + 45A379ED20B3395B005FBDBB /* MPAdServerCommunicator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAdServerCommunicator.m; sourceTree = ""; }; + 45A379EE20B3395B005FBDBB /* MPAdConfiguration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAdConfiguration.m; sourceTree = ""; }; + 45A379EF20B3395B005FBDBB /* MPVideoConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVideoConfig.h; sourceTree = ""; }; + 45A379F020B3395B005FBDBB /* MPURLResolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPURLResolver.h; sourceTree = ""; }; + 45A379F120B3395B005FBDBB /* MPActivityViewControllerHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPActivityViewControllerHelper.m; sourceTree = ""; }; + 45A379F220B3395B005FBDBB /* MPActivityViewControllerHelper+TweetShare.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MPActivityViewControllerHelper+TweetShare.h"; sourceTree = ""; }; + 45A379F320B3395B005FBDBB /* MPAdServerURLBuilder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAdServerURLBuilder.m; sourceTree = ""; }; + 45A379F420B3395B005FBDBB /* MPAdImpressionTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAdImpressionTimer.h; sourceTree = ""; }; + 45A379F520B3395B005FBDBB /* MPLastResortDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPLastResortDelegate.m; sourceTree = ""; }; + 45A379F620B3395B005FBDBB /* MPProgressOverlayView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPProgressOverlayView.m; sourceTree = ""; }; + 45A379F720B3395B005FBDBB /* MPAdBrowserController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MPAdBrowserController.xib; sourceTree = ""; }; + 45A379F820B3395B005FBDBB /* MPEnhancedDeeplinkRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPEnhancedDeeplinkRequest.m; sourceTree = ""; }; + 45A379F920B3395B005FBDBB /* MPURLActionInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPURLActionInfo.m; sourceTree = ""; }; + 45A379FA20B3395B005FBDBB /* MPXMLParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPXMLParser.h; sourceTree = ""; }; + 45A379FB20B3395B005FBDBB /* MPAdServerCommunicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAdServerCommunicator.h; sourceTree = ""; }; + 45A379FC20B3395B005FBDBB /* MPAdBrowserController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAdBrowserController.h; sourceTree = ""; }; + 45A379FD20B3395B005FBDBB /* MPClosableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPClosableView.m; sourceTree = ""; }; + 45A379FE20B3395B005FBDBB /* MPCountdownTimerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPCountdownTimerView.m; sourceTree = ""; }; + 45A379FF20B3395B005FBDBB /* MPRealTimeTimer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPRealTimeTimer.m; sourceTree = ""; }; + 45A37A0120B3395B005FBDBB /* MPAdAlertGestureRecognizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAdAlertGestureRecognizer.h; sourceTree = ""; }; + 45A37A0220B3395B005FBDBB /* MPAdAlertManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAdAlertManager.m; sourceTree = ""; }; + 45A37A0320B3395B005FBDBB /* MPAdAlertGestureRecognizer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAdAlertGestureRecognizer.m; sourceTree = ""; }; + 45A37A0420B3395B005FBDBB /* MPAdAlertManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAdAlertManager.h; sourceTree = ""; }; + 45A37A0520B3395B005FBDBB /* MPAdDestinationDisplayAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAdDestinationDisplayAgent.h; sourceTree = ""; }; + 45A37A0620B3395B005FBDBB /* MPAPIEndpoints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAPIEndpoints.h; sourceTree = ""; }; + 45A37A0720B3395B005FBDBB /* MPActivityViewControllerHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPActivityViewControllerHelper.h; sourceTree = ""; }; + 45A37A0820B3395B005FBDBB /* MPURLResolver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPURLResolver.m; sourceTree = ""; }; + 45A37A0920B3395B005FBDBB /* MPAdConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAdConfiguration.h; sourceTree = ""; }; + 45A37A0A20B3395B005FBDBB /* MPVideoConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVideoConfig.m; sourceTree = ""; }; + 45A37A0B20B3395B005FBDBB /* MPAdImpressionTimer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAdImpressionTimer.m; sourceTree = ""; }; + 45A37A0C20B3395B005FBDBB /* MPAdServerURLBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAdServerURLBuilder.h; sourceTree = ""; }; + 45A37A0D20B3395B005FBDBB /* MPActivityViewControllerHelper+TweetShare.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MPActivityViewControllerHelper+TweetShare.m"; sourceTree = ""; }; + 45A37A0E20B3395B005FBDBB /* MPXMLParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPXMLParser.m; sourceTree = ""; }; + 45A37A0F20B3395B005FBDBB /* MPEnhancedDeeplinkRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPEnhancedDeeplinkRequest.h; sourceTree = ""; }; + 45A37A1020B3395B005FBDBB /* MPURLActionInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPURLActionInfo.h; sourceTree = ""; }; + 45A37A1120B3395B005FBDBB /* MPProgressOverlayView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPProgressOverlayView.h; sourceTree = ""; }; + 45A37A1220B3395B005FBDBB /* MPLastResortDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPLastResortDelegate.h; sourceTree = ""; }; + 45A37A1320B3395B005FBDBB /* MPURLRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPURLRequest.h; sourceTree = ""; }; + 45A37A1420B3395B005FBDBB /* MPConsentManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPConsentManager.m; sourceTree = ""; }; + 45A37A1520B3395B005FBDBB /* MPHTTPNetworkTaskData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPHTTPNetworkTaskData.h; sourceTree = ""; }; + 45A37A1620B3395B005FBDBB /* MPInstanceProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPInstanceProvider.m; sourceTree = ""; }; + 45A37A1720B3395B005FBDBB /* MPMediationManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPMediationManager.m; sourceTree = ""; }; + 45A37A1820B3395B005FBDBB /* MPConsentDialogViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPConsentDialogViewController.m; sourceTree = ""; }; + 45A37A1A20B3395B005FBDBB /* MPMRAIDBannerCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPMRAIDBannerCustomEvent.m; sourceTree = ""; }; + 45A37A1B20B3395B005FBDBB /* MRConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MRConstants.m; sourceTree = ""; }; + 45A37A1C20B3395B005FBDBB /* MRError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MRError.h; sourceTree = ""; }; + 45A37A1D20B3395B005FBDBB /* MRBridge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MRBridge.m; sourceTree = ""; }; + 45A37A1E20B3395B005FBDBB /* MRNativeCommandHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MRNativeCommandHandler.m; sourceTree = ""; }; + 45A37A1F20B3395B005FBDBB /* MPForceableOrientationProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPForceableOrientationProtocol.h; sourceTree = ""; }; + 45A37A2020B3395B005FBDBB /* MRVideoPlayerManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MRVideoPlayerManager.m; sourceTree = ""; }; + 45A37A2120B3395B005FBDBB /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; + 45A37A2220B3395B005FBDBB /* MPMRAIDInterstitialViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPMRAIDInterstitialViewController.m; sourceTree = ""; }; + 45A37A2320B3395B005FBDBB /* MRCommand.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MRCommand.m; sourceTree = ""; }; + 45A37A2420B3395B005FBDBB /* MPMRAIDInterstitialCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPMRAIDInterstitialCustomEvent.m; sourceTree = ""; }; + 45A37A2520B3395B005FBDBB /* MRController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MRController.h; sourceTree = ""; }; + 45A37A2620B3395B005FBDBB /* MRProperty.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MRProperty.m; sourceTree = ""; }; + 45A37A2720B3395B005FBDBB /* MRBundleManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MRBundleManager.h; sourceTree = ""; }; + 45A37A2820B3395B005FBDBB /* MRExpandModalViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MRExpandModalViewController.h; sourceTree = ""; }; + 45A37A2920B3395B005FBDBB /* MRNativeCommandHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MRNativeCommandHandler.h; sourceTree = ""; }; + 45A37A2A20B3395B005FBDBB /* MRBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MRBridge.h; sourceTree = ""; }; + 45A37A2B20B3395B005FBDBB /* MRError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MRError.m; sourceTree = ""; }; + 45A37A2C20B3395B005FBDBB /* MRConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MRConstants.h; sourceTree = ""; }; + 45A37A2D20B3395B005FBDBB /* MPMRAIDBannerCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPMRAIDBannerCustomEvent.h; sourceTree = ""; }; + 45A37A2E20B3395C005FBDBB /* MRCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MRCommand.h; sourceTree = ""; }; + 45A37A2F20B3395C005FBDBB /* MPMRAIDInterstitialCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPMRAIDInterstitialCustomEvent.h; sourceTree = ""; }; + 45A37A3020B3395C005FBDBB /* MPMRAIDInterstitialViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPMRAIDInterstitialViewController.h; sourceTree = ""; }; + 45A37A3120B3395C005FBDBB /* MRVideoPlayerManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MRVideoPlayerManager.h; sourceTree = ""; }; + 45A37A3220B3395C005FBDBB /* MRProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MRProperty.h; sourceTree = ""; }; + 45A37A3320B3395C005FBDBB /* MRController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MRController.m; sourceTree = ""; }; + 45A37A3420B3395C005FBDBB /* MRExpandModalViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MRExpandModalViewController.m; sourceTree = ""; }; + 45A37A3520B3395C005FBDBB /* MRBundleManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MRBundleManager.m; sourceTree = ""; }; + 45A37A3620B3395C005FBDBB /* MPConsentAdServerKeys.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPConsentAdServerKeys.m; sourceTree = ""; }; + 45A37A3720B3395C005FBDBB /* MPHTTPNetworkSession.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPHTTPNetworkSession.m; sourceTree = ""; }; + 45A37A3820B3395C005FBDBB /* MPAdvancedBiddingManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAdvancedBiddingManager.m; sourceTree = ""; }; + 45A37A3920B3395C005FBDBB /* MPCoreInstanceProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPCoreInstanceProvider.h; sourceTree = ""; }; + 45A37A3A20B3395C005FBDBB /* MPVASTTracking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTTracking.h; sourceTree = ""; }; + 45A37A3C20B3395C005FBDBB /* MPSessionTracker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPSessionTracker.m; sourceTree = ""; }; + 45A37A3D20B3395C005FBDBB /* MPLogProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPLogProvider.m; sourceTree = ""; }; + 45A37A3E20B3395C005FBDBB /* MPGlobal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPGlobal.m; sourceTree = ""; }; + 45A37A3F20B3395C005FBDBB /* MPInternalUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPInternalUtils.h; sourceTree = ""; }; + 45A37A4020B3395C005FBDBB /* MPIdentityProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPIdentityProvider.h; sourceTree = ""; }; + 45A37A4120B3395C005FBDBB /* MPTimer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPTimer.m; sourceTree = ""; }; + 45A37A4220B3395C005FBDBB /* MPLogging.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPLogging.m; sourceTree = ""; }; + 45A37A4320B3395C005FBDBB /* MOPUBExperimentProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOPUBExperimentProvider.m; sourceTree = ""; }; + 45A37A4420B3395C005FBDBB /* MPStoreKitProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPStoreKitProvider.h; sourceTree = ""; }; + 45A37A4520B3395C005FBDBB /* MPError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPError.h; sourceTree = ""; }; + 45A37A4620B3395C005FBDBB /* MPGeolocationProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPGeolocationProvider.m; sourceTree = ""; }; + 45A37A4720B3395C005FBDBB /* MPReachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPReachability.m; sourceTree = ""; }; + 45A37A4820B3395C005FBDBB /* MPUserInteractionGestureRecognizer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPUserInteractionGestureRecognizer.m; sourceTree = ""; }; + 45A37A4920B3395C005FBDBB /* MPAnalyticsTracker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAnalyticsTracker.m; sourceTree = ""; }; + 45A37A4A20B3395C005FBDBB /* MPIdentityProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPIdentityProvider.m; sourceTree = ""; }; + 45A37A4B20B3395C005FBDBB /* MPInternalUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPInternalUtils.m; sourceTree = ""; }; + 45A37A4C20B3395C005FBDBB /* MPSessionTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPSessionTracker.h; sourceTree = ""; }; + 45A37A4D20B3395C005FBDBB /* MPGlobal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPGlobal.h; sourceTree = ""; }; + 45A37A4E20B3395C005FBDBB /* MPLogProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPLogProvider.h; sourceTree = ""; }; + 45A37A4F20B3395C005FBDBB /* MPError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPError.m; sourceTree = ""; }; + 45A37A5020B3395C005FBDBB /* MPStoreKitProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPStoreKitProvider.m; sourceTree = ""; }; + 45A37A5120B3395C005FBDBB /* MOPUBExperimentProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOPUBExperimentProvider.h; sourceTree = ""; }; + 45A37A5220B3395C005FBDBB /* MPLogging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPLogging.h; sourceTree = ""; }; + 45A37A5320B3395C005FBDBB /* MPTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPTimer.h; sourceTree = ""; }; + 45A37A5420B3395C005FBDBB /* MPAnalyticsTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAnalyticsTracker.h; sourceTree = ""; }; + 45A37A5520B3395C005FBDBB /* MPUserInteractionGestureRecognizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPUserInteractionGestureRecognizer.h; sourceTree = ""; }; + 45A37A5620B3395C005FBDBB /* MPReachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPReachability.h; sourceTree = ""; }; + 45A37A5720B3395C005FBDBB /* MPGeolocationProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPGeolocationProvider.h; sourceTree = ""; }; + 45A37A5920B3395C005FBDBB /* NSString+MPAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+MPAdditions.h"; sourceTree = ""; }; + 45A37A5A20B3395C005FBDBB /* NSURL+MPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSURL+MPAdditions.m"; sourceTree = ""; }; + 45A37A5B20B3395C005FBDBB /* UIColor+MPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIColor+MPAdditions.m"; sourceTree = ""; }; + 45A37A5C20B3395C005FBDBB /* UIWebView+MPAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIWebView+MPAdditions.h"; sourceTree = ""; }; + 45A37A5D20B3395C005FBDBB /* NSJSONSerialization+MPAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSJSONSerialization+MPAdditions.h"; sourceTree = ""; }; + 45A37A5E20B3395C005FBDBB /* UIButton+MPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIButton+MPAdditions.m"; sourceTree = ""; }; + 45A37A5F20B3395C005FBDBB /* UIView+MPAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+MPAdditions.h"; sourceTree = ""; }; + 45A37A6020B3395C005FBDBB /* NSString+MPConsentStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+MPConsentStatus.h"; sourceTree = ""; }; + 45A37A6120B3395C005FBDBB /* NSBundle+MPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSBundle+MPAdditions.m"; sourceTree = ""; }; + 45A37A6220B3395C005FBDBB /* NSHTTPURLResponse+MPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSHTTPURLResponse+MPAdditions.m"; sourceTree = ""; }; + 45A37A6320B3395C005FBDBB /* NSString+MPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+MPAdditions.m"; sourceTree = ""; }; + 45A37A6420B3395C005FBDBB /* NSJSONSerialization+MPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSJSONSerialization+MPAdditions.m"; sourceTree = ""; }; + 45A37A6520B3395C005FBDBB /* UIWebView+MPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIWebView+MPAdditions.m"; sourceTree = ""; }; + 45A37A6620B3395C005FBDBB /* UIColor+MPAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIColor+MPAdditions.h"; sourceTree = ""; }; + 45A37A6720B3395C005FBDBB /* NSURL+MPAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSURL+MPAdditions.h"; sourceTree = ""; }; + 45A37A6820B3395C005FBDBB /* UIView+MPAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+MPAdditions.m"; sourceTree = ""; }; + 45A37A6920B3395C005FBDBB /* UIButton+MPAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIButton+MPAdditions.h"; sourceTree = ""; }; + 45A37A6A20B3395C005FBDBB /* NSHTTPURLResponse+MPAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSHTTPURLResponse+MPAdditions.h"; sourceTree = ""; }; + 45A37A6B20B3395C005FBDBB /* NSBundle+MPAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSBundle+MPAdditions.h"; sourceTree = ""; }; + 45A37A6C20B3395C005FBDBB /* NSString+MPConsentStatus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+MPConsentStatus.m"; sourceTree = ""; }; + 45A37A6E20B3395C005FBDBB /* MPVASTDurationOffset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTDurationOffset.h; sourceTree = ""; }; + 45A37A6F20B3395C005FBDBB /* MPVASTCompanionAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTCompanionAd.h; sourceTree = ""; }; + 45A37A7020B3395C005FBDBB /* MPVASTMacroProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTMacroProcessor.h; sourceTree = ""; }; + 45A37A7120B3395C005FBDBB /* MPVASTLinearAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTLinearAd.h; sourceTree = ""; }; + 45A37A7220B3395C005FBDBB /* MPVASTWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTWrapper.h; sourceTree = ""; }; + 45A37A7320B3395C005FBDBB /* MPVASTModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTModel.h; sourceTree = ""; }; + 45A37A7420B3395C005FBDBB /* MPVASTCreative.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTCreative.m; sourceTree = ""; }; + 45A37A7520B3395C005FBDBB /* MPVASTTrackingEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTTrackingEvent.h; sourceTree = ""; }; + 45A37A7620B3395C005FBDBB /* MPVASTIndustryIcon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTIndustryIcon.h; sourceTree = ""; }; + 45A37A7720B3395C005FBDBB /* MPVASTInline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTInline.h; sourceTree = ""; }; + 45A37A7820B3395C005FBDBB /* MPVASTMediaFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTMediaFile.m; sourceTree = ""; }; + 45A37A7920B3395C005FBDBB /* MPVASTAd.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTAd.m; sourceTree = ""; }; + 45A37A7A20B3395C005FBDBB /* MPVASTManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTManager.h; sourceTree = ""; }; + 45A37A7B20B3395C005FBDBB /* MPVASTResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTResponse.h; sourceTree = ""; }; + 45A37A7C20B3395C005FBDBB /* MPVASTStringUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTStringUtilities.h; sourceTree = ""; }; + 45A37A7D20B3395C005FBDBB /* MPVASTResource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTResource.m; sourceTree = ""; }; + 45A37A7E20B3395C005FBDBB /* MPVASTModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTModel.m; sourceTree = ""; }; + 45A37A7F20B3395C005FBDBB /* MPVASTWrapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTWrapper.m; sourceTree = ""; }; + 45A37A8020B3395C005FBDBB /* MPVASTLinearAd.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTLinearAd.m; sourceTree = ""; }; + 45A37A8120B3395C005FBDBB /* MPVASTCompanionAd.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTCompanionAd.m; sourceTree = ""; }; + 45A37A8220B3395C005FBDBB /* MPVASTMacroProcessor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTMacroProcessor.m; sourceTree = ""; }; + 45A37A8320B3395C005FBDBB /* MPVASTDurationOffset.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTDurationOffset.m; sourceTree = ""; }; + 45A37A8420B3395C005FBDBB /* MPVASTMediaFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTMediaFile.h; sourceTree = ""; }; + 45A37A8520B3395C005FBDBB /* MPVASTIndustryIcon.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTIndustryIcon.m; sourceTree = ""; }; + 45A37A8620B3395C005FBDBB /* MPVASTInline.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTInline.m; sourceTree = ""; }; + 45A37A8720B3395C005FBDBB /* MPVASTTrackingEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTTrackingEvent.m; sourceTree = ""; }; + 45A37A8820B3395C005FBDBB /* MPVASTCreative.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTCreative.h; sourceTree = ""; }; + 45A37A8920B3395C005FBDBB /* MPVASTResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTResource.h; sourceTree = ""; }; + 45A37A8A20B3395C005FBDBB /* MPVASTStringUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTStringUtilities.m; sourceTree = ""; }; + 45A37A8B20B3395C005FBDBB /* MPVASTResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTResponse.m; sourceTree = ""; }; + 45A37A8C20B3395C005FBDBB /* MPVASTManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPVASTManager.m; sourceTree = ""; }; + 45A37A8D20B3395C005FBDBB /* MPVASTAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPVASTAd.h; sourceTree = ""; }; + 45A37A8E20B3395C005FBDBB /* MPConsentChangedReason.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPConsentChangedReason.m; sourceTree = ""; }; + 45A37A8F20B3395C005FBDBB /* MPConsentError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPConsentError.h; sourceTree = ""; }; + 45A37A9020B3395C005FBDBB /* MPMoPubConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPMoPubConfiguration.h; sourceTree = ""; }; + 45A37B6B20B33D63005FBDBB /* FacebookNativeCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FacebookNativeCustomEvent.m; sourceTree = ""; }; + 45A37B6C20B33D63005FBDBB /* FacebookInterstitialCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FacebookInterstitialCustomEvent.m; sourceTree = ""; }; + 45A37B6D20B33D63005FBDBB /* FacebookBannerCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FacebookBannerCustomEvent.h; sourceTree = ""; }; + 45A37B6E20B33D63005FBDBB /* FacebookAdvancedBidder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FacebookAdvancedBidder.m; sourceTree = ""; }; + 45A37B6F20B33D63005FBDBB /* CHANGELOG.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = ""; }; + 45A37B7120B33D63005FBDBB /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; + 45A37B7220B33D63005FBDBB /* MoPub-FacebookAudienceNetwork-Adapters.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "MoPub-FacebookAudienceNetwork-Adapters.podspec"; sourceTree = ""; }; + 45A37B7320B33D63005FBDBB /* FacebookRewardedVideoCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FacebookRewardedVideoCustomEvent.m; sourceTree = ""; }; + 45A37B7420B33D63005FBDBB /* FacebookNativeAdAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FacebookNativeAdAdapter.m; sourceTree = ""; }; + 45A37B7520B33D63005FBDBB /* FacebookInterstitialCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FacebookInterstitialCustomEvent.h; sourceTree = ""; }; + 45A37B7620B33D63005FBDBB /* FacebookNativeCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FacebookNativeCustomEvent.h; sourceTree = ""; }; + 45A37B7720B33D63005FBDBB /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + 45A37B7820B33D63005FBDBB /* FacebookAdvancedBidder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FacebookAdvancedBidder.h; sourceTree = ""; }; + 45A37B7920B33D63005FBDBB /* FacebookBannerCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FacebookBannerCustomEvent.m; sourceTree = ""; }; + 45A37B7A20B33D63005FBDBB /* FacebookNativeAdAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FacebookNativeAdAdapter.h; sourceTree = ""; }; + 45A37B7B20B33D63005FBDBB /* FacebookRewardedVideoCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FacebookRewardedVideoCustomEvent.h; sourceTree = ""; }; + 45A37B7E20B33D63005FBDBB /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; + 45A37B7F20B33D63005FBDBB /* MoPub-AdMob-Adapters.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "MoPub-AdMob-Adapters.podspec"; sourceTree = ""; }; + 45A37B8020B33D63005FBDBB /* MPGoogleAdMobBannerCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPGoogleAdMobBannerCustomEvent.h; sourceTree = ""; }; + 45A37B8120B33D63005FBDBB /* MPGoogleAdMobNativeAdAdapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPGoogleAdMobNativeAdAdapter.m; sourceTree = ""; }; + 45A37B8220B33D63005FBDBB /* MPGoogleAdMobNativeCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPGoogleAdMobNativeCustomEvent.m; sourceTree = ""; }; + 45A37B8320B33D63005FBDBB /* CHANGELOG.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = ""; }; + 45A37B8420B33D63005FBDBB /* UIView+MPGoogleAdMobAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+MPGoogleAdMobAdditions.h"; sourceTree = ""; }; + 45A37B8520B33D63005FBDBB /* MPGoogleAdMobNativeRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPGoogleAdMobNativeRenderer.h; sourceTree = ""; }; + 45A37B8620B33D63005FBDBB /* MPGoogleAdMobRewardedVideoCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPGoogleAdMobRewardedVideoCustomEvent.m; sourceTree = ""; }; + 45A37B8720B33D63005FBDBB /* MPGoogleAdMobInterstitialCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPGoogleAdMobInterstitialCustomEvent.h; sourceTree = ""; }; + 45A37B8820B33D63005FBDBB /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + 45A37B8920B33D63005FBDBB /* MPGoogleAdMobBannerCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPGoogleAdMobBannerCustomEvent.m; sourceTree = ""; }; + 45A37B8A20B33D63005FBDBB /* MPGoogleAdMobNativeCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPGoogleAdMobNativeCustomEvent.h; sourceTree = ""; }; + 45A37B8B20B33D63005FBDBB /* MPGoogleAdMobNativeAdAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPGoogleAdMobNativeAdAdapter.h; sourceTree = ""; }; + 45A37B8C20B33D63005FBDBB /* MPGoogleAdMobNativeRenderer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPGoogleAdMobNativeRenderer.m; sourceTree = ""; }; + 45A37B8D20B33D63005FBDBB /* UIView+MPGoogleAdMobAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+MPGoogleAdMobAdditions.m"; sourceTree = ""; }; + 45A37B8E20B33D63005FBDBB /* MPGoogleAdMobInterstitialCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPGoogleAdMobInterstitialCustomEvent.m; sourceTree = ""; }; + 45A37B8F20B33D63005FBDBB /* MPGoogleAdMobRewardedVideoCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPGoogleAdMobRewardedVideoCustomEvent.h; sourceTree = ""; }; + 45A37BA320B33FC1005FBDBB /* FBAudienceNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = FBAudienceNetwork.framework; sourceTree = ""; }; + EBDA7B7120B356270054165B /* GoogleMobileAds.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = GoogleMobileAds.framework; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -577,71 +647,59 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + EBDA7B7720B35B0E0054165B /* FBAudienceNetwork.framework in Frameworks */, + EBDA7B7620B35AF30054165B /* GoogleMobileAds.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 349CFCF520456F8C00569949 /* AdMob */ = { - isa = PBXGroup; - children = ( - 349CFCF620456F8C00569949 /* MPGoogleAdMobBannerCustomEvent.h */, - 349CFCF720456F8C00569949 /* MPGoogleAdMobNativeAdAdapter.m */, - 349CFCF820456F8C00569949 /* MPGoogleAdMobNativeCustomEvent.m */, - 349CFCF920456F8C00569949 /* UIView+MPGoogleAdMobAdditions.h */, - 349CFCFA20456F8C00569949 /* MPGoogleAdMobNativeRenderer.h */, - 349CFCFB20456F8C00569949 /* MPGoogleAdMobRewardedVideoCustomEvent.m */, - 349CFCFC20456F8C00569949 /* MPGoogleAdMobInterstitialCustomEvent.h */, - 349CFCFD20456F8C00569949 /* MPGoogleAdMobBannerCustomEvent.m */, - 349CFCFE20456F8C00569949 /* SDK */, - 349CFD0020456F8C00569949 /* MPGoogleAdMobNativeCustomEvent.h */, - 349CFD0120456F8C00569949 /* MPGoogleAdMobNativeAdAdapter.h */, - 349CFD0220456F8C00569949 /* MPGoogleAdMobNativeRenderer.m */, - 349CFD0320456F8C00569949 /* UIView+MPGoogleAdMobAdditions.m */, - 349CFD0420456F8C00569949 /* MPGoogleAdMobInterstitialCustomEvent.m */, - 349CFD0520456F8C00569949 /* MPGoogleAdMobRewardedVideoCustomEvent.h */, - ); - path = AdMob; - sourceTree = ""; - }; - 349CFCFE20456F8C00569949 /* SDK */ = { - isa = PBXGroup; - children = ( - 349CFCFF20456F8C00569949 /* GoogleMobileAds.framework */, - ); - path = SDK; - sourceTree = ""; - }; 34F407431E9E1D3500E57AC0 = { isa = PBXGroup; children = ( 34F4098E1E9E27DB00E57AC0 /* common-debug.xcconfig */, 34F4098F1E9E27DB00E57AC0 /* common-release.xcconfig */, 34F4075E1E9E1DA400E57AC0 /* AdNetworkSupport */, - 34F4076B1E9E1DA400E57AC0 /* Internal */, - 34F408361E9E1DA400E57AC0 /* MoPub-Bridging-Header.h */, - 34F408371E9E1DA400E57AC0 /* MoPub.h */, - 34F408381E9E1DA400E57AC0 /* MoPub.m */, - 34F408391E9E1DA400E57AC0 /* MPAdConversionTracker.h */, - 34F4083A1E9E1DA400E57AC0 /* MPAdConversionTracker.m */, - 34F4083B1E9E1DA400E57AC0 /* MPAdView.h */, - 34F4083C1E9E1DA400E57AC0 /* MPAdView.m */, - 34F4083D1E9E1DA400E57AC0 /* MPBannerCustomEvent.h */, - 34F4083E1E9E1DA400E57AC0 /* MPBannerCustomEvent.m */, - 34F4083F1E9E1DA400E57AC0 /* MPBannerCustomEventDelegate.h */, - 34F408401E9E1DA400E57AC0 /* MPConstants.h */, - 34F408411E9E1DA400E57AC0 /* MPConstants.m */, - 34F408421E9E1DA400E57AC0 /* MPInterstitialAdController.h */, - 34F408431E9E1DA400E57AC0 /* MPInterstitialAdController.m */, - 34F408441E9E1DA400E57AC0 /* MPInterstitialCustomEvent.h */, - 34F408451E9E1DA400E57AC0 /* MPInterstitialCustomEvent.m */, - 34F408461E9E1DA400E57AC0 /* MPInterstitialCustomEventDelegate.h */, - 34F408471E9E1DA400E57AC0 /* Native Ads */, - 34F4089B1E9E1DA400E57AC0 /* NativeVideo */, - 34F408B91E9E1DA400E57AC0 /* Resources */, - 34F408CE1E9E1DA400E57AC0 /* RewardedVideo */, + 45A379B920B3395B005FBDBB /* Internal */, + 45A379B120B3395A005FBDBB /* MoPub-Bridging-Header.h */, + 45A378FE20B33955005FBDBB /* MoPub.h */, + 45A379B620B3395B005FBDBB /* MoPub.m */, + 45A379AB20B33958005FBDBB /* MOPUBDisplayAgentType.h */, + 45A3797820B33957005FBDBB /* MPAdConversionTracker.h */, + 45A379B220B3395A005FBDBB /* MPAdConversionTracker.m */, + 45A379B020B33959005FBDBB /* MPAdvancedBidder.h */, + 45A3792120B33956005FBDBB /* MPAdView.h */, + 45A378FF20B33956005FBDBB /* MPAdView.m */, + 45A379AF20B33959005FBDBB /* MPBannerCustomEvent.h */, + 45A378E220B33955005FBDBB /* MPBannerCustomEvent.m */, + 45A379AD20B33959005FBDBB /* MPBannerCustomEventDelegate.h */, + 45A379AA20B33958005FBDBB /* MPBool.h */, + 45A379B720B3395B005FBDBB /* MPConsentChangedNotification.h */, + 45A379A920B33958005FBDBB /* MPConsentChangedNotification.m */, + 45A379AE20B33959005FBDBB /* MPConsentChangedReason.h */, + 45A37A8E20B3395C005FBDBB /* MPConsentChangedReason.m */, + 45A37A8F20B3395C005FBDBB /* MPConsentError.h */, + 45A379B820B3395B005FBDBB /* MPConsentStatus.h */, + 45A3790020B33956005FBDBB /* MPConstants.h */, + 45A379AC20B33959005FBDBB /* MPConstants.m */, + 45A379A620B33957005FBDBB /* MPInterstitialAdController.h */, + 45A379A820B33958005FBDBB /* MPInterstitialAdController.m */, + 45A379B520B3395A005FBDBB /* MPInterstitialCustomEvent.h */, + 45A379B320B3395A005FBDBB /* MPInterstitialCustomEvent.m */, + 45A379B420B3395A005FBDBB /* MPInterstitialCustomEventDelegate.h */, + 45A379A720B33958005FBDBB /* MPLogLevel.h */, + 45A378E320B33955005FBDBB /* MPMediationSdkInitializable.h */, + 45A3790120B33956005FBDBB /* MPMediationSettingsProtocol.h */, + 45A37A9020B3395C005FBDBB /* MPMoPubConfiguration.h */, + 45A3790220B33956005FBDBB /* MPMoPubConfiguration.m */, + 45A3792220B33956005FBDBB /* NativeAds */, + 45A3790320B33956005FBDBB /* NativeVideo */, + 45A3797920B33957005FBDBB /* Resources */, + 45A3798E20B33957005FBDBB /* RewardedVideo */, + 45A378E420B33955005FBDBB /* Viewability */, 34F4074D1E9E1D3500E57AC0 /* Products */, + EBDA7B7520B35AF30054165B /* Frameworks */, ); sourceTree = ""; }; @@ -656,525 +714,609 @@ 34F4075E1E9E1DA400E57AC0 /* AdNetworkSupport */ = { isa = PBXGroup; children = ( - 349CFCF520456F8C00569949 /* AdMob */, - 34F4075F1E9E1DA400E57AC0 /* Facebook */, + 45A37B7C20B33D63005FBDBB /* AdMob */, + 45A37B6A20B33D63005FBDBB /* FacebookAudienceNetwork */, ); path = AdNetworkSupport; sourceTree = ""; }; - 34F4075F1E9E1DA400E57AC0 /* Facebook */ = { + 45A378E420B33955005FBDBB /* Viewability */ = { isa = PBXGroup; children = ( - 34F407601E9E1DA400E57AC0 /* FacebookBannerCustomEvent.h */, - 34F407611E9E1DA400E57AC0 /* FacebookBannerCustomEvent.m */, - 34F407621E9E1DA400E57AC0 /* FacebookInterstitialCustomEvent.h */, - 34F407631E9E1DA400E57AC0 /* FacebookInterstitialCustomEvent.m */, - 34F407641E9E1DA400E57AC0 /* FacebookNativeAdAdapter.h */, - 34F407651E9E1DA400E57AC0 /* FacebookNativeAdAdapter.m */, - 34F407661E9E1DA400E57AC0 /* FacebookNativeCustomEvent.h */, - 34F407671E9E1DA400E57AC0 /* FacebookNativeCustomEvent.m */, - 34F407681E9E1DA400E57AC0 /* SDK */, + 45A378F820B33955005FBDBB /* MPViewabilityTracker.h */, + 45A378F920B33955005FBDBB /* MPViewabilityOption.h */, + 45A378FA20B33955005FBDBB /* MPWebView+Viewability.h */, + 45A378FB20B33955005FBDBB /* MPViewabilityTracker.m */, + 45A378FC20B33955005FBDBB /* MPWebView+Viewability.m */, + 45A378FD20B33955005FBDBB /* MPViewabilityAdapter.h */, ); - path = Facebook; + path = Viewability; sourceTree = ""; }; - 34F407681E9E1DA400E57AC0 /* SDK */ = { + 45A3790320B33956005FBDBB /* NativeVideo */ = { isa = PBXGroup; children = ( - 34F407691E9E1DA400E57AC0 /* FBAudienceNetwork.framework */, - ); - path = SDK; - sourceTree = ""; - }; - 34F4076B1E9E1DA400E57AC0 /* Internal */ = { - isa = PBXGroup; - children = ( - 34F4076C1E9E1DA400E57AC0 /* Banners */, - 34F407751E9E1DA400E57AC0 /* Common */, - 34F407A11E9E1DA400E57AC0 /* Event Logging */, - 34F407B01E9E1DA400E57AC0 /* HTML */, - 34F407BB1E9E1DA400E57AC0 /* Interstitials */, - 34F407C61E9E1DA400E57AC0 /* MPCoreInstanceProvider.h */, - 34F407C71E9E1DA400E57AC0 /* MPCoreInstanceProvider.m */, - 34F407C81E9E1DA400E57AC0 /* MPInstanceProvider.h */, - 34F407C91E9E1DA400E57AC0 /* MPInstanceProvider.m */, - 34F407CA1E9E1DA400E57AC0 /* MPVASTTracking.h */, - 34F407CB1E9E1DA400E57AC0 /* MPVASTTracking.m */, - 34F407CC1E9E1DA400E57AC0 /* MRAID */, - 34F407E91E9E1DA400E57AC0 /* Utility */, - 34F408151E9E1DA400E57AC0 /* VAST */, - ); - path = Internal; - sourceTree = ""; - }; - 34F4076C1E9E1DA400E57AC0 /* Banners */ = { - isa = PBXGroup; - children = ( - 34F4076D1E9E1DA400E57AC0 /* MPBannerAdManager.h */, - 34F4076E1E9E1DA400E57AC0 /* MPBannerAdManager.m */, - 34F4076F1E9E1DA400E57AC0 /* MPBannerAdManagerDelegate.h */, - 34F407701E9E1DA400E57AC0 /* MPBannerCustomEventAdapter.h */, - 34F407711E9E1DA400E57AC0 /* MPBannerCustomEventAdapter.m */, - 34F407721E9E1DA400E57AC0 /* MPBaseBannerAdapter.h */, - 34F407731E9E1DA400E57AC0 /* MPBaseBannerAdapter.m */, - 34F407741E9E1DA400E57AC0 /* MPPrivateBannerCustomEventDelegate.h */, - ); - path = Banners; - sourceTree = ""; - }; - 34F407751E9E1DA400E57AC0 /* Common */ = { - isa = PBXGroup; - children = ( - 34F407761E9E1DA400E57AC0 /* AdAlerts */, - 34F4077B1E9E1DA400E57AC0 /* MPActivityViewControllerHelper+TweetShare.h */, - 34F4077C1E9E1DA400E57AC0 /* MPActivityViewControllerHelper+TweetShare.m */, - 34F4077D1E9E1DA400E57AC0 /* MPActivityViewControllerHelper.h */, - 34F4077E1E9E1DA400E57AC0 /* MPActivityViewControllerHelper.m */, - 34F4077F1E9E1DA400E57AC0 /* MPAdBrowserController.h */, - 34F407801E9E1DA400E57AC0 /* MPAdBrowserController.m */, - 34F407811E9E1DA400E57AC0 /* MPAdBrowserController.xib */, - 34F407821E9E1DA400E57AC0 /* MPAdConfiguration.h */, - 34F407831E9E1DA400E57AC0 /* MPAdConfiguration.m */, - 34F407841E9E1DA400E57AC0 /* MPAdDestinationDisplayAgent.h */, - 34F407851E9E1DA400E57AC0 /* MPAdDestinationDisplayAgent.m */, - 34F407861E9E1DA400E57AC0 /* MPAdServerCommunicator.h */, - 34F407871E9E1DA400E57AC0 /* MPAdServerCommunicator.m */, - 34F407881E9E1DA400E57AC0 /* MPAdServerURLBuilder.h */, - 34F407891E9E1DA400E57AC0 /* MPAdServerURLBuilder.m */, - 34F4078A1E9E1DA400E57AC0 /* MPAPIEndpoints.h */, - 34F4078B1E9E1DA400E57AC0 /* MPAPIEndpoints.m */, - 34F4078C1E9E1DA400E57AC0 /* MPClosableView.h */, - 34F4078D1E9E1DA400E57AC0 /* MPClosableView.m */, - 34F4078E1E9E1DA400E57AC0 /* MPCountdownTimerView.h */, - 34F4078F1E9E1DA400E57AC0 /* MPCountdownTimerView.m */, - 34F407901E9E1DA400E57AC0 /* MPEnhancedDeeplinkRequest.h */, - 34F407911E9E1DA400E57AC0 /* MPEnhancedDeeplinkRequest.m */, - 34F407921E9E1DA400E57AC0 /* MPFacebookKeywordProvider.h */, - 34F407931E9E1DA400E57AC0 /* MPFacebookKeywordProvider.m */, - 34F407941E9E1DA400E57AC0 /* MPKeywordProvider.h */, - 34F407951E9E1DA400E57AC0 /* MPLastResortDelegate.h */, - 34F407961E9E1DA400E57AC0 /* MPLastResortDelegate.m */, - 34F407971E9E1DA400E57AC0 /* MPProgressOverlayView.h */, - 34F407981E9E1DA400E57AC0 /* MPProgressOverlayView.m */, - 34F407991E9E1DA400E57AC0 /* MPURLActionInfo.h */, - 34F4079A1E9E1DA400E57AC0 /* MPURLActionInfo.m */, - 34F4079B1E9E1DA400E57AC0 /* MPURLResolver.h */, - 34F4079C1E9E1DA400E57AC0 /* MPURLResolver.m */, - 34F4079D1E9E1DA400E57AC0 /* MPVideoConfig.h */, - 34F4079E1E9E1DA400E57AC0 /* MPVideoConfig.m */, - 34F4079F1E9E1DA400E57AC0 /* MPXMLParser.h */, - 34F407A01E9E1DA400E57AC0 /* MPXMLParser.m */, - ); - path = Common; - sourceTree = ""; - }; - 34F407761E9E1DA400E57AC0 /* AdAlerts */ = { - isa = PBXGroup; - children = ( - 34F407771E9E1DA400E57AC0 /* MPAdAlertGestureRecognizer.h */, - 34F407781E9E1DA400E57AC0 /* MPAdAlertGestureRecognizer.m */, - 34F407791E9E1DA400E57AC0 /* MPAdAlertManager.h */, - 34F4077A1E9E1DA400E57AC0 /* MPAdAlertManager.m */, - ); - path = AdAlerts; - sourceTree = ""; - }; - 34F407A11E9E1DA400E57AC0 /* Event Logging */ = { - isa = PBXGroup; - children = ( - 34F407A21E9E1DA400E57AC0 /* MPLogEvent+NativeVideo.h */, - 34F407A31E9E1DA400E57AC0 /* MPLogEvent+NativeVideo.m */, - 34F407A41E9E1DA400E57AC0 /* MPLogEvent.h */, - 34F407A51E9E1DA400E57AC0 /* MPLogEvent.m */, - 34F407A61E9E1DA400E57AC0 /* MPLogEventCommunicator.h */, - 34F407A71E9E1DA400E57AC0 /* MPLogEventCommunicator.m */, - 34F407A81E9E1DA400E57AC0 /* MPLogEventRecorder.h */, - 34F407A91E9E1DA400E57AC0 /* MPLogEventRecorder.m */, - 34F407AA1E9E1DA400E57AC0 /* MPNetworkManager.h */, - 34F407AB1E9E1DA400E57AC0 /* MPNetworkManager.m */, - 34F407AC1E9E1DA400E57AC0 /* MPQRunLoopOperation.h */, - 34F407AD1E9E1DA400E57AC0 /* MPQRunLoopOperation.m */, - 34F407AE1E9E1DA400E57AC0 /* MPRetryingHTTPOperation.h */, - 34F407AF1E9E1DA400E57AC0 /* MPRetryingHTTPOperation.m */, - ); - path = "Event Logging"; - sourceTree = ""; - }; - 34F407B01E9E1DA400E57AC0 /* HTML */ = { - isa = PBXGroup; - children = ( - 34F407B11E9E1DA400E57AC0 /* MPAdWebViewAgent.h */, - 34F407B21E9E1DA400E57AC0 /* MPAdWebViewAgent.m */, - 34F407B31E9E1DA400E57AC0 /* MPHTMLBannerCustomEvent.h */, - 34F407B41E9E1DA400E57AC0 /* MPHTMLBannerCustomEvent.m */, - 34F407B51E9E1DA400E57AC0 /* MPHTMLInterstitialCustomEvent.h */, - 34F407B61E9E1DA400E57AC0 /* MPHTMLInterstitialCustomEvent.m */, - 34F407B71E9E1DA400E57AC0 /* MPHTMLInterstitialViewController.h */, - 34F407B81E9E1DA400E57AC0 /* MPHTMLInterstitialViewController.m */, - 34F407B91E9E1DA400E57AC0 /* MPWebView.h */, - 34F407BA1E9E1DA400E57AC0 /* MPWebView.m */, - ); - path = HTML; - sourceTree = ""; - }; - 34F407BB1E9E1DA400E57AC0 /* Interstitials */ = { - isa = PBXGroup; - children = ( - 34F407BC1E9E1DA400E57AC0 /* MPBaseInterstitialAdapter.h */, - 34F407BD1E9E1DA400E57AC0 /* MPBaseInterstitialAdapter.m */, - 34F407BE1E9E1DA400E57AC0 /* MPInterstitialAdManager.h */, - 34F407BF1E9E1DA400E57AC0 /* MPInterstitialAdManager.m */, - 34F407C01E9E1DA400E57AC0 /* MPInterstitialAdManagerDelegate.h */, - 34F407C11E9E1DA400E57AC0 /* MPInterstitialCustomEventAdapter.h */, - 34F407C21E9E1DA400E57AC0 /* MPInterstitialCustomEventAdapter.m */, - 34F407C31E9E1DA400E57AC0 /* MPInterstitialViewController.h */, - 34F407C41E9E1DA400E57AC0 /* MPInterstitialViewController.m */, - 34F407C51E9E1DA400E57AC0 /* MPPrivateInterstitialCustomEventDelegate.h */, - ); - path = Interstitials; - sourceTree = ""; - }; - 34F407CC1E9E1DA400E57AC0 /* MRAID */ = { - isa = PBXGroup; - children = ( - 34F407CD1E9E1DA400E57AC0 /* LICENSE */, - 34F407CE1E9E1DA400E57AC0 /* MPForceableOrientationProtocol.h */, - 34F407CF1E9E1DA400E57AC0 /* MPMRAIDBannerCustomEvent.h */, - 34F407D01E9E1DA400E57AC0 /* MPMRAIDBannerCustomEvent.m */, - 34F407D11E9E1DA400E57AC0 /* MPMRAIDInterstitialCustomEvent.h */, - 34F407D21E9E1DA400E57AC0 /* MPMRAIDInterstitialCustomEvent.m */, - 34F407D31E9E1DA400E57AC0 /* MPMRAIDInterstitialViewController.h */, - 34F407D41E9E1DA400E57AC0 /* MPMRAIDInterstitialViewController.m */, - 34F407D51E9E1DA400E57AC0 /* MRBridge.h */, - 34F407D61E9E1DA400E57AC0 /* MRBridge.m */, - 34F407D71E9E1DA400E57AC0 /* MRBundleManager.h */, - 34F407D81E9E1DA400E57AC0 /* MRBundleManager.m */, - 34F407D91E9E1DA400E57AC0 /* MRCommand.h */, - 34F407DA1E9E1DA400E57AC0 /* MRCommand.m */, - 34F407DB1E9E1DA400E57AC0 /* MRConstants.h */, - 34F407DC1E9E1DA400E57AC0 /* MRConstants.m */, - 34F407DD1E9E1DA400E57AC0 /* MRController.h */, - 34F407DE1E9E1DA400E57AC0 /* MRController.m */, - 34F407DF1E9E1DA400E57AC0 /* MRError.h */, - 34F407E01E9E1DA400E57AC0 /* MRError.m */, - 34F407E11E9E1DA400E57AC0 /* MRExpandModalViewController.h */, - 34F407E21E9E1DA400E57AC0 /* MRExpandModalViewController.m */, - 34F407E31E9E1DA400E57AC0 /* MRNativeCommandHandler.h */, - 34F407E41E9E1DA400E57AC0 /* MRNativeCommandHandler.m */, - 34F407E51E9E1DA400E57AC0 /* MRProperty.h */, - 34F407E61E9E1DA400E57AC0 /* MRProperty.m */, - 34F407E71E9E1DA400E57AC0 /* MRVideoPlayerManager.h */, - 34F407E81E9E1DA400E57AC0 /* MRVideoPlayerManager.m */, - ); - path = MRAID; - sourceTree = ""; - }; - 34F407E91E9E1DA400E57AC0 /* Utility */ = { - isa = PBXGroup; - children = ( - 34F407EA1E9E1DA400E57AC0 /* Categories */, - 34F407FB1E9E1DA400E57AC0 /* MPAnalyticsTracker.h */, - 34F407FC1E9E1DA400E57AC0 /* MPAnalyticsTracker.m */, - 34F407FD1E9E1DA400E57AC0 /* MPError.h */, - 34F407FE1E9E1DA400E57AC0 /* MPError.m */, - 34F407FF1E9E1DA400E57AC0 /* MPGeolocationProvider.h */, - 34F408001E9E1DA400E57AC0 /* MPGeolocationProvider.m */, - 34F408011E9E1DA400E57AC0 /* MPGlobal.h */, - 34F408021E9E1DA400E57AC0 /* MPGlobal.m */, - 34F408031E9E1DA400E57AC0 /* MPIdentityProvider.h */, - 34F408041E9E1DA400E57AC0 /* MPIdentityProvider.m */, - 34F408051E9E1DA400E57AC0 /* MPInternalUtils.h */, - 34F408061E9E1DA400E57AC0 /* MPInternalUtils.m */, - 34F408071E9E1DA400E57AC0 /* MPLogging.h */, - 34F408081E9E1DA400E57AC0 /* MPLogging.m */, - 34F408091E9E1DA400E57AC0 /* MPLogProvider.h */, - 34F4080A1E9E1DA400E57AC0 /* MPLogProvider.m */, - 34F4080B1E9E1DA400E57AC0 /* MPReachability.h */, - 34F4080C1E9E1DA400E57AC0 /* MPReachability.m */, - 34F4080D1E9E1DA400E57AC0 /* MPSessionTracker.h */, - 34F4080E1E9E1DA400E57AC0 /* MPSessionTracker.m */, - 34F4080F1E9E1DA400E57AC0 /* MPStoreKitProvider.h */, - 34F408101E9E1DA400E57AC0 /* MPStoreKitProvider.m */, - 34F408111E9E1DA400E57AC0 /* MPTimer.h */, - 34F408121E9E1DA400E57AC0 /* MPTimer.m */, - 34F408131E9E1DA400E57AC0 /* MPUserInteractionGestureRecognizer.h */, - 34F408141E9E1DA400E57AC0 /* MPUserInteractionGestureRecognizer.m */, - ); - path = Utility; - sourceTree = ""; - }; - 34F407EA1E9E1DA400E57AC0 /* Categories */ = { - isa = PBXGroup; - children = ( - 34F407EB1E9E1DA400E57AC0 /* NSBundle+MPAdditions.h */, - 34F407EC1E9E1DA400E57AC0 /* NSBundle+MPAdditions.m */, - 34F407ED1E9E1DA400E57AC0 /* NSHTTPURLResponse+MPAdditions.h */, - 34F407EE1E9E1DA400E57AC0 /* NSHTTPURLResponse+MPAdditions.m */, - 34F407EF1E9E1DA400E57AC0 /* NSJSONSerialization+MPAdditions.h */, - 34F407F01E9E1DA400E57AC0 /* NSJSONSerialization+MPAdditions.m */, - 34F407F11E9E1DA400E57AC0 /* NSURL+MPAdditions.h */, - 34F407F21E9E1DA400E57AC0 /* NSURL+MPAdditions.m */, - 34F407F31E9E1DA400E57AC0 /* UIButton+MPAdditions.h */, - 34F407F41E9E1DA400E57AC0 /* UIButton+MPAdditions.m */, - 34F407F51E9E1DA400E57AC0 /* UIColor+MPAdditions.h */, - 34F407F61E9E1DA400E57AC0 /* UIColor+MPAdditions.m */, - 34F407F71E9E1DA400E57AC0 /* UIView+MPAdditions.h */, - 34F407F81E9E1DA400E57AC0 /* UIView+MPAdditions.m */, - 34F407F91E9E1DA400E57AC0 /* UIWebView+MPAdditions.h */, - 34F407FA1E9E1DA400E57AC0 /* UIWebView+MPAdditions.m */, - ); - path = Categories; - sourceTree = ""; - }; - 34F408151E9E1DA400E57AC0 /* VAST */ = { - isa = PBXGroup; - children = ( - 34F408161E9E1DA400E57AC0 /* MPVASTAd.h */, - 34F408171E9E1DA400E57AC0 /* MPVASTAd.m */, - 34F408181E9E1DA400E57AC0 /* MPVASTCompanionAd.h */, - 34F408191E9E1DA400E57AC0 /* MPVASTCompanionAd.m */, - 34F4081A1E9E1DA400E57AC0 /* MPVASTCreative.h */, - 34F4081B1E9E1DA400E57AC0 /* MPVASTCreative.m */, - 34F4081C1E9E1DA400E57AC0 /* MPVASTDurationOffset.h */, - 34F4081D1E9E1DA400E57AC0 /* MPVASTDurationOffset.m */, - 34F4081E1E9E1DA400E57AC0 /* MPVASTIndustryIcon.h */, - 34F4081F1E9E1DA400E57AC0 /* MPVASTIndustryIcon.m */, - 34F408201E9E1DA400E57AC0 /* MPVASTInline.h */, - 34F408211E9E1DA400E57AC0 /* MPVASTInline.m */, - 34F408221E9E1DA400E57AC0 /* MPVASTLinearAd.h */, - 34F408231E9E1DA400E57AC0 /* MPVASTLinearAd.m */, - 34F408241E9E1DA400E57AC0 /* MPVASTMacroProcessor.h */, - 34F408251E9E1DA400E57AC0 /* MPVASTMacroProcessor.m */, - 34F408261E9E1DA400E57AC0 /* MPVASTManager.h */, - 34F408271E9E1DA400E57AC0 /* MPVASTManager.m */, - 34F408281E9E1DA400E57AC0 /* MPVASTMediaFile.h */, - 34F408291E9E1DA400E57AC0 /* MPVASTMediaFile.m */, - 34F4082A1E9E1DA400E57AC0 /* MPVASTModel.h */, - 34F4082B1E9E1DA400E57AC0 /* MPVASTModel.m */, - 34F4082C1E9E1DA400E57AC0 /* MPVASTResource.h */, - 34F4082D1E9E1DA400E57AC0 /* MPVASTResource.m */, - 34F4082E1E9E1DA400E57AC0 /* MPVASTResponse.h */, - 34F4082F1E9E1DA400E57AC0 /* MPVASTResponse.m */, - 34F408301E9E1DA400E57AC0 /* MPVASTStringUtilities.h */, - 34F408311E9E1DA400E57AC0 /* MPVASTStringUtilities.m */, - 34F408321E9E1DA400E57AC0 /* MPVASTTrackingEvent.h */, - 34F408331E9E1DA400E57AC0 /* MPVASTTrackingEvent.m */, - 34F408341E9E1DA400E57AC0 /* MPVASTWrapper.h */, - 34F408351E9E1DA400E57AC0 /* MPVASTWrapper.m */, - ); - path = VAST; - sourceTree = ""; - }; - 34F408471E9E1DA400E57AC0 /* Native Ads */ = { - isa = PBXGroup; - children = ( - 34F408481E9E1DA400E57AC0 /* Internal */, - 34F4086E1E9E1DA400E57AC0 /* MPAdPositioning.h */, - 34F4086F1E9E1DA400E57AC0 /* MPAdPositioning.m */, - 34F408701E9E1DA400E57AC0 /* MPClientAdPositioning.h */, - 34F408711E9E1DA400E57AC0 /* MPClientAdPositioning.m */, - 34F408721E9E1DA400E57AC0 /* MPCollectionViewAdPlacer.h */, - 34F408731E9E1DA400E57AC0 /* MPCollectionViewAdPlacer.m */, - 34F408741E9E1DA400E57AC0 /* MPNativeAd.h */, - 34F408751E9E1DA400E57AC0 /* MPNativeAd.m */, - 34F408761E9E1DA400E57AC0 /* MPNativeAdAdapter.h */, - 34F408771E9E1DA400E57AC0 /* MPNativeAdConstants.h */, - 34F408781E9E1DA400E57AC0 /* MPNativeAdConstants.m */, - 34F408791E9E1DA400E57AC0 /* MPNativeAdData.h */, - 34F4087A1E9E1DA400E57AC0 /* MPNativeAdData.m */, - 34F4087B1E9E1DA400E57AC0 /* MPNativeAdDelegate.h */, - 34F4087C1E9E1DA400E57AC0 /* MPNativeAdError.h */, - 34F4087D1E9E1DA400E57AC0 /* MPNativeAdError.m */, - 34F4087E1E9E1DA400E57AC0 /* MPNativeAdRenderer.h */, - 34F4087F1E9E1DA400E57AC0 /* MPNativeAdRendererConfiguration.h */, - 34F408801E9E1DA400E57AC0 /* MPNativeAdRendererConfiguration.m */, - 34F408811E9E1DA400E57AC0 /* MPNativeAdRendererSettings.h */, - 34F408821E9E1DA400E57AC0 /* MPNativeAdRendering.h */, - 34F408831E9E1DA400E57AC0 /* MPNativeAdRenderingImageLoader.h */, - 34F408841E9E1DA400E57AC0 /* MPNativeAdRenderingImageLoader.m */, - 34F408851E9E1DA400E57AC0 /* MPNativeAdRequest.h */, - 34F408861E9E1DA400E57AC0 /* MPNativeAdRequest.m */, - 34F408871E9E1DA400E57AC0 /* MPNativeAdRequestTargeting.h */, - 34F408881E9E1DA400E57AC0 /* MPNativeAdRequestTargeting.m */, - 34F408891E9E1DA400E57AC0 /* MPNativeAdSource.h */, - 34F4088A1E9E1DA400E57AC0 /* MPNativeAdSource.m */, - 34F4088B1E9E1DA400E57AC0 /* MPNativeAdSourceDelegate.h */, - 34F4088C1E9E1DA400E57AC0 /* MPNativeCustomEvent.h */, - 34F4088D1E9E1DA400E57AC0 /* MPNativeCustomEvent.m */, - 34F4088E1E9E1DA400E57AC0 /* MPNativeCustomEventDelegate.h */, - 34F4088F1E9E1DA400E57AC0 /* MPServerAdPositioning.h */, - 34F408901E9E1DA400E57AC0 /* MPServerAdPositioning.m */, - 34F408911E9E1DA400E57AC0 /* MPStaticNativeAdRenderer.h */, - 34F408921E9E1DA400E57AC0 /* MPStaticNativeAdRenderer.m */, - 34F408931E9E1DA400E57AC0 /* MPStaticNativeAdRendererSettings.h */, - 34F408941E9E1DA400E57AC0 /* MPStaticNativeAdRendererSettings.m */, - 34F408951E9E1DA400E57AC0 /* MPStreamAdPlacementData.h */, - 34F408961E9E1DA400E57AC0 /* MPStreamAdPlacementData.m */, - 34F408971E9E1DA400E57AC0 /* MPStreamAdPlacer.h */, - 34F408981E9E1DA400E57AC0 /* MPStreamAdPlacer.m */, - 34F408991E9E1DA400E57AC0 /* MPTableViewAdPlacer.h */, - 34F4089A1E9E1DA400E57AC0 /* MPTableViewAdPlacer.m */, - ); - path = "Native Ads"; - sourceTree = ""; - }; - 34F408481E9E1DA400E57AC0 /* Internal */ = { - isa = PBXGroup; - children = ( - 34F408491E9E1DA400E57AC0 /* Categories */, - 34F4084B1E9E1DA400E57AC0 /* MPAdPlacerInvocation.h */, - 34F4084C1E9E1DA400E57AC0 /* MPAdPlacerInvocation.m */, - 34F4084D1E9E1DA400E57AC0 /* MPCollectionViewAdPlacerCell.h */, - 34F4084E1E9E1DA400E57AC0 /* MPCollectionViewAdPlacerCell.m */, - 34F4084F1E9E1DA400E57AC0 /* MPDiskLRUCache.h */, - 34F408501E9E1DA400E57AC0 /* MPDiskLRUCache.m */, - 34F408511E9E1DA400E57AC0 /* MPImageDownloadQueue.h */, - 34F408521E9E1DA400E57AC0 /* MPImageDownloadQueue.m */, - 34F408531E9E1DA400E57AC0 /* MPMoPubNativeAdAdapter.h */, - 34F408541E9E1DA400E57AC0 /* MPMoPubNativeAdAdapter.m */, - 34F408551E9E1DA400E57AC0 /* MPMoPubNativeCustomEvent.h */, - 34F408561E9E1DA400E57AC0 /* MPMoPubNativeCustomEvent.m */, - 34F408571E9E1DA400E57AC0 /* MPNativeAd+Internal.h */, - 34F408581E9E1DA400E57AC0 /* MPNativeAd+Internal.m */, - 34F408591E9E1DA400E57AC0 /* MPNativeAdRendererConstants.h */, - 34F4085A1E9E1DA400E57AC0 /* MPNativeAdRendererImageHandler.h */, - 34F4085B1E9E1DA400E57AC0 /* MPNativeAdRendererImageHandler.m */, - 34F4085C1E9E1DA400E57AC0 /* MPNativeAdSourceQueue.h */, - 34F4085D1E9E1DA400E57AC0 /* MPNativeAdSourceQueue.m */, - 34F4085E1E9E1DA400E57AC0 /* MPNativeAdUtils.h */, - 34F4085F1E9E1DA400E57AC0 /* MPNativeAdUtils.m */, - 34F408601E9E1DA400E57AC0 /* MPNativeCache.h */, - 34F408611E9E1DA400E57AC0 /* MPNativeCache.m */, - 34F408621E9E1DA400E57AC0 /* MPNativePositionResponseDeserializer.h */, - 34F408631E9E1DA400E57AC0 /* MPNativePositionResponseDeserializer.m */, - 34F408641E9E1DA400E57AC0 /* MPNativePositionSource.h */, - 34F408651E9E1DA400E57AC0 /* MPNativePositionSource.m */, - 34F408661E9E1DA400E57AC0 /* MPNativeView.h */, - 34F408671E9E1DA400E57AC0 /* MPNativeView.m */, - 34F408681E9E1DA400E57AC0 /* MPStaticNativeAdImpressionTimer.h */, - 34F408691E9E1DA400E57AC0 /* MPStaticNativeAdImpressionTimer.m */, - 34F4086A1E9E1DA400E57AC0 /* MPTableViewAdPlacerCell.h */, - 34F4086B1E9E1DA400E57AC0 /* MPTableViewAdPlacerCell.m */, - 34F4086C1E9E1DA400E57AC0 /* MPTableViewCellImpressionTracker.h */, - 34F4086D1E9E1DA400E57AC0 /* MPTableViewCellImpressionTracker.m */, - ); - path = Internal; - sourceTree = ""; - }; - 34F408491E9E1DA400E57AC0 /* Categories */ = { - isa = PBXGroup; - children = ( - 34F4084A1E9E1DA400E57AC0 /* MPNativeAdRequest+MPNativeAdSource.h */, - ); - path = Categories; - sourceTree = ""; - }; - 34F4089B1E9E1DA400E57AC0 /* NativeVideo */ = { - isa = PBXGroup; - children = ( - 34F4089C1E9E1DA400E57AC0 /* Internal */, - 34F408B51E9E1DA400E57AC0 /* MOPUBNativeVideoAdRenderer.h */, - 34F408B61E9E1DA400E57AC0 /* MOPUBNativeVideoAdRenderer.m */, - 34F408B71E9E1DA400E57AC0 /* MOPUBNativeVideoAdRendererSettings.h */, - 34F408B81E9E1DA400E57AC0 /* MOPUBNativeVideoAdRendererSettings.m */, + 45A3790420B33956005FBDBB /* MOPUBNativeVideoAdRendererSettings.m */, + 45A3790520B33956005FBDBB /* Internal */, + 45A3791E20B33956005FBDBB /* MOPUBNativeVideoAdRenderer.h */, + 45A3791F20B33956005FBDBB /* MOPUBNativeVideoAdRendererSettings.h */, + 45A3792020B33956005FBDBB /* MOPUBNativeVideoAdRenderer.m */, ); path = NativeVideo; sourceTree = ""; }; - 34F4089C1E9E1DA400E57AC0 /* Internal */ = { + 45A3790520B33956005FBDBB /* Internal */ = { isa = PBXGroup; children = ( - 34F4089D1E9E1DA400E57AC0 /* MOPUBActivityIndicatorView.h */, - 34F4089E1E9E1DA400E57AC0 /* MOPUBActivityIndicatorView.m */, - 34F4089F1E9E1DA400E57AC0 /* MOPUBAVPlayer.h */, - 34F408A01E9E1DA400E57AC0 /* MOPUBAVPlayer.m */, - 34F408A11E9E1DA400E57AC0 /* MOPUBAVPlayerView.h */, - 34F408A21E9E1DA400E57AC0 /* MOPUBAVPlayerView.m */, - 34F408A31E9E1DA400E57AC0 /* MOPUBFullscreenPlayerViewController.h */, - 34F408A41E9E1DA400E57AC0 /* MOPUBFullscreenPlayerViewController.m */, - 34F408A51E9E1DA400E57AC0 /* MOPUBNativeVideoAdAdapter.h */, - 34F408A61E9E1DA400E57AC0 /* MOPUBNativeVideoAdAdapter.m */, - 34F408A71E9E1DA400E57AC0 /* MOPUBNativeVideoAdConfigValues.h */, - 34F408A81E9E1DA400E57AC0 /* MOPUBNativeVideoAdConfigValues.m */, - 34F408A91E9E1DA400E57AC0 /* MOPUBNativeVideoCustomEvent.h */, - 34F408AA1E9E1DA400E57AC0 /* MOPUBNativeVideoCustomEvent.m */, - 34F408AB1E9E1DA400E57AC0 /* MOPUBNativeVideoImpressionAgent.h */, - 34F408AC1E9E1DA400E57AC0 /* MOPUBNativeVideoImpressionAgent.m */, - 34F408AD1E9E1DA400E57AC0 /* MOPUBPlayerManager.h */, - 34F408AE1E9E1DA400E57AC0 /* MOPUBPlayerManager.m */, - 34F408AF1E9E1DA400E57AC0 /* MOPUBPlayerView.h */, - 34F408B01E9E1DA400E57AC0 /* MOPUBPlayerView.m */, - 34F408B11E9E1DA400E57AC0 /* MOPUBPlayerViewController.h */, - 34F408B21E9E1DA400E57AC0 /* MOPUBPlayerViewController.m */, - 34F408B31E9E1DA400E57AC0 /* MOPUBReplayView.h */, - 34F408B41E9E1DA400E57AC0 /* MOPUBReplayView.m */, + 45A3790620B33956005FBDBB /* MOPUBPlayerManager.m */, + 45A3790720B33956005FBDBB /* MOPUBNativeVideoAdConfigValues.h */, + 45A3790820B33956005FBDBB /* MOPUBReplayView.h */, + 45A3790920B33956005FBDBB /* MOPUBNativeVideoAdAdapter.m */, + 45A3790A20B33956005FBDBB /* MOPUBNativeVideoCustomEvent.m */, + 45A3790B20B33956005FBDBB /* MOPUBAVPlayerView.h */, + 45A3790C20B33956005FBDBB /* MOPUBPlayerView.m */, + 45A3790D20B33956005FBDBB /* MOPUBFullscreenPlayerViewController.m */, + 45A3790E20B33956005FBDBB /* MOPUBNativeVideoImpressionAgent.m */, + 45A3790F20B33956005FBDBB /* MOPUBActivityIndicatorView.m */, + 45A3791020B33956005FBDBB /* MOPUBPlayerViewController.m */, + 45A3791120B33956005FBDBB /* MOPUBAVPlayer.h */, + 45A3791220B33956005FBDBB /* MOPUBPlayerManager.h */, + 45A3791320B33956005FBDBB /* MOPUBReplayView.m */, + 45A3791420B33956005FBDBB /* MOPUBNativeVideoAdAdapter.h */, + 45A3791520B33956005FBDBB /* MOPUBNativeVideoAdConfigValues.m */, + 45A3791620B33956005FBDBB /* MOPUBFullscreenPlayerViewController.h */, + 45A3791720B33956005FBDBB /* MOPUBPlayerView.h */, + 45A3791820B33956005FBDBB /* MOPUBAVPlayerView.m */, + 45A3791920B33956005FBDBB /* MOPUBNativeVideoCustomEvent.h */, + 45A3791A20B33956005FBDBB /* MOPUBAVPlayer.m */, + 45A3791B20B33956005FBDBB /* MOPUBPlayerViewController.h */, + 45A3791C20B33956005FBDBB /* MOPUBActivityIndicatorView.h */, + 45A3791D20B33956005FBDBB /* MOPUBNativeVideoImpressionAgent.h */, ); path = Internal; sourceTree = ""; }; - 34F408B91E9E1DA400E57AC0 /* Resources */ = { + 45A3792220B33956005FBDBB /* NativeAds */ = { isa = PBXGroup; children = ( - 34F408BA1E9E1DA400E57AC0 /* MPCloseBtn.png */, - 34F408BB1E9E1DA400E57AC0 /* MPCloseBtn@2x.png */, - 34F408BC1E9E1DA400E57AC0 /* MPCloseBtn@3x.png */, - 34F408BD1E9E1DA400E57AC0 /* MPCloseButtonX.png */, - 34F408BE1E9E1DA400E57AC0 /* MPCloseButtonX@2x.png */, - 34F408BF1E9E1DA400E57AC0 /* MPCloseButtonX@3x.png */, - 34F408C01E9E1DA400E57AC0 /* MPCountdownTimer.html */, - 34F408C11E9E1DA400E57AC0 /* MPDAAIcon.png */, - 34F408C21E9E1DA400E57AC0 /* MPDAAIcon@2x.png */, - 34F408C31E9E1DA400E57AC0 /* MPDAAIcon@3x.png */, - 34F408C41E9E1DA400E57AC0 /* MPMutedBtn.png */, - 34F408C51E9E1DA400E57AC0 /* MPMutedBtn@2x.png */, - 34F408C61E9E1DA400E57AC0 /* MPMutedBtn@3x.png */, - 34F408C71E9E1DA400E57AC0 /* MPPlayBtn.png */, - 34F408C81E9E1DA400E57AC0 /* MPPlayBtn@2x.png */, - 34F408C91E9E1DA400E57AC0 /* MPPlayBtn@3x.png */, - 34F408CA1E9E1DA400E57AC0 /* MPUnmutedBtn.png */, - 34F408CB1E9E1DA400E57AC0 /* MPUnmutedBtn@2x.png */, - 34F408CC1E9E1DA400E57AC0 /* MPUnmutedBtn@3x.png */, - 34F408CD1E9E1DA400E57AC0 /* MRAID.bundle */, + 45A3792320B33956005FBDBB /* MPServerAdPositioning.m */, + 45A3792420B33956005FBDBB /* MPNativeCustomEvent.m */, + 45A3792520B33956005FBDBB /* MPNativeAdRequest.m */, + 45A3792620B33956005FBDBB /* MPStreamAdPlacer.m */, + 45A3792720B33956005FBDBB /* MPNativeAdRendererConfiguration.h */, + 45A3792820B33956005FBDBB /* MPCollectionViewAdPlacer.m */, + 45A3792920B33956005FBDBB /* MPAdPositioning.h */, + 45A3792A20B33956005FBDBB /* MPNativeAdConstants.h */, + 45A3792B20B33956005FBDBB /* MPNativeAdData.m */, + 45A3792C20B33956005FBDBB /* MPStaticNativeAdRendererSettings.m */, + 45A3792D20B33956005FBDBB /* MPNativeAdAdapter.h */, + 45A3792E20B33956005FBDBB /* MPNativeAdSource.m */, + 45A3792F20B33956005FBDBB /* MPNativeAdError.m */, + 45A3793020B33956005FBDBB /* MPStaticNativeAdRenderer.h */, + 45A3793120B33956005FBDBB /* MPStreamAdPlacementData.m */, + 45A3793220B33956005FBDBB /* MPNativeCustomEventDelegate.h */, + 45A3793320B33956005FBDBB /* MPNativeAdRenderingImageLoader.h */, + 45A3793420B33956005FBDBB /* Internal */, + 45A3795C20B33957005FBDBB /* MPClientAdPositioning.h */, + 45A3795D20B33957005FBDBB /* MPTableViewAdPlacer.m */, + 45A3795E20B33957005FBDBB /* MPNativeAd.h */, + 45A3795F20B33957005FBDBB /* MPNativeAdRequestTargeting.h */, + 45A3796020B33957005FBDBB /* MPNativeCustomEvent.h */, + 45A3796120B33957005FBDBB /* MPNativeAdSourceDelegate.h */, + 45A3796220B33957005FBDBB /* MPNativeAdRendererSettings.h */, + 45A3796320B33957005FBDBB /* MPNativeAdRenderer.h */, + 45A3796420B33957005FBDBB /* MPServerAdPositioning.h */, + 45A3796520B33957005FBDBB /* MPNativeAdData.h */, + 45A3796620B33957005FBDBB /* MPNativeAdConstants.m */, + 45A3796720B33957005FBDBB /* MPCollectionViewAdPlacer.h */, + 45A3796820B33957005FBDBB /* MPAdPositioning.m */, + 45A3796920B33957005FBDBB /* MPNativeAdRendererConfiguration.m */, + 45A3796A20B33957005FBDBB /* MPStreamAdPlacer.h */, + 45A3796B20B33957005FBDBB /* MPNativeAdRequest.h */, + 45A3796C20B33957005FBDBB /* MPNativeAdDelegate.h */, + 45A3796D20B33957005FBDBB /* MPNativeAdRenderingImageLoader.m */, + 45A3796E20B33957005FBDBB /* MPStreamAdPlacementData.h */, + 45A3796F20B33957005FBDBB /* MPStaticNativeAdRenderer.m */, + 45A3797020B33957005FBDBB /* MPNativeAdSource.h */, + 45A3797120B33957005FBDBB /* MPNativeAdError.h */, + 45A3797220B33957005FBDBB /* MPStaticNativeAdRendererSettings.h */, + 45A3797320B33957005FBDBB /* MPNativeAd.m */, + 45A3797420B33957005FBDBB /* MPNativeAdRequestTargeting.m */, + 45A3797520B33957005FBDBB /* MPNativeAdRendering.h */, + 45A3797620B33957005FBDBB /* MPTableViewAdPlacer.h */, + 45A3797720B33957005FBDBB /* MPClientAdPositioning.m */, + ); + path = NativeAds; + sourceTree = ""; + }; + 45A3793420B33956005FBDBB /* Internal */ = { + isa = PBXGroup; + children = ( + 45A3793520B33956005FBDBB /* MPNativeAd+Internal.m */, + 45A3793620B33956005FBDBB /* MPTableViewAdPlacerCell.h */, + 45A3793720B33957005FBDBB /* MPCollectionViewAdPlacerCell.h */, + 45A3793820B33957005FBDBB /* MPNativePositionSource.m */, + 45A3793920B33957005FBDBB /* MPMoPubNativeAdAdapter.m */, + 45A3793A20B33957005FBDBB /* MPNativeView.h */, + 45A3793B20B33957005FBDBB /* MPNativeAdRendererImageHandler.h */, + 45A3793C20B33957005FBDBB /* MPAdPlacerInvocation.h */, + 45A3793D20B33957005FBDBB /* MPNativeAdSourceQueue.h */, + 45A3793E20B33957005FBDBB /* MPNativeAdConfigValues+Internal.h */, + 45A3793F20B33957005FBDBB /* MPNativeAdUtils.m */, + 45A3794020B33957005FBDBB /* MPNativeCache.h */, + 45A3794120B33957005FBDBB /* MPMoPubNativeCustomEvent.h */, + 45A3794220B33957005FBDBB /* MPDiskLRUCache.m */, + 45A3794320B33957005FBDBB /* MPTableViewCellImpressionTracker.h */, + 45A3794420B33957005FBDBB /* MPNativePositionResponseDeserializer.m */, + 45A3794520B33957005FBDBB /* MPImageDownloadQueue.m */, + 45A3794620B33957005FBDBB /* MPNativeAdConfigValues.m */, + 45A3794720B33957005FBDBB /* MPMoPubNativeAdAdapter.h */, + 45A3794820B33957005FBDBB /* MPNativePositionSource.h */, + 45A3794920B33957005FBDBB /* MPCollectionViewAdPlacerCell.m */, + 45A3794A20B33957005FBDBB /* MPTableViewAdPlacerCell.m */, + 45A3794B20B33957005FBDBB /* MPNativeAd+Internal.h */, + 45A3794C20B33957005FBDBB /* MPNativeAdConfigValues+Internal.m */, + 45A3794D20B33957005FBDBB /* MPAdPlacerInvocation.m */, + 45A3794E20B33957005FBDBB /* MPNativeAdSourceQueue.m */, + 45A3794F20B33957005FBDBB /* MPNativeAdRendererImageHandler.m */, + 45A3795020B33957005FBDBB /* MPNativeView.m */, + 45A3795120B33957005FBDBB /* MPTableViewCellImpressionTracker.m */, + 45A3795220B33957005FBDBB /* MPDiskLRUCache.h */, + 45A3795320B33957005FBDBB /* MPMoPubNativeCustomEvent.m */, + 45A3795420B33957005FBDBB /* MPNativeAdRendererConstants.h */, + 45A3795520B33957005FBDBB /* MPNativeCache.m */, + 45A3795620B33957005FBDBB /* MPNativeAdUtils.h */, + 45A3795720B33957005FBDBB /* MPNativeAdConfigValues.h */, + 45A3795820B33957005FBDBB /* Categories */, + 45A3795A20B33957005FBDBB /* MPImageDownloadQueue.h */, + 45A3795B20B33957005FBDBB /* MPNativePositionResponseDeserializer.h */, + ); + path = Internal; + sourceTree = ""; + }; + 45A3795820B33957005FBDBB /* Categories */ = { + isa = PBXGroup; + children = ( + 45A3795920B33957005FBDBB /* MPNativeAdRequest+MPNativeAdSource.h */, + ); + path = Categories; + sourceTree = ""; + }; + 45A3797920B33957005FBDBB /* Resources */ = { + isa = PBXGroup; + children = ( + 45A3797A20B33957005FBDBB /* MPUnmutedBtn.png */, + 45A3797B20B33957005FBDBB /* MRAID.bundle */, + 45A3797C20B33957005FBDBB /* MPDAAIcon.png */, + 45A3797D20B33957005FBDBB /* MPUnmutedBtn@3x.png */, + 45A3797E20B33957005FBDBB /* MPPlayBtn@2x.png */, + 45A3797F20B33957005FBDBB /* MPCloseBtn@2x.png */, + 45A3798020B33957005FBDBB /* MPCloseBtn@3x.png */, + 45A3798120B33957005FBDBB /* MPCloseBtn.png */, + 45A3798220B33957005FBDBB /* MPPlayBtn@3x.png */, + 45A3798320B33957005FBDBB /* MPUnmutedBtn@2x.png */, + 45A3798420B33957005FBDBB /* MPCountdownTimer.html */, + 45A3798520B33957005FBDBB /* MPCloseButtonX@2x.png */, + 45A3798620B33957005FBDBB /* MPCloseButtonX@3x.png */, + 45A3798720B33957005FBDBB /* MPCloseButtonX.png */, + 45A3798820B33957005FBDBB /* MPDAAIcon@3x.png */, + 45A3798920B33957005FBDBB /* MPMutedBtn@3x.png */, + 45A3798A20B33957005FBDBB /* MPPlayBtn.png */, + 45A3798B20B33957005FBDBB /* MPMutedBtn.png */, + 45A3798C20B33957005FBDBB /* MPMutedBtn@2x.png */, + 45A3798D20B33957005FBDBB /* MPDAAIcon@2x.png */, ); path = Resources; sourceTree = ""; }; - 34F408CE1E9E1DA400E57AC0 /* RewardedVideo */ = { + 45A3798E20B33957005FBDBB /* RewardedVideo */ = { isa = PBXGroup; children = ( - 34F408CF1E9E1DA400E57AC0 /* Internal */, - 34F408DC1E9E1DA400E57AC0 /* MPMediationSettingsProtocol.h */, - 34F408DD1E9E1DA400E57AC0 /* MPRewardedVideo.h */, - 34F408DE1E9E1DA400E57AC0 /* MPRewardedVideo.m */, - 34F408DF1E9E1DA400E57AC0 /* MPRewardedVideoCustomEvent.h */, - 34F408E01E9E1DA400E57AC0 /* MPRewardedVideoCustomEvent.m */, - 34F408E11E9E1DA400E57AC0 /* MPRewardedVideoError.h */, - 34F408E21E9E1DA400E57AC0 /* MPRewardedVideoError.m */, - 34F408E31E9E1DA400E57AC0 /* MPRewardedVideoReward.h */, - 34F408E41E9E1DA400E57AC0 /* MPRewardedVideoReward.m */, + 45A3798F20B33957005FBDBB /* MPRewardedVideoReward.h */, + 45A3799020B33957005FBDBB /* MPRewardedVideoError.h */, + 45A3799120B33957005FBDBB /* MPRewardedVideo.m */, + 45A3799220B33957005FBDBB /* MPRewardedVideoCustomEvent.h */, + 45A3799320B33957005FBDBB /* Internal */, + 45A379A020B33957005FBDBB /* MPRewardedVideoCustomEvent+Caching.h */, + 45A379A120B33957005FBDBB /* MPRewardedVideoReward.m */, + 45A379A220B33957005FBDBB /* MPRewardedVideoError.m */, + 45A379A320B33957005FBDBB /* MPRewardedVideo.h */, + 45A379A420B33957005FBDBB /* MPRewardedVideoCustomEvent+Caching.m */, + 45A379A520B33957005FBDBB /* MPRewardedVideoCustomEvent.m */, ); path = RewardedVideo; sourceTree = ""; }; - 34F408CF1E9E1DA400E57AC0 /* Internal */ = { + 45A3799320B33957005FBDBB /* Internal */ = { isa = PBXGroup; children = ( - 34F408D01E9E1DA400E57AC0 /* MPMoPubRewardedPlayableCustomEvent.h */, - 34F408D11E9E1DA400E57AC0 /* MPMoPubRewardedPlayableCustomEvent.m */, - 34F408D21E9E1DA400E57AC0 /* MPMoPubRewardedVideoCustomEvent.h */, - 34F408D31E9E1DA400E57AC0 /* MPMoPubRewardedVideoCustomEvent.m */, - 34F408D41E9E1DA400E57AC0 /* MPPrivateRewardedVideoCustomEventDelegate.h */, - 34F408D51E9E1DA400E57AC0 /* MPRewardedVideo+Internal.h */, - 34F408D61E9E1DA400E57AC0 /* MPRewardedVideoAdapter.h */, - 34F408D71E9E1DA400E57AC0 /* MPRewardedVideoAdapter.m */, - 34F408D81E9E1DA400E57AC0 /* MPRewardedVideoAdManager.h */, - 34F408D91E9E1DA400E57AC0 /* MPRewardedVideoAdManager.m */, - 34F408DA1E9E1DA400E57AC0 /* MPRewardedVideoConnection.h */, - 34F408DB1E9E1DA400E57AC0 /* MPRewardedVideoConnection.m */, + 45A3799420B33957005FBDBB /* MPMoPubRewardedVideoCustomEvent.m */, + 45A3799520B33957005FBDBB /* MPRewardedVideoAdManager.m */, + 45A3799620B33957005FBDBB /* MPRewardedVideoAdapter.m */, + 45A3799720B33957005FBDBB /* MPRewardedVideo+Internal.h */, + 45A3799820B33957005FBDBB /* MPMoPubRewardedPlayableCustomEvent.m */, + 45A3799920B33957005FBDBB /* MPRewardedVideoConnection.h */, + 45A3799A20B33957005FBDBB /* MPRewardedVideoAdManager.h */, + 45A3799B20B33957005FBDBB /* MPMoPubRewardedVideoCustomEvent.h */, + 45A3799C20B33957005FBDBB /* MPRewardedVideoAdapter.h */, + 45A3799D20B33957005FBDBB /* MPPrivateRewardedVideoCustomEventDelegate.h */, + 45A3799E20B33957005FBDBB /* MPRewardedVideoConnection.m */, + 45A3799F20B33957005FBDBB /* MPMoPubRewardedPlayableCustomEvent.h */, ); path = Internal; sourceTree = ""; }; + 45A379B920B3395B005FBDBB /* Internal */ = { + isa = PBXGroup; + children = ( + 45A379BA20B3395B005FBDBB /* MPConsentManager.h */, + 45A379BB20B3395B005FBDBB /* MPURLRequest.m */, + 45A379BC20B3395B005FBDBB /* MPHTTPNetworkTaskData.m */, + 45A379BD20B3395B005FBDBB /* MPHTTPNetworkSession.h */, + 45A379BE20B3395B005FBDBB /* MPConsentAdServerKeys.h */, + 45A379BF20B3395B005FBDBB /* Interstitials */, + 45A379CA20B3395B005FBDBB /* MPConsentDialogViewController.h */, + 45A379CB20B3395B005FBDBB /* MPMediationManager.h */, + 45A379CC20B3395B005FBDBB /* MPInstanceProvider.h */, + 45A379CD20B3395B005FBDBB /* MPVASTTracking.m */, + 45A379CE20B3395B005FBDBB /* HTML */, + 45A379D920B3395B005FBDBB /* MPCoreInstanceProvider.m */, + 45A379DA20B3395B005FBDBB /* MPAdvancedBiddingManager.h */, + 45A379DB20B3395B005FBDBB /* Banners */, + 45A379E620B3395B005FBDBB /* Common */, + 45A37A1320B3395B005FBDBB /* MPURLRequest.h */, + 45A37A1420B3395B005FBDBB /* MPConsentManager.m */, + 45A37A1520B3395B005FBDBB /* MPHTTPNetworkTaskData.h */, + 45A37A1620B3395B005FBDBB /* MPInstanceProvider.m */, + 45A37A1720B3395B005FBDBB /* MPMediationManager.m */, + 45A37A1820B3395B005FBDBB /* MPConsentDialogViewController.m */, + 45A37A1920B3395B005FBDBB /* MRAID */, + 45A37A3620B3395C005FBDBB /* MPConsentAdServerKeys.m */, + 45A37A3720B3395C005FBDBB /* MPHTTPNetworkSession.m */, + 45A37A3820B3395C005FBDBB /* MPAdvancedBiddingManager.m */, + 45A37A3920B3395C005FBDBB /* MPCoreInstanceProvider.h */, + 45A37A3A20B3395C005FBDBB /* MPVASTTracking.h */, + 45A37A3B20B3395C005FBDBB /* Utility */, + 45A37A6D20B3395C005FBDBB /* VAST */, + ); + path = Internal; + sourceTree = ""; + }; + 45A379BF20B3395B005FBDBB /* Interstitials */ = { + isa = PBXGroup; + children = ( + 45A379C020B3395B005FBDBB /* MPBaseInterstitialAdapter.m */, + 45A379C120B3395B005FBDBB /* MPPrivateInterstitialCustomEventDelegate.h */, + 45A379C220B3395B005FBDBB /* MPInterstitialViewController.m */, + 45A379C320B3395B005FBDBB /* MPInterstitialAdManagerDelegate.h */, + 45A379C420B3395B005FBDBB /* MPInterstitialCustomEventAdapter.h */, + 45A379C520B3395B005FBDBB /* MPInterstitialAdManager.h */, + 45A379C620B3395B005FBDBB /* MPBaseInterstitialAdapter.h */, + 45A379C720B3395B005FBDBB /* MPInterstitialViewController.h */, + 45A379C820B3395B005FBDBB /* MPInterstitialAdManager.m */, + 45A379C920B3395B005FBDBB /* MPInterstitialCustomEventAdapter.m */, + ); + path = Interstitials; + sourceTree = ""; + }; + 45A379CE20B3395B005FBDBB /* HTML */ = { + isa = PBXGroup; + children = ( + 45A379CF20B3395B005FBDBB /* MPAdWebViewAgent.h */, + 45A379D020B3395B005FBDBB /* MPHTMLInterstitialViewController.h */, + 45A379D120B3395B005FBDBB /* MPHTMLBannerCustomEvent.h */, + 45A379D220B3395B005FBDBB /* MPWebView.h */, + 45A379D320B3395B005FBDBB /* MPHTMLInterstitialCustomEvent.m */, + 45A379D420B3395B005FBDBB /* MPHTMLInterstitialViewController.m */, + 45A379D520B3395B005FBDBB /* MPAdWebViewAgent.m */, + 45A379D620B3395B005FBDBB /* MPWebView.m */, + 45A379D720B3395B005FBDBB /* MPHTMLBannerCustomEvent.m */, + 45A379D820B3395B005FBDBB /* MPHTMLInterstitialCustomEvent.h */, + ); + path = HTML; + sourceTree = ""; + }; + 45A379DB20B3395B005FBDBB /* Banners */ = { + isa = PBXGroup; + children = ( + 45A379DC20B3395B005FBDBB /* MPPrivateBannerCustomEventDelegate.h */, + 45A379DD20B3395B005FBDBB /* MPBannerAdManager.m */, + 45A379DE20B3395B005FBDBB /* MPBannerCustomEventAdapter.h */, + 45A379DF20B3395B005FBDBB /* MPBannerAdManagerDelegate.h */, + 45A379E020B3395B005FBDBB /* MPBannerCustomEvent+Internal.m */, + 45A379E120B3395B005FBDBB /* MPBaseBannerAdapter.m */, + 45A379E220B3395B005FBDBB /* MPBannerCustomEventAdapter.m */, + 45A379E320B3395B005FBDBB /* MPBannerAdManager.h */, + 45A379E420B3395B005FBDBB /* MPBaseBannerAdapter.h */, + 45A379E520B3395B005FBDBB /* MPBannerCustomEvent+Internal.h */, + ); + path = Banners; + sourceTree = ""; + }; + 45A379E620B3395B005FBDBB /* Common */ = { + isa = PBXGroup; + children = ( + 45A379E720B3395B005FBDBB /* MPAdDestinationDisplayAgent.m */, + 45A379E820B3395B005FBDBB /* MPAPIEndpoints.m */, + 45A379E920B3395B005FBDBB /* MPRealTimeTimer.h */, + 45A379EA20B3395B005FBDBB /* MPCountdownTimerView.h */, + 45A379EB20B3395B005FBDBB /* MPClosableView.h */, + 45A379EC20B3395B005FBDBB /* MPAdBrowserController.m */, + 45A379ED20B3395B005FBDBB /* MPAdServerCommunicator.m */, + 45A379EE20B3395B005FBDBB /* MPAdConfiguration.m */, + 45A379EF20B3395B005FBDBB /* MPVideoConfig.h */, + 45A379F020B3395B005FBDBB /* MPURLResolver.h */, + 45A379F120B3395B005FBDBB /* MPActivityViewControllerHelper.m */, + 45A379F220B3395B005FBDBB /* MPActivityViewControllerHelper+TweetShare.h */, + 45A379F320B3395B005FBDBB /* MPAdServerURLBuilder.m */, + 45A379F420B3395B005FBDBB /* MPAdImpressionTimer.h */, + 45A379F520B3395B005FBDBB /* MPLastResortDelegate.m */, + 45A379F620B3395B005FBDBB /* MPProgressOverlayView.m */, + 45A379F720B3395B005FBDBB /* MPAdBrowserController.xib */, + 45A379F820B3395B005FBDBB /* MPEnhancedDeeplinkRequest.m */, + 45A379F920B3395B005FBDBB /* MPURLActionInfo.m */, + 45A379FA20B3395B005FBDBB /* MPXMLParser.h */, + 45A379FB20B3395B005FBDBB /* MPAdServerCommunicator.h */, + 45A379FC20B3395B005FBDBB /* MPAdBrowserController.h */, + 45A379FD20B3395B005FBDBB /* MPClosableView.m */, + 45A379FE20B3395B005FBDBB /* MPCountdownTimerView.m */, + 45A379FF20B3395B005FBDBB /* MPRealTimeTimer.m */, + 45A37A0020B3395B005FBDBB /* AdAlerts */, + 45A37A0520B3395B005FBDBB /* MPAdDestinationDisplayAgent.h */, + 45A37A0620B3395B005FBDBB /* MPAPIEndpoints.h */, + 45A37A0720B3395B005FBDBB /* MPActivityViewControllerHelper.h */, + 45A37A0820B3395B005FBDBB /* MPURLResolver.m */, + 45A37A0920B3395B005FBDBB /* MPAdConfiguration.h */, + 45A37A0A20B3395B005FBDBB /* MPVideoConfig.m */, + 45A37A0B20B3395B005FBDBB /* MPAdImpressionTimer.m */, + 45A37A0C20B3395B005FBDBB /* MPAdServerURLBuilder.h */, + 45A37A0D20B3395B005FBDBB /* MPActivityViewControllerHelper+TweetShare.m */, + 45A37A0E20B3395B005FBDBB /* MPXMLParser.m */, + 45A37A0F20B3395B005FBDBB /* MPEnhancedDeeplinkRequest.h */, + 45A37A1020B3395B005FBDBB /* MPURLActionInfo.h */, + 45A37A1120B3395B005FBDBB /* MPProgressOverlayView.h */, + 45A37A1220B3395B005FBDBB /* MPLastResortDelegate.h */, + ); + path = Common; + sourceTree = ""; + }; + 45A37A0020B3395B005FBDBB /* AdAlerts */ = { + isa = PBXGroup; + children = ( + 45A37A0120B3395B005FBDBB /* MPAdAlertGestureRecognizer.h */, + 45A37A0220B3395B005FBDBB /* MPAdAlertManager.m */, + 45A37A0320B3395B005FBDBB /* MPAdAlertGestureRecognizer.m */, + 45A37A0420B3395B005FBDBB /* MPAdAlertManager.h */, + ); + path = AdAlerts; + sourceTree = ""; + }; + 45A37A1920B3395B005FBDBB /* MRAID */ = { + isa = PBXGroup; + children = ( + 45A37A1A20B3395B005FBDBB /* MPMRAIDBannerCustomEvent.m */, + 45A37A1B20B3395B005FBDBB /* MRConstants.m */, + 45A37A1C20B3395B005FBDBB /* MRError.h */, + 45A37A1D20B3395B005FBDBB /* MRBridge.m */, + 45A37A1E20B3395B005FBDBB /* MRNativeCommandHandler.m */, + 45A37A1F20B3395B005FBDBB /* MPForceableOrientationProtocol.h */, + 45A37A2020B3395B005FBDBB /* MRVideoPlayerManager.m */, + 45A37A2120B3395B005FBDBB /* LICENSE */, + 45A37A2220B3395B005FBDBB /* MPMRAIDInterstitialViewController.m */, + 45A37A2320B3395B005FBDBB /* MRCommand.m */, + 45A37A2420B3395B005FBDBB /* MPMRAIDInterstitialCustomEvent.m */, + 45A37A2520B3395B005FBDBB /* MRController.h */, + 45A37A2620B3395B005FBDBB /* MRProperty.m */, + 45A37A2720B3395B005FBDBB /* MRBundleManager.h */, + 45A37A2820B3395B005FBDBB /* MRExpandModalViewController.h */, + 45A37A2920B3395B005FBDBB /* MRNativeCommandHandler.h */, + 45A37A2A20B3395B005FBDBB /* MRBridge.h */, + 45A37A2B20B3395B005FBDBB /* MRError.m */, + 45A37A2C20B3395B005FBDBB /* MRConstants.h */, + 45A37A2D20B3395B005FBDBB /* MPMRAIDBannerCustomEvent.h */, + 45A37A2E20B3395C005FBDBB /* MRCommand.h */, + 45A37A2F20B3395C005FBDBB /* MPMRAIDInterstitialCustomEvent.h */, + 45A37A3020B3395C005FBDBB /* MPMRAIDInterstitialViewController.h */, + 45A37A3120B3395C005FBDBB /* MRVideoPlayerManager.h */, + 45A37A3220B3395C005FBDBB /* MRProperty.h */, + 45A37A3320B3395C005FBDBB /* MRController.m */, + 45A37A3420B3395C005FBDBB /* MRExpandModalViewController.m */, + 45A37A3520B3395C005FBDBB /* MRBundleManager.m */, + ); + path = MRAID; + sourceTree = ""; + }; + 45A37A3B20B3395C005FBDBB /* Utility */ = { + isa = PBXGroup; + children = ( + 45A37A3C20B3395C005FBDBB /* MPSessionTracker.m */, + 45A37A3D20B3395C005FBDBB /* MPLogProvider.m */, + 45A37A3E20B3395C005FBDBB /* MPGlobal.m */, + 45A37A3F20B3395C005FBDBB /* MPInternalUtils.h */, + 45A37A4020B3395C005FBDBB /* MPIdentityProvider.h */, + 45A37A4120B3395C005FBDBB /* MPTimer.m */, + 45A37A4220B3395C005FBDBB /* MPLogging.m */, + 45A37A4320B3395C005FBDBB /* MOPUBExperimentProvider.m */, + 45A37A4420B3395C005FBDBB /* MPStoreKitProvider.h */, + 45A37A4520B3395C005FBDBB /* MPError.h */, + 45A37A4620B3395C005FBDBB /* MPGeolocationProvider.m */, + 45A37A4720B3395C005FBDBB /* MPReachability.m */, + 45A37A4820B3395C005FBDBB /* MPUserInteractionGestureRecognizer.m */, + 45A37A4920B3395C005FBDBB /* MPAnalyticsTracker.m */, + 45A37A4A20B3395C005FBDBB /* MPIdentityProvider.m */, + 45A37A4B20B3395C005FBDBB /* MPInternalUtils.m */, + 45A37A4C20B3395C005FBDBB /* MPSessionTracker.h */, + 45A37A4D20B3395C005FBDBB /* MPGlobal.h */, + 45A37A4E20B3395C005FBDBB /* MPLogProvider.h */, + 45A37A4F20B3395C005FBDBB /* MPError.m */, + 45A37A5020B3395C005FBDBB /* MPStoreKitProvider.m */, + 45A37A5120B3395C005FBDBB /* MOPUBExperimentProvider.h */, + 45A37A5220B3395C005FBDBB /* MPLogging.h */, + 45A37A5320B3395C005FBDBB /* MPTimer.h */, + 45A37A5420B3395C005FBDBB /* MPAnalyticsTracker.h */, + 45A37A5520B3395C005FBDBB /* MPUserInteractionGestureRecognizer.h */, + 45A37A5620B3395C005FBDBB /* MPReachability.h */, + 45A37A5720B3395C005FBDBB /* MPGeolocationProvider.h */, + 45A37A5820B3395C005FBDBB /* Categories */, + ); + path = Utility; + sourceTree = ""; + }; + 45A37A5820B3395C005FBDBB /* Categories */ = { + isa = PBXGroup; + children = ( + 45A37A5920B3395C005FBDBB /* NSString+MPAdditions.h */, + 45A37A5A20B3395C005FBDBB /* NSURL+MPAdditions.m */, + 45A37A5B20B3395C005FBDBB /* UIColor+MPAdditions.m */, + 45A37A5C20B3395C005FBDBB /* UIWebView+MPAdditions.h */, + 45A37A5D20B3395C005FBDBB /* NSJSONSerialization+MPAdditions.h */, + 45A37A5E20B3395C005FBDBB /* UIButton+MPAdditions.m */, + 45A37A5F20B3395C005FBDBB /* UIView+MPAdditions.h */, + 45A37A6020B3395C005FBDBB /* NSString+MPConsentStatus.h */, + 45A37A6120B3395C005FBDBB /* NSBundle+MPAdditions.m */, + 45A37A6220B3395C005FBDBB /* NSHTTPURLResponse+MPAdditions.m */, + 45A37A6320B3395C005FBDBB /* NSString+MPAdditions.m */, + 45A37A6420B3395C005FBDBB /* NSJSONSerialization+MPAdditions.m */, + 45A37A6520B3395C005FBDBB /* UIWebView+MPAdditions.m */, + 45A37A6620B3395C005FBDBB /* UIColor+MPAdditions.h */, + 45A37A6720B3395C005FBDBB /* NSURL+MPAdditions.h */, + 45A37A6820B3395C005FBDBB /* UIView+MPAdditions.m */, + 45A37A6920B3395C005FBDBB /* UIButton+MPAdditions.h */, + 45A37A6A20B3395C005FBDBB /* NSHTTPURLResponse+MPAdditions.h */, + 45A37A6B20B3395C005FBDBB /* NSBundle+MPAdditions.h */, + 45A37A6C20B3395C005FBDBB /* NSString+MPConsentStatus.m */, + ); + path = Categories; + sourceTree = ""; + }; + 45A37A6D20B3395C005FBDBB /* VAST */ = { + isa = PBXGroup; + children = ( + 45A37A6E20B3395C005FBDBB /* MPVASTDurationOffset.h */, + 45A37A6F20B3395C005FBDBB /* MPVASTCompanionAd.h */, + 45A37A7020B3395C005FBDBB /* MPVASTMacroProcessor.h */, + 45A37A7120B3395C005FBDBB /* MPVASTLinearAd.h */, + 45A37A7220B3395C005FBDBB /* MPVASTWrapper.h */, + 45A37A7320B3395C005FBDBB /* MPVASTModel.h */, + 45A37A7420B3395C005FBDBB /* MPVASTCreative.m */, + 45A37A7520B3395C005FBDBB /* MPVASTTrackingEvent.h */, + 45A37A7620B3395C005FBDBB /* MPVASTIndustryIcon.h */, + 45A37A7720B3395C005FBDBB /* MPVASTInline.h */, + 45A37A7820B3395C005FBDBB /* MPVASTMediaFile.m */, + 45A37A7920B3395C005FBDBB /* MPVASTAd.m */, + 45A37A7A20B3395C005FBDBB /* MPVASTManager.h */, + 45A37A7B20B3395C005FBDBB /* MPVASTResponse.h */, + 45A37A7C20B3395C005FBDBB /* MPVASTStringUtilities.h */, + 45A37A7D20B3395C005FBDBB /* MPVASTResource.m */, + 45A37A7E20B3395C005FBDBB /* MPVASTModel.m */, + 45A37A7F20B3395C005FBDBB /* MPVASTWrapper.m */, + 45A37A8020B3395C005FBDBB /* MPVASTLinearAd.m */, + 45A37A8120B3395C005FBDBB /* MPVASTCompanionAd.m */, + 45A37A8220B3395C005FBDBB /* MPVASTMacroProcessor.m */, + 45A37A8320B3395C005FBDBB /* MPVASTDurationOffset.m */, + 45A37A8420B3395C005FBDBB /* MPVASTMediaFile.h */, + 45A37A8520B3395C005FBDBB /* MPVASTIndustryIcon.m */, + 45A37A8620B3395C005FBDBB /* MPVASTInline.m */, + 45A37A8720B3395C005FBDBB /* MPVASTTrackingEvent.m */, + 45A37A8820B3395C005FBDBB /* MPVASTCreative.h */, + 45A37A8920B3395C005FBDBB /* MPVASTResource.h */, + 45A37A8A20B3395C005FBDBB /* MPVASTStringUtilities.m */, + 45A37A8B20B3395C005FBDBB /* MPVASTResponse.m */, + 45A37A8C20B3395C005FBDBB /* MPVASTManager.m */, + 45A37A8D20B3395C005FBDBB /* MPVASTAd.h */, + ); + path = VAST; + sourceTree = ""; + }; + 45A37B6A20B33D63005FBDBB /* FacebookAudienceNetwork */ = { + isa = PBXGroup; + children = ( + 45A37BA220B33FC1005FBDBB /* SDK */, + 45A37B6B20B33D63005FBDBB /* FacebookNativeCustomEvent.m */, + 45A37B6C20B33D63005FBDBB /* FacebookInterstitialCustomEvent.m */, + 45A37B6D20B33D63005FBDBB /* FacebookBannerCustomEvent.h */, + 45A37B6E20B33D63005FBDBB /* FacebookAdvancedBidder.m */, + 45A37B6F20B33D63005FBDBB /* CHANGELOG.md */, + 45A37B7020B33D63005FBDBB /* MoPub-FacebookAudienceNetwork-Podspecs */, + 45A37B7320B33D63005FBDBB /* FacebookRewardedVideoCustomEvent.m */, + 45A37B7420B33D63005FBDBB /* FacebookNativeAdAdapter.m */, + 45A37B7520B33D63005FBDBB /* FacebookInterstitialCustomEvent.h */, + 45A37B7620B33D63005FBDBB /* FacebookNativeCustomEvent.h */, + 45A37B7720B33D63005FBDBB /* README.md */, + 45A37B7820B33D63005FBDBB /* FacebookAdvancedBidder.h */, + 45A37B7920B33D63005FBDBB /* FacebookBannerCustomEvent.m */, + 45A37B7A20B33D63005FBDBB /* FacebookNativeAdAdapter.h */, + 45A37B7B20B33D63005FBDBB /* FacebookRewardedVideoCustomEvent.h */, + ); + path = FacebookAudienceNetwork; + sourceTree = ""; + }; + 45A37B7020B33D63005FBDBB /* MoPub-FacebookAudienceNetwork-Podspecs */ = { + isa = PBXGroup; + children = ( + 45A37B7120B33D63005FBDBB /* LICENSE */, + 45A37B7220B33D63005FBDBB /* MoPub-FacebookAudienceNetwork-Adapters.podspec */, + ); + path = "MoPub-FacebookAudienceNetwork-Podspecs"; + sourceTree = ""; + }; + 45A37B7C20B33D63005FBDBB /* AdMob */ = { + isa = PBXGroup; + children = ( + EBDA7B7020B356270054165B /* SDK */, + 45A37B7D20B33D63005FBDBB /* MoPub-AdMob-PodSpecs */, + 45A37B8020B33D63005FBDBB /* MPGoogleAdMobBannerCustomEvent.h */, + 45A37B8120B33D63005FBDBB /* MPGoogleAdMobNativeAdAdapter.m */, + 45A37B8220B33D63005FBDBB /* MPGoogleAdMobNativeCustomEvent.m */, + 45A37B8320B33D63005FBDBB /* CHANGELOG.md */, + 45A37B8420B33D63005FBDBB /* UIView+MPGoogleAdMobAdditions.h */, + 45A37B8520B33D63005FBDBB /* MPGoogleAdMobNativeRenderer.h */, + 45A37B8620B33D63005FBDBB /* MPGoogleAdMobRewardedVideoCustomEvent.m */, + 45A37B8720B33D63005FBDBB /* MPGoogleAdMobInterstitialCustomEvent.h */, + 45A37B8820B33D63005FBDBB /* README.md */, + 45A37B8920B33D63005FBDBB /* MPGoogleAdMobBannerCustomEvent.m */, + 45A37B8A20B33D63005FBDBB /* MPGoogleAdMobNativeCustomEvent.h */, + 45A37B8B20B33D63005FBDBB /* MPGoogleAdMobNativeAdAdapter.h */, + 45A37B8C20B33D63005FBDBB /* MPGoogleAdMobNativeRenderer.m */, + 45A37B8D20B33D63005FBDBB /* UIView+MPGoogleAdMobAdditions.m */, + 45A37B8E20B33D63005FBDBB /* MPGoogleAdMobInterstitialCustomEvent.m */, + 45A37B8F20B33D63005FBDBB /* MPGoogleAdMobRewardedVideoCustomEvent.h */, + ); + path = AdMob; + sourceTree = ""; + }; + 45A37B7D20B33D63005FBDBB /* MoPub-AdMob-PodSpecs */ = { + isa = PBXGroup; + children = ( + 45A37B7E20B33D63005FBDBB /* LICENSE */, + 45A37B7F20B33D63005FBDBB /* MoPub-AdMob-Adapters.podspec */, + ); + path = "MoPub-AdMob-PodSpecs"; + sourceTree = ""; + }; + 45A37BA220B33FC1005FBDBB /* SDK */ = { + isa = PBXGroup; + children = ( + 45A37BA320B33FC1005FBDBB /* FBAudienceNetwork.framework */, + ); + path = SDK; + sourceTree = ""; + }; + EBDA7B7020B356270054165B /* SDK */ = { + isa = PBXGroup; + children = ( + EBDA7B7120B356270054165B /* GoogleMobileAds.framework */, + ); + path = SDK; + sourceTree = ""; + }; + EBDA7B7520B35AF30054165B /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -1233,168 +1375,190 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 34F4095C1E9E1DA400E57AC0 /* MPStaticNativeAdImpressionTimer.m in Sources */, - 34F409831E9E1DA400E57AC0 /* MPRewardedVideoAdManager.m in Sources */, - 34F409451E9E1DA400E57AC0 /* MPVASTTrackingEvent.m in Sources */, - 34F409771E9E1DA400E57AC0 /* MOPUBNativeVideoAdConfigValues.m in Sources */, - 34F408F31E9E1DA400E57AC0 /* MPAdConfiguration.m in Sources */, - 34F409581E9E1DA400E57AC0 /* MPNativeCache.m in Sources */, - 34F409511E9E1DA400E57AC0 /* MPImageDownloadQueue.m in Sources */, - 34F409781E9E1DA400E57AC0 /* MOPUBNativeVideoCustomEvent.m in Sources */, - 34F409371E9E1DA400E57AC0 /* MPVASTAd.m in Sources */, - 34F409871E9E1DA400E57AC0 /* MPRewardedVideoError.m in Sources */, - 34F4096E1E9E1DA400E57AC0 /* MPStaticNativeAdRendererSettings.m in Sources */, - 34F409571E9E1DA400E57AC0 /* MPNativeAdUtils.m in Sources */, - 34F409501E9E1DA400E57AC0 /* MPDiskLRUCache.m in Sources */, - 34F408FB1E9E1DA400E57AC0 /* MPFacebookKeywordProvider.m in Sources */, - 34F409441E9E1DA400E57AC0 /* MPVASTStringUtilities.m in Sources */, - 34F4091E1E9E1DA400E57AC0 /* MRExpandModalViewController.m in Sources */, - 34F408F01E9E1DA400E57AC0 /* MPActivityViewControllerHelper+TweetShare.m in Sources */, - 34F408F71E9E1DA400E57AC0 /* MPAPIEndpoints.m in Sources */, - 34F4094A1E9E1DA400E57AC0 /* MPBannerCustomEvent.m in Sources */, - 34F4093D1E9E1DA400E57AC0 /* MPVASTLinearAd.m in Sources */, - 34F409521E9E1DA400E57AC0 /* MPMoPubNativeAdAdapter.m in Sources */, - 34F4091B1E9E1DA400E57AC0 /* MRConstants.m in Sources */, - 34F4093F1E9E1DA400E57AC0 /* MPVASTManager.m in Sources */, - 34F408E81E9E1DA400E57AC0 /* FacebookNativeCustomEvent.m in Sources */, - 34F409141E9E1DA400E57AC0 /* MPVASTTracking.m in Sources */, - 34F4092E1E9E1DA400E57AC0 /* MPIdentityProvider.m in Sources */, - 34F4094F1E9E1DA400E57AC0 /* MPCollectionViewAdPlacerCell.m in Sources */, - 34F408F41E9E1DA400E57AC0 /* MPAdDestinationDisplayAgent.m in Sources */, - 34F409051E9E1DA400E57AC0 /* MPLogEventRecorder.m in Sources */, - 34F408EB1E9E1DA400E57AC0 /* MPBannerAdManager.m in Sources */, - 34F409181E9E1DA400E57AC0 /* MRBridge.m in Sources */, - 34F409291E9E1DA400E57AC0 /* UIWebView+MPAdditions.m in Sources */, - 34F409711E9E1DA400E57AC0 /* MPTableViewAdPlacer.m in Sources */, - 34F409661E9E1DA400E57AC0 /* MPNativeAdRendererConfiguration.m in Sources */, - 34F4094D1E9E1DA400E57AC0 /* MPInterstitialCustomEvent.m in Sources */, - 34F408FC1E9E1DA400E57AC0 /* MPLastResortDelegate.m in Sources */, - 34F408FF1E9E1DA400E57AC0 /* MPURLResolver.m in Sources */, - 34F409721E9E1DA400E57AC0 /* MOPUBActivityIndicatorView.m in Sources */, - 34F409751E9E1DA400E57AC0 /* MOPUBFullscreenPlayerViewController.m in Sources */, - 34F4091F1E9E1DA400E57AC0 /* MRNativeCommandHandler.m in Sources */, - 34F4091D1E9E1DA400E57AC0 /* MRError.m in Sources */, - 34F4097D1E9E1DA400E57AC0 /* MOPUBReplayView.m in Sources */, - 34F409631E9E1DA400E57AC0 /* MPNativeAdConstants.m in Sources */, - 34F408E71E9E1DA400E57AC0 /* FacebookNativeAdAdapter.m in Sources */, - 34F4096C1E9E1DA400E57AC0 /* MPServerAdPositioning.m in Sources */, - 34F408EC1E9E1DA400E57AC0 /* MPBannerCustomEventAdapter.m in Sources */, - 34F409421E9E1DA400E57AC0 /* MPVASTResource.m in Sources */, - 34F409701E9E1DA400E57AC0 /* MPStreamAdPlacer.m in Sources */, - 34F4094E1E9E1DA400E57AC0 /* MPAdPlacerInvocation.m in Sources */, - 34F4090D1E9E1DA400E57AC0 /* MPWebView.m in Sources */, - 34F409481E9E1DA400E57AC0 /* MPAdConversionTracker.m in Sources */, - 34F409261E9E1DA400E57AC0 /* UIButton+MPAdditions.m in Sources */, - 34F408FE1E9E1DA400E57AC0 /* MPURLActionInfo.m in Sources */, - 34F409361E9E1DA400E57AC0 /* MPUserInteractionGestureRecognizer.m in Sources */, - 34F409861E9E1DA400E57AC0 /* MPRewardedVideoCustomEvent.m in Sources */, - 34F409391E9E1DA400E57AC0 /* MPVASTCreative.m in Sources */, - 34F409561E9E1DA400E57AC0 /* MPNativeAdSourceQueue.m in Sources */, - 34F409811E9E1DA400E57AC0 /* MPMoPubRewardedVideoCustomEvent.m in Sources */, - 34F409461E9E1DA400E57AC0 /* MPVASTWrapper.m in Sources */, - 34F409621E9E1DA400E57AC0 /* MPNativeAd.m in Sources */, - 34F408FA1E9E1DA400E57AC0 /* MPEnhancedDeeplinkRequest.m in Sources */, - 34F4097F1E9E1DA400E57AC0 /* MOPUBNativeVideoAdRendererSettings.m in Sources */, - 34F409301E9E1DA400E57AC0 /* MPLogging.m in Sources */, - 34F408EF1E9E1DA400E57AC0 /* MPAdAlertManager.m in Sources */, - 34F4095F1E9E1DA400E57AC0 /* MPAdPositioning.m in Sources */, - 34F409231E9E1DA400E57AC0 /* NSHTTPURLResponse+MPAdditions.m in Sources */, - 34F4090B1E9E1DA400E57AC0 /* MPHTMLInterstitialCustomEvent.m in Sources */, - 34F4093C1E9E1DA400E57AC0 /* MPVASTInline.m in Sources */, - 34F409741E9E1DA400E57AC0 /* MOPUBAVPlayerView.m in Sources */, - 34F4095A1E9E1DA400E57AC0 /* MPNativePositionSource.m in Sources */, - 34F409211E9E1DA400E57AC0 /* MRVideoPlayerManager.m in Sources */, - 34F4092D1E9E1DA400E57AC0 /* MPGlobal.m in Sources */, - 34F409431E9E1DA400E57AC0 /* MPVASTResponse.m in Sources */, - 34F409381E9E1DA400E57AC0 /* MPVASTCompanionAd.m in Sources */, - 34F4095E1E9E1DA400E57AC0 /* MPTableViewCellImpressionTracker.m in Sources */, - 34F4096D1E9E1DA400E57AC0 /* MPStaticNativeAdRenderer.m in Sources */, - 34F409111E9E1DA400E57AC0 /* MPInterstitialViewController.m in Sources */, - 34F4095D1E9E1DA400E57AC0 /* MPTableViewAdPlacerCell.m in Sources */, - 34F4097C1E9E1DA400E57AC0 /* MOPUBPlayerViewController.m in Sources */, - 34F409091E9E1DA400E57AC0 /* MPAdWebViewAgent.m in Sources */, - 34F408F81E9E1DA400E57AC0 /* MPClosableView.m in Sources */, - 34F409061E9E1DA400E57AC0 /* MPNetworkManager.m in Sources */, - 34F409101E9E1DA400E57AC0 /* MPInterstitialCustomEventAdapter.m in Sources */, - 34F409131E9E1DA400E57AC0 /* MPInstanceProvider.m in Sources */, - 34F4094C1E9E1DA400E57AC0 /* MPInterstitialAdController.m in Sources */, - 34F4092F1E9E1DA400E57AC0 /* MPInternalUtils.m in Sources */, - 34F4096B1E9E1DA400E57AC0 /* MPNativeCustomEvent.m in Sources */, - 34F4097E1E9E1DA400E57AC0 /* MOPUBNativeVideoAdRenderer.m in Sources */, - 34F409801E9E1DA400E57AC0 /* MPMoPubRewardedPlayableCustomEvent.m in Sources */, - 34F409491E9E1DA400E57AC0 /* MPAdView.m in Sources */, - 34F409401E9E1DA400E57AC0 /* MPVASTMediaFile.m in Sources */, - 34F4090E1E9E1DA400E57AC0 /* MPBaseInterstitialAdapter.m in Sources */, - 34F409611E9E1DA400E57AC0 /* MPCollectionViewAdPlacer.m in Sources */, - 34F409011E9E1DA400E57AC0 /* MPXMLParser.m in Sources */, - 34F409031E9E1DA400E57AC0 /* MPLogEvent.m in Sources */, - 34F408F21E9E1DA400E57AC0 /* MPAdBrowserController.m in Sources */, - 34F408E51E9E1DA400E57AC0 /* FacebookBannerCustomEvent.m in Sources */, - 34F408F11E9E1DA400E57AC0 /* MPActivityViewControllerHelper.m in Sources */, - 34F408FD1E9E1DA400E57AC0 /* MPProgressOverlayView.m in Sources */, - 34F409681E9E1DA400E57AC0 /* MPNativeAdRequest.m in Sources */, - 34F4097A1E9E1DA400E57AC0 /* MOPUBPlayerManager.m in Sources */, - 34F409671E9E1DA400E57AC0 /* MPNativeAdRenderingImageLoader.m in Sources */, - 34F409071E9E1DA400E57AC0 /* MPQRunLoopOperation.m in Sources */, - 34F409321E9E1DA400E57AC0 /* MPReachability.m in Sources */, - 34F409241E9E1DA400E57AC0 /* NSJSONSerialization+MPAdditions.m in Sources */, - 34F409821E9E1DA400E57AC0 /* MPRewardedVideoAdapter.m in Sources */, - 34F409251E9E1DA400E57AC0 /* NSURL+MPAdditions.m in Sources */, - 34F409601E9E1DA400E57AC0 /* MPClientAdPositioning.m in Sources */, - 34F409041E9E1DA400E57AC0 /* MPLogEventCommunicator.m in Sources */, - 34F4094B1E9E1DA400E57AC0 /* MPConstants.m in Sources */, - 34F409151E9E1DA400E57AC0 /* MPMRAIDBannerCustomEvent.m in Sources */, - 34F409851E9E1DA400E57AC0 /* MPRewardedVideo.m in Sources */, - 34F409691E9E1DA400E57AC0 /* MPNativeAdRequestTargeting.m in Sources */, - 34F4096F1E9E1DA400E57AC0 /* MPStreamAdPlacementData.m in Sources */, - 34F409191E9E1DA400E57AC0 /* MRBundleManager.m in Sources */, - 34F4092C1E9E1DA400E57AC0 /* MPGeolocationProvider.m in Sources */, - 34F409021E9E1DA400E57AC0 /* MPLogEvent+NativeVideo.m in Sources */, - 34F4093A1E9E1DA400E57AC0 /* MPVASTDurationOffset.m in Sources */, - 34F4091C1E9E1DA400E57AC0 /* MRController.m in Sources */, - 34F409271E9E1DA400E57AC0 /* UIColor+MPAdditions.m in Sources */, - 34F408EE1E9E1DA400E57AC0 /* MPAdAlertGestureRecognizer.m in Sources */, - 34F409841E9E1DA400E57AC0 /* MPRewardedVideoConnection.m in Sources */, - 34F409881E9E1DA400E57AC0 /* MPRewardedVideoReward.m in Sources */, - 34F409311E9E1DA400E57AC0 /* MPLogProvider.m in Sources */, - 34F409651E9E1DA400E57AC0 /* MPNativeAdError.m in Sources */, - 34F409221E9E1DA400E57AC0 /* NSBundle+MPAdditions.m in Sources */, - 34F4093E1E9E1DA400E57AC0 /* MPVASTMacroProcessor.m in Sources */, - 34F4097B1E9E1DA400E57AC0 /* MOPUBPlayerView.m in Sources */, - 34F4090C1E9E1DA400E57AC0 /* MPHTMLInterstitialViewController.m in Sources */, - 34F408F91E9E1DA400E57AC0 /* MPCountdownTimerView.m in Sources */, - 34F409281E9E1DA400E57AC0 /* UIView+MPAdditions.m in Sources */, - 34F4093B1E9E1DA400E57AC0 /* MPVASTIndustryIcon.m in Sources */, - 34F4092A1E9E1DA400E57AC0 /* MPAnalyticsTracker.m in Sources */, - 34F409761E9E1DA400E57AC0 /* MOPUBNativeVideoAdAdapter.m in Sources */, - 34F4091A1E9E1DA400E57AC0 /* MRCommand.m in Sources */, - 34F409001E9E1DA400E57AC0 /* MPVideoConfig.m in Sources */, - 34F4090A1E9E1DA400E57AC0 /* MPHTMLBannerCustomEvent.m in Sources */, - 34F4096A1E9E1DA400E57AC0 /* MPNativeAdSource.m in Sources */, - 34F409541E9E1DA400E57AC0 /* MPNativeAd+Internal.m in Sources */, - 34F4095B1E9E1DA400E57AC0 /* MPNativeView.m in Sources */, - 34F409351E9E1DA400E57AC0 /* MPTimer.m in Sources */, - 34F409161E9E1DA400E57AC0 /* MPMRAIDInterstitialCustomEvent.m in Sources */, - 34F408F51E9E1DA400E57AC0 /* MPAdServerCommunicator.m in Sources */, - 34F409411E9E1DA400E57AC0 /* MPVASTModel.m in Sources */, - 34F4092B1E9E1DA400E57AC0 /* MPError.m in Sources */, - 34F409471E9E1DA400E57AC0 /* MoPub.m in Sources */, - 34F409731E9E1DA400E57AC0 /* MOPUBAVPlayer.m in Sources */, - 34F409121E9E1DA400E57AC0 /* MPCoreInstanceProvider.m in Sources */, - 34F409591E9E1DA400E57AC0 /* MPNativePositionResponseDeserializer.m in Sources */, - 34F409791E9E1DA400E57AC0 /* MOPUBNativeVideoImpressionAgent.m in Sources */, - 34F409341E9E1DA400E57AC0 /* MPStoreKitProvider.m in Sources */, - 34F409331E9E1DA400E57AC0 /* MPSessionTracker.m in Sources */, - 34F408E61E9E1DA400E57AC0 /* FacebookInterstitialCustomEvent.m in Sources */, - 34F409551E9E1DA400E57AC0 /* MPNativeAdRendererImageHandler.m in Sources */, - 34F408F61E9E1DA400E57AC0 /* MPAdServerURLBuilder.m in Sources */, - 34F409081E9E1DA400E57AC0 /* MPRetryingHTTPOperation.m in Sources */, - 34F409531E9E1DA400E57AC0 /* MPMoPubNativeCustomEvent.m in Sources */, - 34F409171E9E1DA400E57AC0 /* MPMRAIDInterstitialViewController.m in Sources */, - 34F408ED1E9E1DA400E57AC0 /* MPBaseBannerAdapter.m in Sources */, - 34F409201E9E1DA400E57AC0 /* MRProperty.m in Sources */, - 34F4090F1E9E1DA400E57AC0 /* MPInterstitialAdManager.m in Sources */, - 34F409641E9E1DA400E57AC0 /* MPNativeAdData.m in Sources */, + 45A37AC720B3395D005FBDBB /* MPNativeAdRequest.m in Sources */, + 45A37ABC20B3395D005FBDBB /* MOPUBFullscreenPlayerViewController.m in Sources */, + 45A37B0420B3395D005FBDBB /* MPWebView.m in Sources */, + 45A37B2020B3395D005FBDBB /* MPConsentManager.m in Sources */, + 45A37B3520B3395E005FBDBB /* MPLogProvider.m in Sources */, + 45A37AB520B3395D005FBDBB /* MPAdView.m in Sources */, + 45A37B0F20B3395D005FBDBB /* MPAdConfiguration.m in Sources */, + 45A37AD920B3395D005FBDBB /* MPNativeAdConfigValues+Internal.m in Sources */, + 45A37AB920B3395D005FBDBB /* MOPUBNativeVideoAdAdapter.m in Sources */, + 45A37ABE20B3395D005FBDBB /* MOPUBActivityIndicatorView.m in Sources */, + 45A37AEE20B3395D005FBDBB /* MPMoPubRewardedPlayableCustomEvent.m in Sources */, + 45A37B5C20B3395E005FBDBB /* MPConsentChangedReason.m in Sources */, + 45A37ACA20B3395D005FBDBB /* MPNativeAdData.m in Sources */, + 45A37B5A20B3395E005FBDBB /* MPVASTResponse.m in Sources */, + 45A37B4320B3395E005FBDBB /* UIColor+MPAdditions.m in Sources */, + 45A37B4220B3395E005FBDBB /* NSURL+MPAdditions.m in Sources */, + 45A37B3120B3395D005FBDBB /* MPConsentAdServerKeys.m in Sources */, + 45A37AD120B3395D005FBDBB /* MPMoPubNativeAdAdapter.m in Sources */, + 45A37B2420B3395D005FBDBB /* MPMRAIDBannerCustomEvent.m in Sources */, + 45A37AD220B3395D005FBDBB /* MPNativeAdUtils.m in Sources */, + 45A37B1D20B3395D005FBDBB /* MPAdImpressionTimer.m in Sources */, + 45A37AB720B3395D005FBDBB /* MOPUBNativeVideoAdRendererSettings.m in Sources */, + 45A37B4420B3395E005FBDBB /* UIButton+MPAdditions.m in Sources */, + 45A37AF620B3395D005FBDBB /* MPConstants.m in Sources */, + 45A37AC520B3395D005FBDBB /* MPServerAdPositioning.m in Sources */, + 45A37B2920B3395D005FBDBB /* MPMRAIDInterstitialViewController.m in Sources */, + 45A37B4C20B3395E005FBDBB /* MPVASTCreative.m in Sources */, + 45A37AED20B3395D005FBDBB /* MPRewardedVideoAdapter.m in Sources */, + 45A37B0A20B3395D005FBDBB /* MPBannerCustomEventAdapter.m in Sources */, + 45A37B3020B3395D005FBDBB /* MRBundleManager.m in Sources */, + 45A37B3920B3395E005FBDBB /* MOPUBExperimentProvider.m in Sources */, + 45A37AE120B3395D005FBDBB /* MPTableViewAdPlacer.m in Sources */, + 45A37B9020B33D63005FBDBB /* FacebookNativeCustomEvent.m in Sources */, + 45A37AF120B3395D005FBDBB /* MPRewardedVideoError.m in Sources */, + 45A37B3C20B3395E005FBDBB /* MPUserInteractionGestureRecognizer.m in Sources */, + 45A37ABD20B3395D005FBDBB /* MOPUBNativeVideoImpressionAgent.m in Sources */, + 45A37B3D20B3395E005FBDBB /* MPAnalyticsTracker.m in Sources */, + 45A37ACE20B3395D005FBDBB /* MPStreamAdPlacementData.m in Sources */, + 45A37ADE20B3395D005FBDBB /* MPTableViewCellImpressionTracker.m in Sources */, + 45A37B9620B33D63005FBDBB /* MPGoogleAdMobNativeAdAdapter.m in Sources */, + 45A37AB420B3395D005FBDBB /* MPWebView+Viewability.m in Sources */, + 45A37B4520B3395E005FBDBB /* NSBundle+MPAdditions.m in Sources */, + 45A37AF920B3395D005FBDBB /* MoPub.m in Sources */, + 45A37B3F20B3395E005FBDBB /* MPInternalUtils.m in Sources */, + 45A37AFB20B3395D005FBDBB /* MPHTTPNetworkTaskData.m in Sources */, + 45A37B9520B33D63005FBDBB /* FacebookBannerCustomEvent.m in Sources */, + 45A37AE320B3395D005FBDBB /* MPAdPositioning.m in Sources */, + 45A37AAE20B3395D005FBDBB /* MPBannerCustomEvent.m in Sources */, + 45A37B1B20B3395D005FBDBB /* MPURLResolver.m in Sources */, + 45A37B4120B3395E005FBDBB /* MPStoreKitProvider.m in Sources */, + 45A37ABF20B3395D005FBDBB /* MOPUBPlayerViewController.m in Sources */, + 45A37B2220B3395D005FBDBB /* MPMediationManager.m in Sources */, + 45A37B2F20B3395D005FBDBB /* MRExpandModalViewController.m in Sources */, + 45A37AF020B3395D005FBDBB /* MPRewardedVideoReward.m in Sources */, + 45A37B0E20B3395D005FBDBB /* MPAdServerCommunicator.m in Sources */, + 45A37B9C20B33D63005FBDBB /* MPGoogleAdMobInterstitialCustomEvent.m in Sources */, + 45A37B1720B3395D005FBDBB /* MPCountdownTimerView.m in Sources */, + 45A37B3420B3395D005FBDBB /* MPSessionTracker.m in Sources */, + 45A37B0C20B3395D005FBDBB /* MPAPIEndpoints.m in Sources */, + 45A37B0620B3395D005FBDBB /* MPCoreInstanceProvider.m in Sources */, + 45A37B9220B33D63005FBDBB /* FacebookAdvancedBidder.m in Sources */, + 45A37B5720B3395E005FBDBB /* MPVASTInline.m in Sources */, + 45A37B9A20B33D63005FBDBB /* MPGoogleAdMobNativeRenderer.m in Sources */, + 45A37B9420B33D63005FBDBB /* FacebookNativeAdAdapter.m in Sources */, + 45A37ADB20B3395D005FBDBB /* MPNativeAdSourceQueue.m in Sources */, + 45A37B3320B3395D005FBDBB /* MPAdvancedBiddingManager.m in Sources */, + 45A37B0520B3395D005FBDBB /* MPHTMLBannerCustomEvent.m in Sources */, + 45A37ACD20B3395D005FBDBB /* MPNativeAdError.m in Sources */, + 45A37B0B20B3395D005FBDBB /* MPAdDestinationDisplayAgent.m in Sources */, + 45A37AFE20B3395D005FBDBB /* MPInterstitialAdManager.m in Sources */, + 45A37AC620B3395D005FBDBB /* MPNativeCustomEvent.m in Sources */, + 45A37ACB20B3395D005FBDBB /* MPStaticNativeAdRendererSettings.m in Sources */, + 45A37B9B20B33D63005FBDBB /* UIView+MPGoogleAdMobAdditions.m in Sources */, + 45A37AE720B3395D005FBDBB /* MPNativeAd.m in Sources */, + 45A37B1220B3395D005FBDBB /* MPLastResortDelegate.m in Sources */, + 45A37AE420B3395D005FBDBB /* MPNativeAdRendererConfiguration.m in Sources */, + 45A37B9820B33D63005FBDBB /* MPGoogleAdMobRewardedVideoCustomEvent.m in Sources */, + 45A37B3B20B3395E005FBDBB /* MPReachability.m in Sources */, + 45A37AF420B3395D005FBDBB /* MPInterstitialAdController.m in Sources */, + 45A37B4A20B3395E005FBDBB /* UIView+MPAdditions.m in Sources */, + 45A37B3220B3395D005FBDBB /* MPHTTPNetworkSession.m in Sources */, + 45A37AEB20B3395D005FBDBB /* MPMoPubRewardedVideoCustomEvent.m in Sources */, + 45A37AC220B3395D005FBDBB /* MOPUBAVPlayerView.m in Sources */, + 45A37AE620B3395D005FBDBB /* MPStaticNativeAdRenderer.m in Sources */, + 45A37B2820B3395D005FBDBB /* MRVideoPlayerManager.m in Sources */, + 45A37B5320B3395E005FBDBB /* MPVASTCompanionAd.m in Sources */, + 45A37B1620B3395D005FBDBB /* MPClosableView.m in Sources */, + 45A37B5420B3395E005FBDBB /* MPVASTMacroProcessor.m in Sources */, + 45A37B2E20B3395D005FBDBB /* MRController.m in Sources */, + 45A37B5B20B3395E005FBDBB /* MPVASTManager.m in Sources */, + 45A37B1C20B3395D005FBDBB /* MPVideoConfig.m in Sources */, + 45A37AD420B3395D005FBDBB /* MPNativePositionResponseDeserializer.m in Sources */, + 45A37B3E20B3395E005FBDBB /* MPIdentityProvider.m in Sources */, + 45A37AEF20B3395D005FBDBB /* MPRewardedVideoConnection.m in Sources */, + 45A37B0D20B3395D005FBDBB /* MPAdBrowserController.m in Sources */, + 45A37B1420B3395D005FBDBB /* MPEnhancedDeeplinkRequest.m in Sources */, + 45A37B5220B3395E005FBDBB /* MPVASTLinearAd.m in Sources */, + 45A37B4720B3395E005FBDBB /* NSString+MPAdditions.m in Sources */, + 45A37ADA20B3395D005FBDBB /* MPAdPlacerInvocation.m in Sources */, + 45A37B4B20B3395E005FBDBB /* NSString+MPConsentStatus.m in Sources */, + 45A37AE920B3395D005FBDBB /* MPClientAdPositioning.m in Sources */, + 45A37B9720B33D63005FBDBB /* MPGoogleAdMobNativeCustomEvent.m in Sources */, + 45A37B0720B3395D005FBDBB /* MPBannerAdManager.m in Sources */, + 45A37B4E20B3395E005FBDBB /* MPVASTAd.m in Sources */, + 45A37ABB20B3395D005FBDBB /* MOPUBPlayerView.m in Sources */, + 45A37B2520B3395D005FBDBB /* MRConstants.m in Sources */, + 45A37B3620B3395E005FBDBB /* MPGlobal.m in Sources */, + 45A37AFF20B3395D005FBDBB /* MPInterstitialCustomEventAdapter.m in Sources */, + 45A37AC120B3395D005FBDBB /* MOPUBNativeVideoAdConfigValues.m in Sources */, + 45A37B9320B33D63005FBDBB /* FacebookRewardedVideoCustomEvent.m in Sources */, + 45A37AF720B3395D005FBDBB /* MPAdConversionTracker.m in Sources */, + 45A37B1820B3395D005FBDBB /* MPRealTimeTimer.m in Sources */, + 45A37ADC20B3395D005FBDBB /* MPNativeAdRendererImageHandler.m in Sources */, + 45A37ACF20B3395D005FBDBB /* MPNativeAd+Internal.m in Sources */, + 45A37AB320B3395D005FBDBB /* MPViewabilityTracker.m in Sources */, + 45A37AFA20B3395D005FBDBB /* MPURLRequest.m in Sources */, + 45A37B3820B3395E005FBDBB /* MPLogging.m in Sources */, + 45A37AE820B3395D005FBDBB /* MPNativeAdRequestTargeting.m in Sources */, + 45A37AE520B3395D005FBDBB /* MPNativeAdRenderingImageLoader.m in Sources */, + 45A37AD820B3395D005FBDBB /* MPTableViewAdPlacerCell.m in Sources */, + 45A37B1520B3395D005FBDBB /* MPURLActionInfo.m in Sources */, + 45A37B2C20B3395D005FBDBB /* MRProperty.m in Sources */, + 45A37B2D20B3395D005FBDBB /* MRError.m in Sources */, + 45A37AFC20B3395D005FBDBB /* MPBaseInterstitialAdapter.m in Sources */, + 45A37B4020B3395E005FBDBB /* MPError.m in Sources */, + 45A37B2120B3395D005FBDBB /* MPInstanceProvider.m in Sources */, + 45A37B1120B3395D005FBDBB /* MPAdServerURLBuilder.m in Sources */, + 45A37AD320B3395D005FBDBB /* MPDiskLRUCache.m in Sources */, + 45A37AC920B3395D005FBDBB /* MPCollectionViewAdPlacer.m in Sources */, + 45A37AC820B3395D005FBDBB /* MPStreamAdPlacer.m in Sources */, + 45A37B1F20B3395D005FBDBB /* MPXMLParser.m in Sources */, + 45A37B0820B3395D005FBDBB /* MPBannerCustomEvent+Internal.m in Sources */, + 45A37AF220B3395D005FBDBB /* MPRewardedVideoCustomEvent+Caching.m in Sources */, + 45A37B0020B3395D005FBDBB /* MPVASTTracking.m in Sources */, + 45A37AEA20B3395D005FBDBB /* MPRewardedVideo.m in Sources */, + 45A37B4620B3395E005FBDBB /* NSHTTPURLResponse+MPAdditions.m in Sources */, + 45A37AB820B3395D005FBDBB /* MOPUBPlayerManager.m in Sources */, + 45A37AC320B3395D005FBDBB /* MOPUBAVPlayer.m in Sources */, + 45A37B5020B3395E005FBDBB /* MPVASTModel.m in Sources */, + 45A37AD520B3395D005FBDBB /* MPImageDownloadQueue.m in Sources */, + 45A37ADD20B3395D005FBDBB /* MPNativeView.m in Sources */, + 45A37B3720B3395E005FBDBB /* MPTimer.m in Sources */, + 45A37B4F20B3395E005FBDBB /* MPVASTResource.m in Sources */, + 45A37AE220B3395D005FBDBB /* MPNativeAdConstants.m in Sources */, + 45A37B1E20B3395D005FBDBB /* MPActivityViewControllerHelper+TweetShare.m in Sources */, + 45A37B3A20B3395E005FBDBB /* MPGeolocationProvider.m in Sources */, + 45A37AC420B3395D005FBDBB /* MOPUBNativeVideoAdRenderer.m in Sources */, + 45A37B4D20B3395E005FBDBB /* MPVASTMediaFile.m in Sources */, + 45A37B1320B3395D005FBDBB /* MPProgressOverlayView.m in Sources */, + 45A37B2A20B3395D005FBDBB /* MRCommand.m in Sources */, + 45A37B2720B3395D005FBDBB /* MRNativeCommandHandler.m in Sources */, + 45A37B2320B3395D005FBDBB /* MPConsentDialogViewController.m in Sources */, + 45A37AD620B3395D005FBDBB /* MPNativeAdConfigValues.m in Sources */, + 45A37AEC20B3395D005FBDBB /* MPRewardedVideoAdManager.m in Sources */, + 45A37B5520B3395E005FBDBB /* MPVASTDurationOffset.m in Sources */, + 45A37B0320B3395D005FBDBB /* MPAdWebViewAgent.m in Sources */, + 45A37AB620B3395D005FBDBB /* MPMoPubConfiguration.m in Sources */, + 45A37B4820B3395E005FBDBB /* NSJSONSerialization+MPAdditions.m in Sources */, + 45A37B9120B33D63005FBDBB /* FacebookInterstitialCustomEvent.m in Sources */, + 45A37ACC20B3395D005FBDBB /* MPNativeAdSource.m in Sources */, + 45A37B0920B3395D005FBDBB /* MPBaseBannerAdapter.m in Sources */, + 45A37B1920B3395D005FBDBB /* MPAdAlertManager.m in Sources */, + 45A37ADF20B3395D005FBDBB /* MPMoPubNativeCustomEvent.m in Sources */, + 45A37B5920B3395E005FBDBB /* MPVASTStringUtilities.m in Sources */, + 45A37ABA20B3395D005FBDBB /* MOPUBNativeVideoCustomEvent.m in Sources */, + 45A37AC020B3395D005FBDBB /* MOPUBReplayView.m in Sources */, + 45A37AE020B3395D005FBDBB /* MPNativeCache.m in Sources */, + 45A37AD020B3395D005FBDBB /* MPNativePositionSource.m in Sources */, + 45A37B5820B3395E005FBDBB /* MPVASTTrackingEvent.m in Sources */, + 45A37B1020B3395D005FBDBB /* MPActivityViewControllerHelper.m in Sources */, + 45A37AD720B3395D005FBDBB /* MPCollectionViewAdPlacerCell.m in Sources */, + 45A37B1A20B3395D005FBDBB /* MPAdAlertGestureRecognizer.m in Sources */, + 45A37B5120B3395E005FBDBB /* MPVASTWrapper.m in Sources */, + 45A37B4920B3395E005FBDBB /* UIWebView+MPAdditions.m in Sources */, + 45A37AF320B3395D005FBDBB /* MPRewardedVideoCustomEvent.m in Sources */, + 45A37B0220B3395D005FBDBB /* MPHTMLInterstitialViewController.m in Sources */, + 45A37AFD20B3395D005FBDBB /* MPInterstitialViewController.m in Sources */, + 45A37AF520B3395D005FBDBB /* MPConsentChangedNotification.m in Sources */, + 45A37B2B20B3395D005FBDBB /* MPMRAIDInterstitialCustomEvent.m in Sources */, + 45A37B9920B33D63005FBDBB /* MPGoogleAdMobBannerCustomEvent.m in Sources */, + 45A37B2620B3395D005FBDBB /* MRBridge.m in Sources */, + 45A37B5620B3395E005FBDBB /* MPVASTIndustryIcon.m in Sources */, + 45A37AF820B3395D005FBDBB /* MPInterstitialCustomEvent.m in Sources */, + 45A37B0120B3395D005FBDBB /* MPHTMLInterstitialCustomEvent.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1419,7 +1583,13 @@ buildSettings = { FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/AdNetworkSupport/Facebook/SDK", + "$(PROJECT_DIR)/Viewability/MOAT", + "$(PROJECT_DIR)/AdNetworkSupport/AdMob/SDK", + "$(PROJECT_DIR)/AdNetworkSupport/FacebookAudienceNetwork/SDK", + ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Viewability/Avid", ); PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -1444,7 +1614,13 @@ buildSettings = { FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/AdNetworkSupport/Facebook/SDK", + "$(PROJECT_DIR)/Viewability/MOAT", + "$(PROJECT_DIR)/AdNetworkSupport/AdMob/SDK", + "$(PROJECT_DIR)/AdNetworkSupport/FacebookAudienceNetwork/SDK", + ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Viewability/Avid", ); PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -1468,7 +1644,13 @@ buildSettings = { FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/AdNetworkSupport/Facebook/SDK", + "$(PROJECT_DIR)/Viewability/MOAT", + "$(PROJECT_DIR)/AdNetworkSupport/AdMob/SDK", + "$(PROJECT_DIR)/AdNetworkSupport/FacebookAudienceNetwork/SDK", + ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Viewability/Avid", ); PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -1492,7 +1674,13 @@ buildSettings = { FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/AdNetworkSupport/Facebook/SDK", + "$(PROJECT_DIR)/Viewability/MOAT", + "$(PROJECT_DIR)/AdNetworkSupport/AdMob/SDK", + "$(PROJECT_DIR)/AdNetworkSupport/FacebookAudienceNetwork/SDK", + ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Viewability/Avid", ); PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -1528,7 +1716,13 @@ buildSettings = { FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/AdNetworkSupport/Facebook/SDK", + "$(PROJECT_DIR)/Viewability/MOAT", + "$(PROJECT_DIR)/AdNetworkSupport/AdMob/SDK", + "$(PROJECT_DIR)/AdNetworkSupport/FacebookAudienceNetwork/SDK", + ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Viewability/Avid", ); PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -1540,7 +1734,13 @@ buildSettings = { FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/AdNetworkSupport/Facebook/SDK", + "$(PROJECT_DIR)/Viewability/MOAT", + "$(PROJECT_DIR)/AdNetworkSupport/AdMob/SDK", + "$(PROJECT_DIR)/AdNetworkSupport/FacebookAudienceNetwork/SDK", + ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Viewability/Avid", ); PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPStaticNativeAdImpressionTimer.h b/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPStaticNativeAdImpressionTimer.h deleted file mode 100644 index f89d938061..0000000000 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPStaticNativeAdImpressionTimer.h +++ /dev/null @@ -1,48 +0,0 @@ -// -// MPStaticNativeAdImpressionTimer.h -// MoPubSDK -// -// Copyright (c) 2015 MoPub. All rights reserved. -// - -#import - -@protocol MPStaticNativeAdImpressionTimerDelegate; - -@interface MPStaticNativeAdImpressionTimer : NSObject - -@property (nonatomic, weak) id delegate; - -/* - * Initializes and returns an object that will tell its delegate when the a certain percentage of the view - * has been visible for a given amount of time. - * - * visibilityPercentage is a float between 0.0 and 1.0. For example, 0.7 represents 70%. - */ - -- (instancetype)initWithRequiredSecondsForImpression:(NSTimeInterval)requiredSecondsForImpression requiredViewVisibilityPercentage:(CGFloat)visibilityPercentage; - -/* - * Begins monitoring the view to meet the impression tracking criteria set up in -initWithRequiredSecondsForImpression:requiredViewVisibilityPercentage:. - * - * The current visibility duration is not reset when calling this method. If the first view - * was visible for 1 second, the internal state will maintain that the view its tracking has - * been visible for 1 second even if this method is called again with a different view. - */ - -- (void)startTrackingView:(UIView *)view; - -@end - -@protocol MPStaticNativeAdImpressionTimerDelegate - -@required - -/* - * Called when the required visibility time has been satisfied. This delegate method - * will only be called once for the lifetime of this object. - */ - -- (void)trackImpression; - -@end diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPStaticNativeAdImpressionTimer.m b/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPStaticNativeAdImpressionTimer.m deleted file mode 100644 index 32d5fa5eb2..0000000000 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPStaticNativeAdImpressionTimer.m +++ /dev/null @@ -1,80 +0,0 @@ -// -// MPStaticNativeAdImpressionTimer.m -// MoPubSDK -// -// Copyright (c) 2015 MoPub. All rights reserved. -// - -#import "MPStaticNativeAdImpressionTimer.h" - -#import "MPTimer.h" -#import "MPGlobal.h" -#import "MPNativeAdConstants.h" - -static const CGFloat kImpressionTimerInterval = 0.25; -static const NSTimeInterval kFirstVisibilityTimestampNone = -1; - -@interface MPStaticNativeAdImpressionTimer () - -@property (nonatomic) UIView *adView; -@property (nonatomic) MPTimer *viewVisibilityTimer; -@property (nonatomic, assign) NSTimeInterval firstVisibilityTimestamp; -@property (nonatomic, assign) CGFloat requiredViewVisibilityPercentage; -@property (nonatomic, readonly) NSTimeInterval requiredSecondsForImpression; - -@end - -@implementation MPStaticNativeAdImpressionTimer - -- (instancetype)initWithRequiredSecondsForImpression:(NSTimeInterval)requiredSecondsForImpression requiredViewVisibilityPercentage:(CGFloat)visibilityPercentage -{ - if (self = [super init]) { - _viewVisibilityTimer = [MPTimer timerWithTimeInterval:kImpressionTimerInterval target:self selector:@selector(tick:) repeats:YES]; - _viewVisibilityTimer.runLoopMode = NSRunLoopCommonModes; - _requiredSecondsForImpression = requiredSecondsForImpression; - _requiredViewVisibilityPercentage = visibilityPercentage; - _firstVisibilityTimestamp = kFirstVisibilityTimestampNone; - } - - return self; -} - -- (void)dealloc -{ - [_viewVisibilityTimer invalidate]; - _delegate = nil; - _viewVisibilityTimer = nil; -} - -- (void)startTrackingView:(UIView *)view -{ - self.adView = view; - - if (!self.viewVisibilityTimer.isScheduled) { - [self.viewVisibilityTimer scheduleNow]; - } -} - -- (void)tick:(NSTimer *)timer -{ - BOOL visible = MPViewIsVisible(self.adView) && MPViewIntersectsParentWindowWithPercent(self.adView, self.requiredViewVisibilityPercentage) && ([[UIApplication sharedApplication] applicationState] == UIApplicationStateActive); - - if (visible) { - NSTimeInterval now = [[NSDate date] timeIntervalSinceReferenceDate]; - - if (self.firstVisibilityTimestamp == kFirstVisibilityTimestampNone) { - self.firstVisibilityTimestamp = now; - } else if (now - self.firstVisibilityTimestamp >= self.requiredSecondsForImpression) { - // Invalidate the timer and tell the delegate it should track an impression. - self.firstVisibilityTimestamp = kFirstVisibilityTimestampNone; - [self.viewVisibilityTimer invalidate]; - self.viewVisibilityTimer = nil; - - [self.delegate trackImpression]; - } - } else { - self.firstVisibilityTimestamp = kFirstVisibilityTimestampNone; - } -} - -@end diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/Categories/MPNativeAdRequest+MPNativeAdSource.h b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/Categories/MPNativeAdRequest+MPNativeAdSource.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/Categories/MPNativeAdRequest+MPNativeAdSource.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/Categories/MPNativeAdRequest+MPNativeAdSource.h diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPAdPlacerInvocation.h b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPAdPlacerInvocation.h similarity index 88% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPAdPlacerInvocation.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPAdPlacerInvocation.h index 13030c181f..0de98cc4c3 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPAdPlacerInvocation.h +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPAdPlacerInvocation.h @@ -38,9 +38,9 @@ * This will return nil if there is an ad at the index path or the target doesn't respond to the selector. * * @param target The object's original data source or delegate. - * @param with2ArgSelector The method we want to execute on the target if an ad doesn't exist. - * @param firstArg The first argument to the selector. - * @param secondArg The second argument to the selector. + * @param selector The method we want to execute on the target if an ad doesn't exist. + * @param arg1 The first argument to the selector. + * @param indexPath The second argument to the selector. * @param streamAdPlacer The MPStreamAdPlacer backing your UI collection that can translate index paths to their originals. * * @return The invocation with all the parameters passed into the method. @@ -56,10 +56,10 @@ * This will return nil if there is an ad at the index path or the target doesn't respond to the selector. * * @param target The object's original data source or delegate. - * @param with3ArgSelector The method we want to execute on the target if an ad doesn't exist. - * @param firstArg The first argument to the selector. - * @param secondArg The second argument to the selector. - * @param thirdArg The third argument to the selector. + * @param selector The method we want to execute on the target if an ad doesn't exist. + * @param arg1 The first argument to the selector. + * @param arg2 The second argument to the selector. + * @param indexPath The third argument to the selector. * @param streamAdPlacer The MPStreamAdPlacer backing your UI collection that can translate index paths to their originals. * * @return The invocation with all the parameters passed into the method. @@ -76,10 +76,10 @@ * This will return nil if there is an ad at the index path or the target doesn't respond to the selector. * * @param target The object's original data source or delegate. - * @param with3ArgSelector The method we want to execute on the target if an ad doesn't exist. - * @param firstArg The first argument to the selector. - * @param secondArg The second argument to the selector. - * @param thirdArg The third argument to the selector. + * @param selector The method we want to execute on the target if an ad doesn't exist. + * @param arg1 The first argument to the selector. + * @param arg2 The second argument to the selector. + * @param indexPath The third argument to the selector. * @param streamAdPlacer The MPStreamAdPlacer backing your UI collection that can translate index paths to their originals. * * @return The invocation with all the parameters passed into the method. diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPAdPlacerInvocation.m b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPAdPlacerInvocation.m similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPAdPlacerInvocation.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPAdPlacerInvocation.m diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPCollectionViewAdPlacerCell.h b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPCollectionViewAdPlacerCell.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPCollectionViewAdPlacerCell.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPCollectionViewAdPlacerCell.h diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPCollectionViewAdPlacerCell.m b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPCollectionViewAdPlacerCell.m similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPCollectionViewAdPlacerCell.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPCollectionViewAdPlacerCell.m diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPDiskLRUCache.h b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPDiskLRUCache.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPDiskLRUCache.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPDiskLRUCache.h diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPDiskLRUCache.m b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPDiskLRUCache.m similarity index 96% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPDiskLRUCache.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPDiskLRUCache.m index 8736ae1312..80ad22df39 100755 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPDiskLRUCache.m +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPDiskLRUCache.m @@ -1,6 +1,6 @@ // // MPDiskLRUCache.m -// +// // Copyright (c) 2014 MoPub. All rights reserved. // @@ -61,21 +61,21 @@ self = [super init]; if (self != nil) { _diskIOQueue = dispatch_queue_create("com.mopub.diskCacheIOQueue", DISPATCH_QUEUE_SERIAL); - + NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); if (paths.count > 0) { _diskCachePath = [[[paths objectAtIndex:0] stringByAppendingPathComponent:@"com.mopub.diskCache"] copy]; - + NSFileManager *fileManager = [NSFileManager defaultManager]; if (![fileManager fileExistsAtPath:_diskCachePath]) { [fileManager createDirectoryAtPath:_diskCachePath withIntermediateDirectories:YES attributes:nil error:nil]; } } - + // check cache size on startup [self ensureCacheSizeLimit]; } - + return self; } @@ -92,7 +92,7 @@ { dispatch_sync(self.diskIOQueue, ^{ NSFileManager *fileManager = [NSFileManager defaultManager]; - + NSArray *allFiles = [self cacheFilesSortedByModDate]; for (MPDiskLRUCacheFile *file in allFiles) { [fileManager removeItemAtPath:file.filePath error:nil]; @@ -108,27 +108,27 @@ NSFileManager *fileManager = [NSFileManager defaultManager]; result = [fileManager fileExistsAtPath:[self cacheFilePathForKey:key]]; }); - + return result; } - (NSData *)retrieveDataForKey:(NSString *)key { __block NSData *data = nil; - + dispatch_sync(self.diskIOQueue, ^{ NSString *cachedFilePath = [self cacheFilePathForKey:key]; - + NSFileManager *fileManager = [NSFileManager defaultManager]; BOOL isDirectory = NO; if ([fileManager fileExistsAtPath:cachedFilePath isDirectory:&isDirectory]) { data = [NSData dataWithContentsOfFile:cachedFilePath]; - + // "touch" file to mark access since NSFileManager doesn't return a last accessed date [fileManager setAttributes:[NSDictionary dictionaryWithObject:[NSDate date] forKey:NSFileModificationDate] ofItemAtPath:cachedFilePath error:nil]; } }); - + return data; } @@ -137,7 +137,7 @@ dispatch_sync(self.diskIOQueue, ^{ NSString *cacheFilePath = [self cacheFilePathForKey:key]; NSFileManager *fileManager = [NSFileManager defaultManager]; - + if (![fileManager fileExistsAtPath:cacheFilePath]) { [fileManager createFileAtPath:cacheFilePath contents:data attributes:nil]; } else { @@ -145,9 +145,9 @@ [data writeToFile:cacheFilePath atomically:YES]; } }); - + self.numBytesStoredForSizeCheck += data.length; - + if (self.numBytesStoredForSizeCheck >= kCacheBytesStoredBeforeSizeCheck) { [self ensureCacheSizeLimit]; self.numBytesStoredForSizeCheck = 0; @@ -160,28 +160,28 @@ { dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{ MPLogDebug(@"Checking cache size..."); - + NSFileManager *fileManager = [NSFileManager defaultManager]; - + NSMutableArray *cacheFilesSortedByModDate = [self cacheFilesSortedByModDate]; - + dispatch_async(self.diskIOQueue, ^{ @autoreleasepool { // verify age NSArray *expiredFiles = [self expiredCachedFilesInArray:cacheFilesSortedByModDate]; for (MPDiskLRUCacheFile *file in expiredFiles) { MPLogDebug(@"Trying to remove %@ from cache due to expiration", file.filePath); - + [fileManager removeItemAtPath:file.filePath error:nil]; [cacheFilesSortedByModDate removeObject:file]; } - + // verify size while ([self sizeOfCacheFilesInArray:cacheFilesSortedByModDate] >= kCacheSoftMaxSize && cacheFilesSortedByModDate.count > 0) { NSString *oldestFilePath = ((MPDiskLRUCacheFile *)[cacheFilesSortedByModDate objectAtIndex:0]).filePath; - + MPLogDebug(@"Trying to remove %@ from cache due to size", oldestFilePath); - + [fileManager removeItemAtPath:oldestFilePath error:nil]; [cacheFilesSortedByModDate removeObjectAtIndex:0]; } @@ -193,66 +193,66 @@ - (NSArray *)expiredCachedFilesInArray:(NSArray *)cachedFiles { NSMutableArray *result = [NSMutableArray array]; - + NSTimeInterval now = [[NSDate date] timeIntervalSinceReferenceDate]; - + for (MPDiskLRUCacheFile *file in cachedFiles) { if (now - file.lastModTimestamp >= kCacheFileMaxAge) { [result addObject:file]; } } - + return result; } - (NSMutableArray *)cacheFilesSortedByModDate { NSFileManager *fileManager = [NSFileManager defaultManager]; - + NSArray *cachedFiles = [fileManager contentsOfDirectoryAtPath:self.diskCachePath error:nil]; NSArray *sortedFiles = [cachedFiles sortedArrayUsingComparator:^NSComparisonResult(id obj1, id obj2) { NSString *fileName1 = [self.diskCachePath stringByAppendingPathComponent:(NSString *)obj1]; NSString *fileName2 = [self.diskCachePath stringByAppendingPathComponent:(NSString *)obj2]; - + NSDictionary *fileAttrs1 = [fileManager attributesOfItemAtPath:fileName1 error:nil]; NSDictionary *fileAttrs2 = [fileManager attributesOfItemAtPath:fileName2 error:nil]; - + NSDate *lastModDate1 = [fileAttrs1 fileModificationDate]; NSDate *lastModDate2 = [fileAttrs2 fileModificationDate]; - + return [lastModDate1 compare:lastModDate2]; }]; - + NSMutableArray *result = [NSMutableArray array]; - + for (NSString *fileName in sortedFiles) { if ([fileName hasPrefix:@"."]) { continue; } - + MPDiskLRUCacheFile *cacheFile = [[MPDiskLRUCacheFile alloc] init]; cacheFile.filePath = [self.diskCachePath stringByAppendingPathComponent:fileName]; - + NSDictionary *fileAttrs = [fileManager attributesOfItemAtPath:cacheFile.filePath error:nil]; cacheFile.fileSize = [fileAttrs fileSize]; cacheFile.lastModTimestamp = [[fileAttrs fileModificationDate] timeIntervalSinceReferenceDate]; - + [result addObject:cacheFile]; } - + return result; } - (uint64_t)sizeOfCacheFilesInArray:(NSArray *)files { uint64_t currentSize = 0; - + for (MPDiskLRUCacheFile *file in files) { currentSize += file.fileSize; } - + MPLogDebug(@"Current cache size %qu bytes", currentSize); - + return currentSize; } diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPImageDownloadQueue.h b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPImageDownloadQueue.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPImageDownloadQueue.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPImageDownloadQueue.h diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPImageDownloadQueue.m b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPImageDownloadQueue.m similarity index 78% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPImageDownloadQueue.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPImageDownloadQueue.m index 783a283d42..d8184ff58b 100755 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPImageDownloadQueue.m +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPImageDownloadQueue.m @@ -8,6 +8,8 @@ #import "MPNativeAdError.h" #import "MPLogging.h" #import "MPNativeCache.h" +#import "MPHTTPNetworkSession.h" +#import "MPURLRequest.h" @interface MPImageDownloadQueue () @@ -50,11 +52,19 @@ if (![[MPNativeCache sharedCache] cachedDataExistsForKey:imageURL.absoluteString] || !useCachedImage) { MPLogDebug(@"Downloading %@", imageURL); - NSURLResponse *response = nil; - NSError *error = nil; - NSData *data = [NSURLConnection sendSynchronousRequest:[NSURLRequest requestWithURL:imageURL] - returningResponse:&response - error:&error]; + __block NSError *error = nil; + __block NSData *data = nil; + + // Synchronous attempt to fetch the image. + dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); + [MPHTTPNetworkSession startTaskWithHttpRequest:[MPURLRequest requestWithURL:imageURL] responseHandler:^(NSData * _Nonnull responseData, NSHTTPURLResponse * _Nonnull response) { + data = responseData; + dispatch_semaphore_signal(semaphore); + } errorHandler:^(NSError * _Nonnull networkError) { + error = networkError; + dispatch_semaphore_signal(semaphore); + }]; + dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); BOOL validImageDownloaded = data != nil; if (validImageDownloaded) { diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPMoPubNativeAdAdapter.h b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPMoPubNativeAdAdapter.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPMoPubNativeAdAdapter.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPMoPubNativeAdAdapter.h diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPMoPubNativeAdAdapter.m b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPMoPubNativeAdAdapter.m similarity index 64% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPMoPubNativeAdAdapter.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPMoPubNativeAdAdapter.m index a8d6c6aa5b..74a8bcdaea 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPMoPubNativeAdAdapter.m +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPMoPubNativeAdAdapter.m @@ -8,16 +8,17 @@ #import "MPNativeAdError.h" #import "MPAdDestinationDisplayAgent.h" #import "MPCoreInstanceProvider.h" -#import "MPStaticNativeAdImpressionTimer.h" #import "MPNativeAdConstants.h" #import "MPGlobal.h" +#import "MPNativeAdConfigValues.h" +#import "MPAdImpressionTimer.h" static const NSTimeInterval kMoPubRequiredSecondsForImpression = 1.0; static const CGFloat kMoPubRequiredViewVisibilityPercentage = 0.5; -@interface MPMoPubNativeAdAdapter () +@interface MPMoPubNativeAdAdapter () -@property (nonatomic) MPStaticNativeAdImpressionTimer *impressionTimer; +@property (nonatomic, strong) MPAdImpressionTimer *impressionTimer; @property (nonatomic, readonly) MPAdDestinationDisplayAgent *destinationDisplayAgent; @end @@ -67,8 +68,22 @@ static const CGFloat kMoPubRequiredViewVisibilityPercentage = 0.5; } _defaultActionURL = [NSURL URLWithString:[properties objectForKey:kDefaultActionURLKey]]; + + // Grab the config, figure out requiredSecondsForImpression and requiredViewVisibilityPercentage, + // and set up the timer. + MPNativeAdConfigValues *config = properties[kNativeAdConfigKey]; + NSTimeInterval requiredSecondsForImpression = config.isImpressionMinVisibleSecondsValid ? config.impressionMinVisibleSeconds : kMoPubRequiredSecondsForImpression; + if (config.isImpressionMinVisiblePixelsValid) { + _impressionTimer = [[MPAdImpressionTimer alloc] initWithRequiredSecondsForImpression:requiredSecondsForImpression + requiredViewVisibilityPixels:config.impressionMinVisiblePixels]; + } else { + CGFloat requiredViewVisibilityPercentage = config.isImpressionMinVisiblePercentValid ? (config.impressionMinVisiblePercent / 100.0) : kMoPubRequiredViewVisibilityPercentage; + _impressionTimer = [[MPAdImpressionTimer alloc] initWithRequiredSecondsForImpression:requiredSecondsForImpression + requiredViewVisibilityPercentage:requiredViewVisibilityPercentage]; + } + _impressionTimer.delegate = self; - [properties removeObjectsForKeys:[NSArray arrayWithObjects:kImpressionTrackerURLsKey, kClickTrackerURLKey, kDefaultActionURLKey, nil]]; + [properties removeObjectsForKeys:@[kImpressionTrackerURLsKey, kClickTrackerURLKey, kDefaultActionURLKey, kNativeAdConfigKey]]; _properties = properties; if (!valid) { @@ -76,14 +91,21 @@ static const CGFloat kMoPubRequiredViewVisibilityPercentage = 0.5; } // Add the DAA icon settings to our properties dictionary. - NSString * daaIconImagePath = MPResourcePathForResource(kDAAIconImageName); - if (daaIconImagePath != nil) { + // Path will not change, so load path and image statically. + static NSString *daaIconImagePath = nil; + static UIImage *daaIconImage = nil; + if (!daaIconImagePath || !daaIconImage) { + daaIconImagePath = MPResourcePathForResource(kDAAIconImageName); + daaIconImage = daaIconImagePath ? [UIImage imageWithContentsOfFile:daaIconImagePath] : nil; + } + if (daaIconImagePath) { [properties setObject:daaIconImagePath forKey:kAdDAAIconImageKey]; } + if (daaIconImage) { + [properties setObject:daaIconImage forKey:kAdDAAIconUIImageKey]; + } - _destinationDisplayAgent = [[MPCoreInstanceProvider sharedProvider] buildMPAdDestinationDisplayAgentWithDelegate:self]; - _impressionTimer = [[MPStaticNativeAdImpressionTimer alloc] initWithRequiredSecondsForImpression:kMoPubRequiredSecondsForImpression requiredViewVisibilityPercentage:kMoPubRequiredViewVisibilityPercentage]; - _impressionTimer.delegate = self; + _destinationDisplayAgent = [MPAdDestinationDisplayAgent agentWithDelegate:self]; } return self; @@ -122,9 +144,9 @@ static const CGFloat kMoPubRequiredViewVisibilityPercentage = 0.5; [self.destinationDisplayAgent displayDestinationForURL:[NSURL URLWithString:kDAAIconTapDestinationURL]]; } -#pragma mark - +#pragma mark - -- (void)trackImpression +- (void)adViewWillLogImpression:(UIView *)adView { [self.delegate nativeAdWillLogImpression:self]; } diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPMoPubNativeCustomEvent.h b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPMoPubNativeCustomEvent.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPMoPubNativeCustomEvent.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPMoPubNativeCustomEvent.h diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPMoPubNativeCustomEvent.m b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPMoPubNativeCustomEvent.m similarity index 98% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPMoPubNativeCustomEvent.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPMoPubNativeCustomEvent.m index d444c2c3ff..ed5ef0c5f4 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPMoPubNativeCustomEvent.m +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPMoPubNativeCustomEvent.m @@ -17,12 +17,12 @@ - (void)requestAdWithCustomEventInfo:(NSDictionary *)info { MPMoPubNativeAdAdapter *adAdapter = [[MPMoPubNativeAdAdapter alloc] initWithAdProperties:[info mutableCopy]]; - + if (adAdapter.properties) { MPNativeAd *interfaceAd = [[MPNativeAd alloc] initWithAdAdapter:adAdapter]; [interfaceAd.impressionTrackerURLs addObjectsFromArray:adAdapter.impressionTrackerURLs]; [interfaceAd.clickTrackerURLs addObjectsFromArray:adAdapter.clickTrackerURLs]; - + // Get the image urls so we can download them prior to returning the ad. NSMutableArray *imageURLs = [NSMutableArray array]; for (NSString *key in [info allKeys]) { @@ -32,7 +32,7 @@ } } } - + [super precacheImagesWithURLs:imageURLs completionBlock:^(NSArray *errors) { if (errors) { MPLogDebug(@"%@", errors); @@ -44,7 +44,7 @@ } else { [self.delegate nativeCustomEvent:self didFailToLoadAdWithError:MPNativeAdNSErrorForInvalidAdServerResponse(nil)]; } - + } @end diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeAd+Internal.h b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAd+Internal.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeAd+Internal.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAd+Internal.h diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeAd+Internal.m b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAd+Internal.m similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeAd+Internal.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAd+Internal.m diff --git a/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdConfigValues+Internal.h b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdConfigValues+Internal.h new file mode 100644 index 0000000000..91d9fac1ce --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdConfigValues+Internal.h @@ -0,0 +1,16 @@ +// +// MPNativeAdConfigValues+Internal.h +// MoPubSDK +// +// Copyright © 2017 MoPub. All rights reserved. +// + +#import "MPNativeAdConfigValues.h" + +@interface MPNativeAdConfigValues (Internal) + +- (BOOL)isValidPercentage:(NSInteger)percentage; +- (BOOL)isValidTimeInterval:(NSTimeInterval)timeInterval; +- (BOOL)isValidNumberOfPixels:(CGFloat)pixels; + +@end diff --git a/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdConfigValues+Internal.m b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdConfigValues+Internal.m new file mode 100644 index 0000000000..ea1e777438 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdConfigValues+Internal.m @@ -0,0 +1,26 @@ +// +// MPNativeAdConfigValues+Internal.m +// MoPubSDK +// +// Copyright © 2017 MoPub. All rights reserved. +// + +#import "MPNativeAdConfigValues+Internal.h" + +@implementation MPNativeAdConfigValues (Internal) + +- (BOOL)isValidPercentage:(NSInteger)percentage +{ + return (percentage >= 0 && percentage <= 100); +} + +- (BOOL)isValidTimeInterval:(NSTimeInterval)timeInterval +{ + return timeInterval > 0.0; +} + +- (BOOL)isValidNumberOfPixels:(CGFloat)pixels { + return pixels >= 0.0; +} + +@end diff --git a/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdConfigValues.h b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdConfigValues.h new file mode 100644 index 0000000000..241ffd75d6 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdConfigValues.h @@ -0,0 +1,29 @@ +// +// MPNativeAdConfigValues.h +// MoPubSDK +// +// Copyright © 2017 MoPub. All rights reserved. +// + +#import + +@interface MPNativeAdConfigValues : NSObject + +@property (nonatomic, readonly) CGFloat impressionMinVisiblePixels; +@property (nonatomic, readonly) NSInteger impressionMinVisiblePercent; +@property (nonatomic, readonly) NSTimeInterval impressionMinVisibleSeconds; + +- (instancetype)initWithImpressionMinVisiblePixels:(CGFloat)impressionMinVisiblePixels + impressionMinVisiblePercent:(NSInteger)impressionMinVisiblePercent + impressionMinVisibleSeconds:(NSTimeInterval)impressionMinVisibleSeconds NS_DESIGNATED_INITIALIZER; + +@property (nonatomic, readonly) BOOL isImpressionMinVisiblePercentValid; +@property (nonatomic, readonly) BOOL isImpressionMinVisibleSecondsValid; +@property (nonatomic, readonly) BOOL isImpressionMinVisiblePixelsValid; + +/** + * `init` is not available. + */ +- (instancetype)init __attribute__((unavailable("init not available"))); + +@end diff --git a/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdConfigValues.m b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdConfigValues.m new file mode 100644 index 0000000000..bad2c90ee3 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdConfigValues.m @@ -0,0 +1,37 @@ +// +// MPNativeAdConfigValues.m +// MoPubSDK +// +// Copyright © 2017 MoPub. All rights reserved. +// + +#import "MPNativeAdConfigValues.h" +#import "MPNativeAdConfigValues+Internal.h" + +@implementation MPNativeAdConfigValues + +- (instancetype)initWithImpressionMinVisiblePixels:(CGFloat)impressionMinVisiblePixels + impressionMinVisiblePercent:(NSInteger)impressionMinVisiblePercent + impressionMinVisibleSeconds:(NSTimeInterval)impressionMinVisibleSeconds { + if (self = [super init]) { + _impressionMinVisiblePixels = impressionMinVisiblePixels; + _impressionMinVisiblePercent = impressionMinVisiblePercent; + _impressionMinVisibleSeconds = impressionMinVisibleSeconds; + } + + return self; +} + +- (BOOL)isImpressionMinVisibleSecondsValid { + return [self isValidTimeInterval:self.impressionMinVisibleSeconds]; +} + +- (BOOL)isImpressionMinVisiblePercentValid { + return [self isValidPercentage:self.impressionMinVisiblePercent]; +} + +- (BOOL)isImpressionMinVisiblePixelsValid { + return [self isValidNumberOfPixels:self.impressionMinVisiblePixels]; +} + +@end diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeAdRendererConstants.h b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdRendererConstants.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeAdRendererConstants.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdRendererConstants.h diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeAdRendererImageHandler.h b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdRendererImageHandler.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeAdRendererImageHandler.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdRendererImageHandler.h diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeAdRendererImageHandler.m b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdRendererImageHandler.m similarity index 95% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeAdRendererImageHandler.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdRendererImageHandler.m index 4214e570f8..6d4d418a4f 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeAdRendererImageHandler.m +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdRendererImageHandler.m @@ -59,10 +59,10 @@ } else if (imageURL) { MPLogDebug(@"Cache miss on %@. Re-downloading...", imageURL); - __weak typeof(self) weakSelf = self; + __weak __typeof__(self) weakSelf = self; [self.imageDownloadQueue addDownloadImageURLs:@[imageURL] completionBlock:^(NSArray *errors) { - __strong typeof(self) strongSelf = weakSelf; + __strong __typeof__(self) strongSelf = weakSelf; if (strongSelf) { if (errors.count == 0) { UIImage *image = [UIImage imageWithData:[[MPNativeCache sharedCache] retrieveDataForKey:imageURL.absoluteString]]; @@ -86,7 +86,7 @@ MPLogDebug(@"Cell was recycled. Don't bother setting the image."); return; } - + if (image) { imageView.image = image; } diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeAdSourceQueue.h b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdSourceQueue.h similarity index 99% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeAdSourceQueue.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdSourceQueue.h index af870c27b5..059e6066db 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeAdSourceQueue.h +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdSourceQueue.h @@ -28,4 +28,4 @@ - (void)adSourceQueueAdIsAvailable:(MPNativeAdSourceQueue *)source; -@end +@end \ No newline at end of file diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeAdSourceQueue.m b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdSourceQueue.m similarity index 99% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeAdSourceQueue.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdSourceQueue.m index a8796f4158..87257fdbbe 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeAdSourceQueue.m +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdSourceQueue.m @@ -63,7 +63,7 @@ static NSUInteger const kMaxRetries = sizeof(kAdFetchRetryTimes)/sizeof(kAdFetch while (nextAd && ![self isAdAgeValid:nextAd withMaxAge:age]) { nextAd = [self dequeueAd]; } - + return nextAd; } @@ -87,7 +87,7 @@ static NSUInteger const kMaxRetries = sizeof(kAdFetchRetryTimes)/sizeof(kAdFetch - (BOOL)isAdAgeValid:(MPNativeAd *)ad withMaxAge:(NSTimeInterval)maxAge { NSTimeInterval adAge = [ad.creationDate timeIntervalSinceNow]; - + return fabs(adAge) < maxAge; } @@ -111,16 +111,16 @@ static NSUInteger const kMaxRetries = sizeof(kAdFetchRetryTimes)/sizeof(kAdFetch if ([self count] >= kCacheSizeLimit || self.isAdLoading) { return; } - + self.isAdLoading = YES; - + MPNativeAdRequest *adRequest = [MPNativeAdRequest requestWithAdUnitIdentifier:self.adUnitIdentifier rendererConfigurations:self.rendererConfigurations]; adRequest.targeting = self.targeting; - + [adRequest startForAdSequence:self.currentSequence withCompletionHandler:^(MPNativeAdRequest *request, MPNativeAd *response, NSError *error) { if (response && !error) { self.adFetchRetryCounter = 0; - + [self addNativeAd:response]; self.currentSequence++; if ([self count] == 1) { @@ -149,4 +149,4 @@ static NSUInteger const kMaxRetries = sizeof(kAdFetchRetryTimes)/sizeof(kAdFetch }]; } -@end +@end \ No newline at end of file diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeAdUtils.h b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdUtils.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeAdUtils.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdUtils.h diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeAdUtils.m b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdUtils.m similarity index 99% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeAdUtils.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdUtils.m index 506231c077..d77075d7e6 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeAdUtils.m +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeAdUtils.m @@ -16,7 +16,7 @@ NSTimeInterval const kUpdateVisibleCellsInterval = 0.25; if (urlString.length == 0) { return NO; } - + NSURL *url = [NSURL URLWithString:urlString]; if (url) { [urlArray addObject:url]; diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeCache.h b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeCache.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeCache.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeCache.h diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeCache.m b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeCache.m similarity index 97% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeCache.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeCache.m index 7babede42d..376589256d 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeCache.m +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeCache.m @@ -46,11 +46,11 @@ typedef enum { if (self != nil) { _memoryCache = [[NSCache alloc] init]; _memoryCache.delegate = self; - + _diskCache = [[MPDiskLRUCache alloc] init]; - + _cacheMethod = MPNativeCacheMethodDiskAndMemory; - + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveMemoryWarning:) name:UIApplicationDidReceiveMemoryWarningNotification object:[UIApplication sharedApplication]]; } @@ -103,7 +103,7 @@ typedef enum { if (cacheMethod & MPNativeCacheMethodDiskAndMemory) { dataExists = [self.memoryCache objectForKey:key] != nil; } - + if (!dataExists) { dataExists = [self.diskCache cachedDataExistsForKey:key]; } @@ -114,31 +114,31 @@ typedef enum { - (id)retrieveDataForKey:(NSString *)key withCacheMethod:(MPNativeCacheMethod)cacheMethod { id data = nil; - + if (cacheMethod & MPNativeCacheMethodDiskAndMemory) { data = [self.memoryCache objectForKey:key]; } - + if (data) { MPLogDebug(@"RETRIEVE FROM MEMORY: %@", key); } - - + + if (data == nil) { data = [self.diskCache retrieveDataForKey:key]; - + if (data && cacheMethod & MPNativeCacheMethodDiskAndMemory) { MPLogDebug(@"RETRIEVE FROM DISK: %@", key); - + [self.memoryCache setObject:data forKey:key]; MPLogDebug(@"STORED IN MEMORY: %@", key); } } - + if (data == nil) { MPLogDebug(@"RETRIEVE FAILED: %@", key); } - + return data; } @@ -147,12 +147,12 @@ typedef enum { if (data == nil) { return; } - + if (cacheMethod & MPNativeCacheMethodDiskAndMemory) { [self.memoryCache setObject:data forKey:key]; MPLogDebug(@"STORED IN MEMORY: %@", key); } - + [self.diskCache storeData:data forKey:key]; MPLogDebug(@"STORED ON DISK: %@", key); } diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativePositionResponseDeserializer.h b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativePositionResponseDeserializer.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativePositionResponseDeserializer.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativePositionResponseDeserializer.h diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativePositionResponseDeserializer.m b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativePositionResponseDeserializer.m similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativePositionResponseDeserializer.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativePositionResponseDeserializer.m diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativePositionSource.h b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativePositionSource.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativePositionSource.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativePositionSource.h diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativePositionSource.m b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativePositionSource.m similarity index 72% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativePositionSource.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativePositionSource.m index dfb662e5a4..0389b56883 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativePositionSource.m +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativePositionSource.m @@ -13,6 +13,8 @@ #import "MPLogging.h" #import "MPNativePositionResponseDeserializer.h" #import "MPAPIEndpoints.h" +#import "MPHTTPNetworkSession.h" +#import "MPURLRequest.h" static NSString * const kPositioningSourceErrorDomain = @"com.mopub.iossdk.positioningsource"; static const NSTimeInterval kMaximumRetryInterval = 60.0; @@ -21,12 +23,11 @@ static const CGFloat kRetryIntervalBackoffMultiplier = 2.0; //////////////////////////////////////////////////////////////////////////////////////////////////// -@interface MPNativePositionSource () +@interface MPNativePositionSource () @property (nonatomic, assign) BOOL loading; @property (nonatomic, copy) NSString *adUnitIdentifier; -@property (nonatomic, strong) NSURLConnection *connection; -@property (nonatomic, strong) NSMutableData *data; +@property (nonatomic, strong) NSURLSessionTask *task; @property (nonatomic, copy) void (^completionHandler)(MPAdPositioning *positioning, NSError *error); @property (nonatomic, assign) NSTimeInterval maximumRetryInterval; @property (nonatomic, assign) NSTimeInterval minimumRetryInterval; @@ -53,7 +54,7 @@ static const CGFloat kRetryIntervalBackoffMultiplier = 2.0; - (void)dealloc { - [_connection cancel]; + [_task cancel]; } #pragma mark - Public @@ -75,16 +76,15 @@ static const CGFloat kRetryIntervalBackoffMultiplier = 2.0; MPLogInfo(@"Requesting ad positions for native ad unit (%@).", identifier); - NSURLRequest *request = [NSURLRequest requestWithURL:[self serverURLWithAdUnitIdentifier:identifier]]; - [self.connection cancel]; - [self.data setLength:0]; - self.connection = [NSURLConnection connectionWithRequest:request delegate:self]; + MPURLRequest *request = [[MPURLRequest alloc] initWithURL:[self serverURLWithAdUnitIdentifier:identifier]]; + [self.task cancel]; + self.task = [self httpTaskWithRequest:request]; } - (void)cancel { // Cancel any connection currently in flight. - [self.connection cancel]; + [self.task cancel]; // Cancel any queued retry requests. [NSObject cancelPreviousPerformRequestsWithTarget:self]; @@ -92,10 +92,31 @@ static const CGFloat kRetryIntervalBackoffMultiplier = 2.0; #pragma mark - Internal +- (NSURLSessionTask *)httpTaskWithRequest:(MPURLRequest *)request { + __weak __typeof__(self) weakSelf = self; + NSURLSessionTask * task = [MPHTTPNetworkSession startTaskWithHttpRequest:request responseHandler:^(NSData * _Nonnull data, NSHTTPURLResponse * _Nonnull response) { + __typeof__(self) strongSelf = weakSelf; + + [strongSelf parsePositioningData:data]; + } errorHandler:^(NSError * _Nonnull error) { + __typeof__(self) strongSelf = weakSelf; + + if (strongSelf.retryInterval >= strongSelf.maximumRetryInterval) { + strongSelf.completionHandler(nil, error); + strongSelf.completionHandler = nil; + } else { + [strongSelf performSelector:@selector(retryLoadingPositions) withObject:nil afterDelay:strongSelf.retryInterval]; + strongSelf.retryInterval = MIN(strongSelf.retryInterval * kRetryIntervalBackoffMultiplier, strongSelf.maximumRetryInterval); + } + }]; + + return task; +} + - (NSURL *)serverURLWithAdUnitIdentifier:(NSString *)identifier { - NSString *URLString = [NSString stringWithFormat:@"%@?id=%@&v=%@&nsv=%@&udid=%@", - [MPAPIEndpoints baseURLStringWithPath:MOPUB_API_PATH_NATIVE_POSITIONING testing:NO], + NSString *URLString = [NSString stringWithFormat:@"%@?id=%@&v=%@&nv=%@&udid=%@", + [MPAPIEndpoints baseURLStringWithPath:MOPUB_API_PATH_NATIVE_POSITIONING], identifier, MP_SERVER_VERSION, MP_SDK_VERSION, @@ -109,38 +130,15 @@ static const CGFloat kRetryIntervalBackoffMultiplier = 2.0; MPLogInfo(@"Retrying positions (retry attempt #%lu).", (unsigned long)self.retryCount); - NSURLRequest *request = [NSURLRequest requestWithURL:[self serverURLWithAdUnitIdentifier:self.adUnitIdentifier]]; - [self.connection cancel]; - [self.data setLength:0]; - self.connection = [NSURLConnection connectionWithRequest:request delegate:self]; + MPURLRequest *request = [[MPURLRequest alloc] initWithURL:[self serverURLWithAdUnitIdentifier:self.adUnitIdentifier]]; + [self.task cancel]; + self.task = [self httpTaskWithRequest:request]; } -#pragma mark - - -- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error -{ - if (self.retryInterval >= self.maximumRetryInterval) { - self.completionHandler(nil, error); - self.completionHandler = nil; - } else { - [self performSelector:@selector(retryLoadingPositions) withObject:nil afterDelay:self.retryInterval]; - self.retryInterval = MIN(self.retryInterval * kRetryIntervalBackoffMultiplier, self.maximumRetryInterval); - } -} - -- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data -{ - if (!self.data) { - self.data = [NSMutableData data]; - } - - [self.data appendData:data]; -} - -- (void)connectionDidFinishLoading:(NSURLConnection *)connection +- (void)parsePositioningData:(NSData *)data { NSError *deserializationError = nil; - MPClientAdPositioning *positioning = [[MPNativePositionResponseDeserializer deserializer] clientPositioningForData:self.data error:&deserializationError]; + MPClientAdPositioning *positioning = [[MPNativePositionResponseDeserializer deserializer] clientPositioningForData:data error:&deserializationError]; if (deserializationError) { MPLogDebug(@"Position deserialization failed with error: %@", deserializationError); diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeView.h b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeView.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeView.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeView.h diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeView.m b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeView.m similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPNativeView.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPNativeView.m diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPTableViewAdPlacerCell.h b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPTableViewAdPlacerCell.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPTableViewAdPlacerCell.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPTableViewAdPlacerCell.h diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPTableViewAdPlacerCell.m b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPTableViewAdPlacerCell.m similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPTableViewAdPlacerCell.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPTableViewAdPlacerCell.m diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPTableViewCellImpressionTracker.h b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPTableViewCellImpressionTracker.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPTableViewCellImpressionTracker.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPTableViewCellImpressionTracker.h diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPTableViewCellImpressionTracker.m b/iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPTableViewCellImpressionTracker.m similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/Internal/MPTableViewCellImpressionTracker.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/Internal/MPTableViewCellImpressionTracker.m diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPAdPositioning.h b/iphone/Maps/3party/MoPubSDK/NativeAds/MPAdPositioning.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPAdPositioning.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPAdPositioning.h diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPAdPositioning.m b/iphone/Maps/3party/MoPubSDK/NativeAds/MPAdPositioning.m similarity index 99% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPAdPositioning.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPAdPositioning.m index 7d75027644..a4517e6abe 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/MPAdPositioning.m +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/MPAdPositioning.m @@ -21,7 +21,7 @@ if (self) { _fixedPositions = [[NSMutableOrderedSet alloc] init]; } - + return self; } diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPClientAdPositioning.h b/iphone/Maps/3party/MoPubSDK/NativeAds/MPClientAdPositioning.h similarity index 98% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPClientAdPositioning.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPClientAdPositioning.h index 7bfa7a3c01..17972fc736 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/MPClientAdPositioning.h +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/MPClientAdPositioning.h @@ -52,7 +52,7 @@ * Tells the positioning object that ads should be displayed evenly throughout a stream using the * specified interval. * - * Repeating ads will only appear within a single section. If the receiver has fixed positions, + * Repeating ads will only appear within a single section. If the receiver has fixed positions, * the sequence of repeating ads will start to appear following the last registered fixed position. * If the receiver does not have any fixed positions, ads will appear regularly starting at * `interval`, within the first section. diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPClientAdPositioning.m b/iphone/Maps/3party/MoPubSDK/NativeAds/MPClientAdPositioning.m similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPClientAdPositioning.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPClientAdPositioning.m diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPCollectionViewAdPlacer.h b/iphone/Maps/3party/MoPubSDK/NativeAds/MPCollectionViewAdPlacer.h similarity index 98% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPCollectionViewAdPlacer.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPCollectionViewAdPlacer.h index 2e0ad58d9e..351a7c630f 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/MPCollectionViewAdPlacer.h +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/MPCollectionViewAdPlacer.h @@ -99,14 +99,14 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// /** - * The MoPub SDK adds interfaces to the `UICollectionView` class to help your application with + * The MoPub SDK adds interfaces to the `UICollectionView` class to help your application with * responsibilities related to `MPCollectionViewAdPlacer`. These APIs include methods to help notify * the ad placer of all modifications to the original collection view, as well as to simplify your - * application code such that it does not need to perform index path manipulations to account for + * application code such that it does not need to perform index path manipulations to account for * the presence of ads. * * Since the ad placer replaces the original data source and delegate objects of your collection - * view, the SDK also provides new methods for you to set these properties such that the ad placer + * view, the SDK also provides new methods for you to set these properties such that the ad placer * remains aware of the changes. */ @@ -161,7 +161,7 @@ * Returns the original delegate of the collection view. * * When you instantiate an ad placer using a collection view, the ad placer replaces the collection - * view's original delegate object. If your application needs to access the original delegate, use + * view's original delegate object. If your application needs to access the original delegate, use * this method instead of -[UICollectionView delegate]. * * @return The original collection view delegate. @@ -240,7 +240,7 @@ * Moves a section from one location to another in the collection view, and informs the attached ad * placer. * - * @param section The index path of the section you want to move. This parameter must not be + * @param section The index path of the section you want to move. This parameter must not be * `nil`. * @param newSection The index path of the section’s new location. This parameter must not be `nil`. */ @@ -263,7 +263,7 @@ * * @param identifier The reuse identifier for the specified cell. This parameter must not be `nil`. * @param indexPath The index path specifying the location of the cell. The data source receives - * this information when it is asked for the cell and should just pass it along. This method uses + * this information when it is asked for the cell and should just pass it along. This method uses * the index path to perform additional configuration based on the cell’s position in the collection * view. * @@ -384,4 +384,4 @@ */ -(void)nativeAdWillLeaveApplicationFromCollectionViewAdPlacer:(MPCollectionViewAdPlacer *)placer; -@end +@end \ No newline at end of file diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPCollectionViewAdPlacer.m b/iphone/Maps/3party/MoPubSDK/NativeAds/MPCollectionViewAdPlacer.m similarity index 99% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPCollectionViewAdPlacer.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPCollectionViewAdPlacer.m index fc33d2454b..fa745cbc92 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/MPCollectionViewAdPlacer.m +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/MPCollectionViewAdPlacer.m @@ -65,7 +65,7 @@ static NSString * const kCollectionViewAdPlacerReuseIdentifier = @"MPCollectionV collectionView.delegate = self; [_collectionView registerClass:[MPCollectionViewAdPlacerCell class] forCellWithReuseIdentifier:kCollectionViewAdPlacerReuseIdentifier]; - + [collectionView mp_setAdPlacer:self]; } @@ -502,12 +502,15 @@ static char kAdPlacerKey; - (NSArray *)mp_visibleCells { MPCollectionViewAdPlacer *adPlacer = [self mp_adPlacer]; - + if (adPlacer) { NSArray *indexPaths = [self mp_indexPathsForVisibleItems]; NSMutableArray *visibleCells = [NSMutableArray array]; for (NSIndexPath *indexPath in indexPaths) { - [visibleCells addObject:[self mp_cellForItemAtIndexPath:indexPath]]; + UICollectionViewCell * cell = [self mp_cellForItemAtIndexPath:indexPath]; + if (cell != nil) { + [visibleCells addObject:cell]; + } } return visibleCells; } else { @@ -606,10 +609,10 @@ static char kAdPlacerKey; // We need to obtain the adjusted index paths to delete BEFORE we // update the stream ad placer's data. adjustedIndexPaths = [adPlacer.streamAdPlacer adjustedIndexPathsForOriginalIndexPaths:indexPaths]; - + [adPlacer.streamAdPlacer deleteItemsAtIndexPaths:indexPaths]; } - + // We perform the actual UI deletion AFTER updating the stream ad placer's // data, because the deletion can trigger queries to the data source, which // needs to reflect the post-deletion state. diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAd.h b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAd.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAd.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAd.h diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAd.m b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAd.m similarity index 87% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAd.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAd.m index ecffa2fccf..d5d7f554e3 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAd.m +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAd.m @@ -19,6 +19,8 @@ #import "MPNativeAdRenderer.h" #import "MPNativeAdDelegate.h" #import "MPNativeView.h" +#import "MPHTTPNetworkSession.h" +#import "MPURLRequest.h" //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -78,14 +80,21 @@ - (UIView *)retrieveAdViewWithError:(NSError **)error { // We always return the same MPNativeView (self.associatedView) so we need to remove its subviews - // before attaching the new ad view to it. - [[self.associatedView subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)]; + // before attaching the new ad view to it. Also need to reset the `hasAttachedToView` state + // variable back to `NO` since all of the subviews should be removed. + for (UIView * view in self.associatedView.subviews) { + [view removeFromSuperview]; + } + + if (self.associatedView.subviews.count == 0) { + self.hasAttachedToView = NO; + } UIView *adView = [self.renderer retrieveViewWithAdapter:self.adAdapter error:error]; if (adView) { if (!self.hasAttachedToView) { - [self willAttachToView:self.associatedView]; + [self willAttachToView:self.associatedView withAdContentViews:adView.subviews]; self.hasAttachedToView = YES; } @@ -141,16 +150,16 @@ - (void)trackMetricForURL:(NSURL *)URL { - NSMutableURLRequest *request = [[MPCoreInstanceProvider sharedProvider] buildConfiguredURLRequestWithURL:URL]; - request.cachePolicy = NSURLRequestReloadIgnoringCacheData; - [NSURLConnection connectionWithRequest:request delegate:nil]; + MPURLRequest *request = [[MPURLRequest alloc] initWithURL:URL]; + [MPHTTPNetworkSession startTaskWithHttpRequest:request responseHandler:nil errorHandler:nil]; } #pragma mark - Internal -- (void)willAttachToView:(UIView *)view -{ - if ([self.adAdapter respondsToSelector:@selector(willAttachToView:)]) { +- (void)willAttachToView:(UIView *)view withAdContentViews:(NSArray *)adContentViews { + if ([self.adAdapter respondsToSelector:@selector(willAttachToView:withAdContentViews:)]) { + [self.adAdapter willAttachToView:view withAdContentViews:adContentViews]; + } else if ([self.adAdapter respondsToSelector:@selector(willAttachToView:)]) { [self.adAdapter willAttachToView:view]; } } diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdAdapter.h b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdAdapter.h similarity index 90% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdAdapter.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdAdapter.h index baed12ff6b..296a3a0a9a 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdAdapter.h +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdAdapter.h @@ -159,6 +159,19 @@ */ - (void)willAttachToView:(UIView *)view; +/** + * This method will be called when your ad's content is about to be loaded into a view; subviews which contain ad + * contents are also included. + * + * Note: If both this method and `willAttachToView:` are implemented, ONLY this method will be called. + * + * @param view A view that will contain the ad content. + * @param adContentViews Array of views that contains the ad's content views. + * + * You should implement this method if the underlying third-party ad object needs to be informed of this event. + */ +- (void)willAttachToView:(UIView *)view withAdContentViews:(NSArray *)adContentViews; + /** * This method will be called if your implementation provides a DAA icon through the properties dictionary * and the user has tapped the icon. @@ -176,7 +189,7 @@ * Return your ad's main media view. * * You should implement this method if your ad supplies its own view for the main media view which is typically - * an image or video. If you implement this method, the SDK will not make any other attempts at retrieving + * an image or video. If you implement this method, the SDK will not make any other attempts at retrieving * the main media asset. */ - (UIView *)mainMediaView; diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdConstants.h b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdConstants.h similarity index 90% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdConstants.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdConstants.h index 6452cb1d32..94350f78ed 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdConstants.h +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdConstants.h @@ -21,11 +21,11 @@ extern NSString *const kAdCTATextKey; extern NSString *const kAdStarRatingKey; extern NSString *const kVideoConfigKey; extern NSString *const kVASTVideoKey; -extern NSString *const kNativeVideoAdConfigKey; +extern NSString *const kNativeAdConfigKey; extern NSString *const kAdDAAIconImageKey; +extern NSString *const kAdDAAIconUIImageKey; extern NSString *const kDAAIconImageName; extern NSString *const kDAAIconTapDestinationURL; extern NSString *const kImpressionTrackerURLsKey; extern NSString *const kDefaultActionURLKey; extern NSString *const kClickTrackerURLKey; -extern NSString *const kLogEventRequestPropertiesKey; diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdConstants.m b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdConstants.m similarity index 87% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdConstants.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdConstants.m index 640b70a82f..74b3548735 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdConstants.m +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdConstants.m @@ -18,11 +18,11 @@ NSString *const kAdCTATextKey = @"ctatext"; NSString *const kAdStarRatingKey = @"starrating"; NSString *const kVideoConfigKey = @"videoconfig"; NSString *const kVASTVideoKey = @"video"; -NSString *const kNativeVideoAdConfigKey = @"nativevideoadconfig"; +NSString *const kNativeAdConfigKey = @"nativeadconfig"; NSString *const kAdDAAIconImageKey = @"daaicon"; +NSString *const kAdDAAIconUIImageKey = @"daaiconuiimage"; NSString *const kDAAIconImageName = @"MPDAAIcon.png"; NSString *const kDAAIconTapDestinationURL = @"https://www.mopub.com/optout"; NSString *const kImpressionTrackerURLsKey = @"imptracker"; NSString *const kDefaultActionURLKey = @"clk"; NSString *const kClickTrackerURLKey = @"clktracker"; -NSString *const kLogEventRequestPropertiesKey = @"logeventrequestproperties"; diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdData.h b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdData.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdData.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdData.h diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdData.m b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdData.m similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdData.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdData.m diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdDelegate.h b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdDelegate.h similarity index 99% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdDelegate.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdDelegate.h index 0702cc79fc..26c88b30ad 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdDelegate.h +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdDelegate.h @@ -48,4 +48,4 @@ */ - (UIViewController *)viewControllerForPresentingModalView; -@end +@end \ No newline at end of file diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdError.h b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdError.h similarity index 60% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdError.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdError.h index 7a346861d9..d112b15340 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdError.h +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdError.h @@ -7,7 +7,7 @@ typedef enum MPNativeAdErrorCode { MPNativeAdErrorUnknown = -1, - + MPNativeAdErrorHTTPError = -1000, MPNativeAdErrorInvalidServerResponse = -1001, MPNativeAdErrorNoInventory = -1002, @@ -15,7 +15,7 @@ typedef enum MPNativeAdErrorCode { MPNativeAdErrorAdUnitWarmingUp = -1004, MPNativeAdErrorVASTParsingFailed = -1005, MPNativeAdErrorVideoConfigInvalid = -1006, - + MPNativeAdErrorContentDisplayError = -1100, MPNativeAdErrorRenderError = -1200 } MPNativeAdErrorCode; @@ -23,13 +23,13 @@ typedef enum MPNativeAdErrorCode { extern NSString * const MoPubNativeAdsSDKDomain; NSError *MPNativeAdNSErrorForInvalidAdServerResponse(NSString *reason); -NSError *MPNativeAdNSErrorForAdUnitWarmingUp(); -NSError *MPNativeAdNSErrorForNoInventory(); -NSError *MPNativeAdNSErrorForNetworkConnectionError(); -NSError *MPNativeAdNSErrorForInvalidImageURL(); -NSError *MPNativeAdNSErrorForImageDownloadFailure(); -NSError *MPNativeAdNSErrorForContentDisplayErrorMissingRootController(); -NSError *MPNativeAdNSErrorForContentDisplayErrorInvalidURL(); -NSError *MPNativeAdNSErrorForVASTParsingFailure(); -NSError *MPNativeAdNSErrorForVideoConfigInvalid(); -NSError *MPNativeAdNSErrorForRenderValueTypeError(); +NSError *MPNativeAdNSErrorForAdUnitWarmingUp(void); +NSError *MPNativeAdNSErrorForNoInventory(void); +NSError *MPNativeAdNSErrorForNetworkConnectionError(void); +NSError *MPNativeAdNSErrorForInvalidImageURL(void); +NSError *MPNativeAdNSErrorForImageDownloadFailure(void); +NSError *MPNativeAdNSErrorForContentDisplayErrorMissingRootController(void); +NSError *MPNativeAdNSErrorForContentDisplayErrorInvalidURL(void); +NSError *MPNativeAdNSErrorForVASTParsingFailure(void); +NSError *MPNativeAdNSErrorForVideoConfigInvalid(void); +NSError *MPNativeAdNSErrorForRenderValueTypeError(void); diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdError.m b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdError.m similarity index 99% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdError.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdError.m index 8f9c40c947..ce0d596f6a 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdError.m +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdError.m @@ -11,7 +11,7 @@ NSError *MPNativeAdNSErrorForInvalidAdServerResponse(NSString *reason) { if (reason.length == 0) { reason = @"Invalid ad server response"; } - + return [NSError errorWithDomain:MoPubNativeAdsSDKDomain code:MPNativeAdErrorInvalidServerResponse userInfo:@{NSLocalizedDescriptionKey : [reason copy]}]; } @@ -53,4 +53,4 @@ NSError *MPNativeAdNSErrorForContentDisplayErrorInvalidURL() { NSError *MPNativeAdNSErrorForRenderValueTypeError() { return [NSError errorWithDomain:MoPubNativeAdsSDKDomain code:MPNativeAdErrorRenderError userInfo:@{NSLocalizedDescriptionKey : @"Native ad property was an incorrect data type"}]; -} +} \ No newline at end of file diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdRenderer.h b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdRenderer.h similarity index 95% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdRenderer.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdRenderer.h index 3e7356ecf6..928d7fed12 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdRenderer.h +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdRenderer.h @@ -23,7 +23,7 @@ typedef CGSize (^MPNativeViewSizeHandler)(CGFloat maximumWidth); /** * The MoPub SDK has a concept of native ad renderer that allows you to render the ad however you want. It also gives you the - * ability to expose configurable properties through renderer settings objects to the application that influence how you render + * ability to expose configurable properties through renderer settings objects to the application that influence how you render * your native custom event's view. * * Your renderer should implement this protocol. Your renderer is responsible for rendering the network's ad data into a view @@ -43,7 +43,7 @@ typedef CGSize (^MPNativeViewSizeHandler)(CGFloat maximumWidth); * @param rendererSettings Application defined settings that you should store in the configuration object that you * construct. * - * @return A configuration object that allows the MoPub SDK to instantiate your renderer with the application + * @return A configuration object that allows the MoPub SDK to instantiate your renderer with the application * settings and for the supported ad types. */ + (MPNativeAdRendererConfiguration *)rendererConfigurationWithRendererSettings:(id)rendererSettings; @@ -57,7 +57,7 @@ typedef CGSize (^MPNativeViewSizeHandler)(CGFloat maximumWidth); /** * You must return a native ad view when `-retrieveViewWithAdapter:error:` is called. Ideally, you should create a native view - * each time this is called as holding onto the view may end up consuming a lot of memory when many ads are being shown. + * each time this is called as holding onto the view may end up consuming a lot of memory when many ads are being shown. * However, it is OK to hold a strong reference to the view if you must. * * @param adapter Your custom event's adapter class that contains the network specific data necessary to render the ad to @@ -97,7 +97,7 @@ typedef CGSize (^MPNativeViewSizeHandler)(CGFloat maximumWidth); /** * - * The MoPubSDK will call this method when the user has tapped the ad and will + * The MoPubSDK will call this method when the user has tapped the ad and will * invoke the clickthrough action. * */ diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdRendererConfiguration.h b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdRendererConfiguration.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdRendererConfiguration.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdRendererConfiguration.h diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdRendererConfiguration.m b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdRendererConfiguration.m similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdRendererConfiguration.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdRendererConfiguration.m diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdRendererSettings.h b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdRendererSettings.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdRendererSettings.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdRendererSettings.h diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdRendering.h b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdRendering.h similarity index 99% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdRendering.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdRendering.h index 532cc1b5b5..a33b29dff6 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdRendering.h +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdRendering.h @@ -12,7 +12,7 @@ /** * The MPNativeAdRendering protocol provides methods for displaying ad content in * custom view classes. - * + * * It can be used for both static native ads and native video ads. If you are serving * native video ads, you need to implement nativeVideoView. */ diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdRenderingImageLoader.h b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdRenderingImageLoader.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdRenderingImageLoader.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdRenderingImageLoader.h diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdRenderingImageLoader.m b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdRenderingImageLoader.m similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdRenderingImageLoader.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdRenderingImageLoader.m diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdRequest.h b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdRequest.h similarity index 97% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdRequest.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdRequest.h index f9f3d325fe..5680f8dc21 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdRequest.h +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdRequest.h @@ -19,8 +19,8 @@ typedef void(^MPNativeAdRequestHandler)(MPNativeAdRequest *request, * The `MPNativeAdRequest` class is used to manage individual requests to the MoPub ad server for * native ads. * - * @warning **Note:** This class is meant for one-off requests for which you intend to manually - * process the native ad response. If you are using `MPTableViewAdPlacer` or + * @warning **Note:** This class is meant for one-off requests for which you intend to manually + * process the native ad response. If you are using `MPTableViewAdPlacer` or * `MPCollectionViewAdPlacer` to display ads, there should be no need for you to use this class. */ diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdRequest.m b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdRequest.m similarity index 78% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdRequest.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdRequest.m index 3f64fb7cff..73fe3e10aa 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdRequest.m +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdRequest.m @@ -10,7 +10,6 @@ #import "MPNativeAdError.h" #import "MPNativeAd+Internal.h" #import "MPNativeAdRequestTargeting.h" -#import "MPLogEvent.h" #import "MPLogging.h" #import "MPImageDownloadQueue.h" #import "MPConstants.h" @@ -49,7 +48,7 @@ self = [super init]; if (self) { _adUnitIdentifier = [identifier copy]; - _communicator = [[MPCoreInstanceProvider sharedProvider] buildMPAdServerCommunicatorWithDelegate:self]; + _communicator = [[MPAdServerCommunicator alloc] initWithDelegate:self]; _rendererConfigurations = rendererConfigurations; } return self; @@ -74,14 +73,13 @@ if (handler) { self.URL = [MPAdServerURLBuilder URLWithAdUnitID:self.adUnitIdentifier keywords:self.targeting.keywords + userDataKeywords:self.targeting.userDataKeywords location:self.targeting.location - versionParameterName:@"nsv" - version:MP_SDK_VERSION - testing:NO - desiredAssets:[self.targeting.desiredAssets allObjects]]; - + desiredAssets:[self.targeting.desiredAssets allObjects] + viewability:NO]; + [self assignCompletionHandler:handler]; - + [self loadAdWithURL:self.URL]; } else { MPLogWarn(@"Native Ad Request did not start - requires completion handler block."); @@ -93,15 +91,14 @@ if (handler) { self.URL = [MPAdServerURLBuilder URLWithAdUnitID:self.adUnitIdentifier keywords:self.targeting.keywords + userDataKeywords:self.targeting.userDataKeywords location:self.targeting.location - versionParameterName:@"nsv" - version:MP_SDK_VERSION - testing:NO desiredAssets:[self.targeting.desiredAssets allObjects] - adSequence:adSequence]; - + adSequence:adSequence + viewability:NO]; + [self assignCompletionHandler:handler]; - + [self loadAdWithURL:self.URL]; } else { MPLogWarn(@"Native Ad Request did not start - requires completion handler block."); @@ -130,7 +127,7 @@ MPLogWarn(@"Native ad request is already loading an ad. Wait for previous load to finish."); return; } - + MPLogInfo(@"Starting ad request with URL: %@", self.URL); self.loading = YES; @@ -142,7 +139,7 @@ if (configuration.customEventClass) { MPLogInfo(@"Looking for custom event class named %@.", configuration.customEventClass); } - + // For MoPub native ads, set the classData to be the adResponseData if ((configuration.customEventClass == [MPMoPubNativeCustomEvent class]) || (configuration.customEventClass == [MOPUBNativeVideoCustomEvent class])) { NSError *error; @@ -151,18 +148,19 @@ clearNullObjects:YES error:&error]; if (configuration.customEventClass == [MOPUBNativeVideoCustomEvent class]) { - [classData setObject:[[MOPUBNativeVideoAdConfigValues alloc] - initWithPlayVisiblePercent:configuration.nativeVideoPlayVisiblePercent - pauseVisiblePercent:configuration.nativeVideoPauseVisiblePercent - impressionMinVisiblePercent:configuration.nativeVideoImpressionMinVisiblePercent - impressionVisible:configuration.nativeVideoImpressionVisible - maxBufferingTime:configuration.nativeVideoMaxBufferingTime - trackers:configuration.nativeVideoTrackers] forKey:kNativeVideoAdConfigKey]; - MPAdConfigurationLogEventProperties *logEventProperties = - [[MPAdConfigurationLogEventProperties alloc] initWithConfiguration:configuration]; - [classData setObject:logEventProperties forKey:kLogEventRequestPropertiesKey]; + classData[kNativeAdConfigKey] = [[MOPUBNativeVideoAdConfigValues alloc] initWithPlayVisiblePercent:configuration.nativeVideoPlayVisiblePercent + pauseVisiblePercent:configuration.nativeVideoPauseVisiblePercent + impressionMinVisiblePixels:configuration.nativeImpressionMinVisiblePixels + impressionMinVisiblePercent:configuration.nativeImpressionMinVisiblePercent + impressionMinVisibleSeconds:configuration.nativeImpressionMinVisibleTimeInterval + maxBufferingTime:configuration.nativeVideoMaxBufferingTime + trackers:configuration.nativeVideoTrackers]; + } else if (configuration.customEventClass == [MPMoPubNativeCustomEvent class]) { + classData[kNativeAdConfigKey] = [[MPNativeAdConfigValues alloc] initWithImpressionMinVisiblePixels:configuration.nativeImpressionMinVisiblePixels + impressionMinVisiblePercent:configuration.nativeImpressionMinVisiblePercent + impressionMinVisibleSeconds:configuration.nativeImpressionMinVisibleTimeInterval]; } - + configuration.customEventClassData = classData; } @@ -178,7 +176,7 @@ break; } } - + if (customEventRendererConfig) { // Create a renderer from the config. self.customEventRenderer = [[customEventRendererConfig.rendererClass alloc] initWithRendererSettings:customEventRendererConfig.rendererSettings]; @@ -186,9 +184,9 @@ } else { MPLogError(@"Could not find renderer configuration for custom event class: %@", NSStringFromClass(configuration.customEventClass)); } - + if (self.nativeCustomEvent) { - [self.nativeCustomEvent requestAdWithCustomEventInfo:configuration.customEventClassData]; + [self.nativeCustomEvent requestAdWithCustomEventInfo:configuration.customEventClassData adMarkup:configuration.advancedBidPayload]; } else if ([[self.adConfiguration.failoverURL absoluteString] length]) { self.loading = NO; [self loadAdWithURL:self.adConfiguration.failoverURL]; @@ -202,7 +200,7 @@ self.loading = NO; adObject.renderer = self.customEventRenderer; - + if ([(id)adObject.adAdapter respondsToSelector:@selector(setAdConfiguration:)]) { [(id)adObject.adAdapter performSelector:@selector(setAdConfiguration:) withObject:self.adConfiguration]; } @@ -212,7 +210,7 @@ } else { MPLogError(@"Native ad failed to load with error: %@", error); } - + if (self.completionHandler) { self.completionHandler(self, adObject, error); self.completionHandler = nil; @@ -221,34 +219,34 @@ #pragma mark - -- (void)communicatorDidReceiveAdConfiguration:(MPAdConfiguration *)configuration +- (void)communicatorDidReceiveAdConfigurations:(NSArray *)configurations { - self.adConfiguration = configuration; + self.adConfiguration = configurations.firstObject; - if (configuration.adUnitWarmingUp) { + if (self.adConfiguration.adUnitWarmingUp) { MPLogInfo(kMPWarmingUpErrorLogFormatWithAdUnitID, self.adUnitIdentifier); [self completeAdRequestWithAdObject:nil error:MPNativeAdNSErrorForAdUnitWarmingUp()]; return; } - - if ([configuration.networkType isEqualToString:kAdTypeClear]) { + + if ([self.adConfiguration.networkType isEqualToString:kAdTypeClear]) { MPLogInfo(kMPClearErrorLogFormatWithAdUnitID, self.adUnitIdentifier); [self completeAdRequestWithAdObject:nil error:MPNativeAdNSErrorForNoInventory()]; return; } - + MPLogInfo(@"Received data from MoPub to construct native ad.\n"); - [self getAdWithConfiguration:configuration]; + [self getAdWithConfiguration:self.adConfiguration]; } - (void)communicatorDidFailWithError:(NSError *)error { MPLogDebug(@"Error: Couldn't retrieve an ad from MoPub. Message: %@", error); - + [self completeAdRequestWithAdObject:nil error:MPNativeAdNSErrorForNetworkConnectionError()]; } -#pragma mark - +#pragma mark - - (void)nativeCustomEvent:(MPNativeCustomEvent *)event didLoadAd:(MPNativeAd *)adObject { @@ -261,7 +259,7 @@ if (self.adConfiguration.impressionTrackingURL) { [adObject.impressionTrackerURLs addObject:self.adConfiguration.impressionTrackingURL]; } - + // Error if we don't have click trackers or impression trackers. if (adObject.clickTrackerURLs.count < 1 || adObject.impressionTrackerURLs.count < 1) { [self completeAdRequestWithAdObject:nil error:MPNativeAdNSErrorForInvalidAdServerResponse(@"Invalid ad trackers")]; diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdRequestTargeting.h b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdRequestTargeting.h similarity index 68% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdRequestTargeting.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdRequestTargeting.h index 5fb814a454..808f7a0c91 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdRequestTargeting.h +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdRequestTargeting.h @@ -26,7 +26,15 @@ /** @name Targeting Parameters */ /** - * A string representing a set of keywords that should be passed to the MoPub ad server to receive + * A string representing a set of non-personally identifiable keywords that should be passed to the MoPub ad server to receive more relevant advertising. + * + * Note: If a user is in General Data Protection Regulation (GDPR) region and MoPub doesn't obtain consent from the user, "keywords" will still be sent to the server. + */ + +@property (nonatomic, copy) NSString *keywords; + +/** + * A string representing a set of personally identifiable keywords that should be passed to the MoPub ad server to receive * more relevant advertising. * * Keywords are typically used to target ad campaigns at specific user segments. They should be @@ -34,8 +42,11 @@ * * On the MoPub website, keyword targeting options can be found under the "Advanced Targeting" * section when managing campaigns. + + * Note: If a user is in General Data Protection Regulation (GDPR) region and MoPub doesn't obtain consent from the user, "userDataKeywords" will not be sent to the server. */ -@property (nonatomic, copy) NSString *keywords; +@property (nonatomic, copy) NSString *userDataKeywords; + /** * A `CLLocation` object representing a user's location that should be passed to the MoPub ad server diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdRequestTargeting.m b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdRequestTargeting.m similarity index 99% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdRequestTargeting.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdRequestTargeting.m index fea34ceecb..062d7528be 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdRequestTargeting.m +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdRequestTargeting.m @@ -18,7 +18,7 @@ - (void)setDesiredAssets:(NSSet *)desiredAssets { if (_desiredAssets != desiredAssets) { - + NSMutableSet *allowedAdAssets = [NSMutableSet setWithObjects:kAdTitleKey, kAdTextKey, kAdIconImageKey, diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdSource.h b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdSource.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdSource.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdSource.h diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdSource.m b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdSource.m similarity index 94% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdSource.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdSource.m index 1c0a61b5dd..406a0bd9fe 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdSource.m +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdSource.m @@ -9,8 +9,9 @@ #import "MPNativeAd.h" #import "MPNativeAdRequestTargeting.h" #import "MPNativeAdSourceQueue.h" +#import "MPConstants.h" -static NSTimeInterval const kCacheTimeoutInterval = 900; //15 minutes +static NSTimeInterval const kCacheTimeoutInterval = MOPUB_ADS_EXPIRATION_INTERVAL; @interface MPNativeAdSource () @@ -33,7 +34,7 @@ static NSTimeInterval const kCacheTimeoutInterval = 900; //15 minutes if (self) { _adQueueDictionary = [[NSMutableDictionary alloc] init]; } - + return self; } @@ -49,11 +50,11 @@ static NSTimeInterval const kCacheTimeoutInterval = 900; //15 minutes - (void)loadAdsWithAdUnitIdentifier:(NSString *)identifier rendererConfigurations:(NSArray *)rendererConfigurations andTargeting:(MPNativeAdRequestTargeting *)targeting { [self deleteCacheForAdUnitIdentifier:identifier]; - + MPNativeAdSourceQueue *adQueue = [[MPNativeAdSourceQueue alloc] initWithAdUnitIdentifier:identifier rendererConfigurations:rendererConfigurations andTargeting:targeting]; adQueue.delegate = self; [self.adQueueDictionary setObject:adQueue forKey:identifier]; - + [adQueue loadAds]; } @@ -69,7 +70,7 @@ static NSTimeInterval const kCacheTimeoutInterval = 900; //15 minutes MPNativeAdSourceQueue *sourceQueue = [self.adQueueDictionary objectForKey:identifier]; sourceQueue.delegate = nil; [sourceQueue cancelRequests]; - + [self.adQueueDictionary removeObjectForKey:identifier]; } diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdSourceDelegate.h b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdSourceDelegate.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeAdSourceDelegate.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeAdSourceDelegate.h diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeCustomEvent.h b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeCustomEvent.h similarity index 80% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeCustomEvent.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeCustomEvent.h index 447295df90..000b6e1885 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeCustomEvent.h +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeCustomEvent.h @@ -12,11 +12,11 @@ * delegate. * * `MPNativeCustomEvent` is a base class for custom events that support native ads. By implementing - * subclasses of `MPNativeCustomEvent` you can enable the MoPub SDK to support a variety of + * subclasses of `MPNativeCustomEvent` you can enable the MoPub SDK to support a variety of * third-party ad networks. * * Your implementation should create an `MPNativeAd` object using an appropriate `MPNativeAdAdapter` - * for your network. Your custom event should also call the appropriate + * for your network. Your custom event should also call the appropriate * `MPNativeCustomEventDelegate` methods. * * At runtime, the MoPub SDK will find and instantiate an `MPNativeCustomEvent` subclass as needed @@ -26,6 +26,19 @@ /** @name Requesting a Native Ad */ +/** + * Called when the MoPub SDK requires a new native ad. + * + * When the MoPub SDK receives a response indicating it should load a custom event, it will send + * this message to your custom event class. Your implementation should load a native ad from a + * third-party ad network. + * + * @param info A dictionary containing additional custom data associated with a given custom event + * request. This data is configurable on the MoPub website, and may be used to pass dynamic + * information, such as publisher IDs. + */ +- (void)requestAdWithCustomEventInfo:(NSDictionary *)info; + /** * Called when the MoPub SDK requires a new native ad. * @@ -36,14 +49,15 @@ * @param info A dictionary containing additional custom data associated with a given custom event * request. This data is configurable on the MoPub website, and may be used to pass dynamic * information, such as publisher IDs. + * @param adMarkup An optional ad markup to use. */ -- (void)requestAdWithCustomEventInfo:(NSDictionary *)info; +- (void)requestAdWithCustomEventInfo:(NSDictionary *)info adMarkup:(NSString *)adMarkup; /** @name Caching Image Resources */ /** * Downloads and pre-caches images. - * + * * If your ad network does not provide built-in support for image caching, you may invoke this * method in your custom event implementation to pre-cache image assets. If you do call this method, * you should wait until the completion block is called before invoking the appropriate diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeCustomEvent.m b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeCustomEvent.m similarity index 76% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeCustomEvent.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeCustomEvent.m index aa7e11605f..5fea3b20b1 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeCustomEvent.m +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeCustomEvent.m @@ -22,7 +22,7 @@ if (self) { _imageDownloadQueue = [[MPImageDownloadQueue alloc] init]; } - + return self; } @@ -46,4 +46,11 @@ /*override with custom network behavior*/ } +- (void)requestAdWithCustomEventInfo:(NSDictionary *)info adMarkup:(NSString *)adMarkup +{ + // By default, the original requestAdWithCustomEventInfo: method will be called. + // Otherwise subclasses must override this method and implement code to load a banner here. + [self requestAdWithCustomEventInfo:info]; +} + @end diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeCustomEventDelegate.h b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeCustomEventDelegate.h similarity index 94% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeCustomEventDelegate.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeCustomEventDelegate.h index ff0b0f39a2..fbd6a069a5 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/MPNativeCustomEventDelegate.h +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/MPNativeCustomEventDelegate.h @@ -9,7 +9,7 @@ @class MPNativeCustomEvent; /** - * Instances of your custom subclass of `MPNativeCustomEvent` will have an + * Instances of your custom subclass of `MPNativeCustomEvent` will have an * `MPNativeCustomEventDelegate` delegate object. You use this delegate to communicate progress * (such as whether an ad has loaded successfully) back to the MoPub SDK. */ @@ -18,7 +18,7 @@ /** * This method is called when the ad and all required ad assets are loaded. * - * @param event You should pass `self` to allow the MoPub SDK to associate this event with the + * @param event You should pass `self` to allow the MoPub SDK to associate this event with the * correct instance of your custom event. * @param adObject An `MPNativeAd` object, representing the ad that was retrieved. */ @@ -27,7 +27,7 @@ /** * This method is called when the ad or any required ad assets fail to load. * - * @param event You should pass `self` to allow the MoPub SDK to associate this event with the + * @param event You should pass `self` to allow the MoPub SDK to associate this event with the * correct instance of your custom event. * @param error (*optional*) You may pass an error describing the failure. */ diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPServerAdPositioning.h b/iphone/Maps/3party/MoPubSDK/NativeAds/MPServerAdPositioning.h similarity index 99% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPServerAdPositioning.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPServerAdPositioning.h index c2952f2df7..2166f9012f 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/MPServerAdPositioning.h +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/MPServerAdPositioning.h @@ -24,13 +24,13 @@ /** * Creates and returns a server positioning object. - * + * * When an ad placer is set to use server positioning, it will ask the MoPub ad server for the * positions where ads should be inserted into a given stream. These positioning values are * configurable on the MoPub website. * * @return The newly created positioning object. - * + * * @see MPClientAdPositioning */ + (instancetype)positioning; diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPServerAdPositioning.m b/iphone/Maps/3party/MoPubSDK/NativeAds/MPServerAdPositioning.m similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPServerAdPositioning.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPServerAdPositioning.m diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPStaticNativeAdRenderer.h b/iphone/Maps/3party/MoPubSDK/NativeAds/MPStaticNativeAdRenderer.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPStaticNativeAdRenderer.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPStaticNativeAdRenderer.h diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPStaticNativeAdRenderer.m b/iphone/Maps/3party/MoPubSDK/NativeAds/MPStaticNativeAdRenderer.m similarity index 98% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPStaticNativeAdRenderer.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPStaticNativeAdRenderer.m index 024349aa5a..3b50c09c18 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/MPStaticNativeAdRenderer.m +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/MPStaticNativeAdRenderer.m @@ -46,7 +46,7 @@ const CGFloat MPNativeViewDynamicDimension = -1.0; MPNativeAdRendererConfiguration *config = [[MPNativeAdRendererConfiguration alloc] init]; config.rendererClass = [self class]; config.rendererSettings = rendererSettings; - config.supportedCustomEvents = @[@"MPMoPubNativeCustomEvent", @"FacebookNativeCustomEvent", @"FlurryNativeCustomEvent", @"InMobiNativeCustomEvent", @"MillennialNativeCustomEvent", @"MPGoogleAdMobNativeCustomEvent"]; + config.supportedCustomEvents = @[@"MPMoPubNativeCustomEvent", @"FacebookNativeCustomEvent", @"MillennialNativeCustomEvent"]; return config; } diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPStaticNativeAdRendererSettings.h b/iphone/Maps/3party/MoPubSDK/NativeAds/MPStaticNativeAdRendererSettings.h similarity index 87% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPStaticNativeAdRendererSettings.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPStaticNativeAdRendererSettings.h index 3ddc074ddb..54da0f199d 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/MPStaticNativeAdRendererSettings.h +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/MPStaticNativeAdRendererSettings.h @@ -12,15 +12,15 @@ @interface MPStaticNativeAdRendererSettings : NSObject /** - * A rendering class that must be a UIView that implements the MPNativeAdRendering protocol. + * A rendering class that must be a UIView that implements the MPNativeAdRendering protocol. * The ad will be rendered to a view of this class type. */ @property (nonatomic, assign) Class renderingViewClass; /** - * A block that returns the size of the view given a maximum width. This needs to be set when - * used in conjunction with ad placer classes so the ad placers can correctly size the cells - * that contain the ads. + * A block that returns the size of the view given a maximum width. This needs to be set when + * used in conjunction with ad placer classes so the ad placers can correctly size the cells + * that contain the ads. * * viewSizeHandler is not used for manual native ad integration. You must set the * frame of your manually integrated native ad view. diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPStaticNativeAdRendererSettings.m b/iphone/Maps/3party/MoPubSDK/NativeAds/MPStaticNativeAdRendererSettings.m similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPStaticNativeAdRendererSettings.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPStaticNativeAdRendererSettings.m diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPStreamAdPlacementData.h b/iphone/Maps/3party/MoPubSDK/NativeAds/MPStreamAdPlacementData.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPStreamAdPlacementData.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPStreamAdPlacementData.h diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPStreamAdPlacementData.m b/iphone/Maps/3party/MoPubSDK/NativeAds/MPStreamAdPlacementData.m similarity index 99% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPStreamAdPlacementData.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPStreamAdPlacementData.m index b16b42cb01..abc9c7ae6a 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/MPStreamAdPlacementData.m +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/MPStreamAdPlacementData.m @@ -55,16 +55,16 @@ static const NSUInteger kMaximumNumberOfAdsPerStream = 255; - (void)initializeDesiredPositionsFromPositioning:(MPAdPositioning *)positioning { NSArray *fixedPositions = [[positioning.fixedPositions array] sortedArrayUsingSelector:@selector(compare:)]; - + self.desiredOriginalPositions = [NSMutableDictionary dictionary]; self.desiredInsertionPositions = [NSMutableDictionary dictionary]; - + [fixedPositions enumerateObjectsUsingBlock:^(NSIndexPath *position, NSUInteger idx, BOOL *stop) { [self insertDesiredPositionsForIndexPath:position]; }]; - + //Current behavior only inserts repeating ads following the last fixed position in the table, and they will only be inserted - //within the same section as that position. If no fixed positions exist, repeating ads will be placed only in the first section. + //within the same section as that position. If no fixed positions exist, repeating ads will be placed only in the first section. if (positioning.repeatingInterval > 1) { NSInteger lastInsertionSection = [[fixedPositions lastObject] section]; @@ -72,7 +72,7 @@ static const NSUInteger kMaximumNumberOfAdsPerStream = 255; NSUInteger numberOfFixedAds = [desiredOriginalPositions count]; NSUInteger numberOfRepeatingAds = kMaximumNumberOfAdsPerStream - numberOfFixedAds; - + NSInteger startingIndex = [fixedPositions lastObject] ? [(NSIndexPath *)[fixedPositions lastObject] row] : -1; for (NSUInteger repeatingAdIndex = 1; repeatingAdIndex <= numberOfRepeatingAds; repeatingAdIndex++) { NSInteger adIndexItem = startingIndex + positioning.repeatingInterval * repeatingAdIndex; @@ -87,7 +87,7 @@ static const NSUInteger kMaximumNumberOfAdsPerStream = 255; NSMutableArray *desiredOriginalPositions = [self positioningArrayForSection:indexPath.section inDictionary:self.desiredOriginalPositions]; NSIndexPath *insertionIndexPath = [NSIndexPath indexPathForRow:indexPath.row - [desiredOriginalPositions count] inSection:indexPath.section]; [desiredOriginalPositions addObject:[insertionIndexPath copy]]; - + NSMutableArray *desiredInsertionPositions = [self positioningArrayForSection:indexPath.section inDictionary:self.desiredInsertionPositions]; [desiredInsertionPositions addObject:[insertionIndexPath copy]]; } @@ -95,11 +95,11 @@ static const NSUInteger kMaximumNumberOfAdsPerStream = 255; - (NSUInteger)adjustedNumberOfItems:(NSUInteger)numberOfItems inSection:(NSUInteger)section { if (numberOfItems <= 0) return 0; - + NSIndexPath *pathOfLastItem = [NSIndexPath indexPathForRow:numberOfItems - 1 inSection:section]; NSMutableArray *originalAdIndexPaths = [self positioningArrayForSection:section inDictionary:self.originalAdIndexPaths]; NSUInteger numberOfAdsBeforeLastItem = [self indexOfIndexPath:pathOfLastItem inSortedArray:originalAdIndexPaths options:NSBinarySearchingInsertionIndex | NSBinarySearchingLastEqual]; - + return numberOfItems + numberOfAdsBeforeLastItem; } @@ -108,10 +108,10 @@ static const NSUInteger kMaximumNumberOfAdsPerStream = 255; if (!indexPath || indexPath.row == NSNotFound) { return indexPath; } - + NSMutableArray *originalAdIndexPaths = [self positioningArrayForSection:indexPath.section inDictionary:self.originalAdIndexPaths]; NSUInteger numberOfAdsBeforeIndexPath = [self indexOfIndexPath:indexPath inSortedArray:originalAdIndexPaths options:NSBinarySearchingInsertionIndex | NSBinarySearchingLastEqual]; - + return [NSIndexPath indexPathForRow:indexPath.row + numberOfAdsBeforeIndexPath inSection:indexPath.section]; } @@ -133,11 +133,11 @@ static const NSUInteger kMaximumNumberOfAdsPerStream = 255; if (adjustedIndexPath.section > [self largestSectionIndexContainingAds]) { return nil; } - + NSMutableArray *desiredInsertionPositions = [self.desiredInsertionPositions objectForKey:[NSNumber numberWithUnsignedInteger:adjustedIndexPath.section]]; NSUInteger index = [self indexOfIndexPath:adjustedIndexPath inSortedArray:desiredInsertionPositions options:NSBinarySearchingInsertionIndex | NSBinarySearchingFirstEqual]; - + if (desiredInsertionPositions && (index < [desiredInsertionPositions count])) { return [desiredInsertionPositions objectAtIndex:index]; } else { @@ -150,7 +150,7 @@ static const NSUInteger kMaximumNumberOfAdsPerStream = 255; { NSMutableArray *desiredInsertionPositions = [self positioningArrayForSection:adjustedIndexPath.section inDictionary:self.desiredInsertionPositions]; NSUInteger index = [self indexOfIndexPath:adjustedIndexPath inSortedArray:desiredInsertionPositions options:NSBinarySearchingInsertionIndex | NSBinarySearchingFirstEqual]; - + if (index > 0) { return desiredInsertionPositions[index - 1]; } else { @@ -167,29 +167,29 @@ static const NSUInteger kMaximumNumberOfAdsPerStream = 255; NSMutableArray *adDataObjects = [self positioningArrayForSection:adjustedIndexPath.section inDictionary:self.adDataObjects]; NSUInteger indexInDesiredArrays = [self indexOfIndexPath:adjustedIndexPath inSortedArray:desiredInsertionPositions options:NSBinarySearchingFirstEqual]; - + if (indexInDesiredArrays == NSNotFound) { MPLogWarn(@"Attempted to insert an ad at position %@, which is not in the desired array.", adjustedIndexPath); return; } - + NSIndexPath *originalPosition = desiredOriginalPositions[indexInDesiredArrays]; NSIndexPath *insertionPosition = desiredInsertionPositions[indexInDesiredArrays]; - + NSUInteger insertionIndex = [self indexOfIndexPath:insertionPosition inSortedArray:adjustedAdIndexPaths options:NSBinarySearchingInsertionIndex | NSBinarySearchingFirstEqual]; - + [originalAdIndexPaths insertObject:originalPosition atIndex:insertionIndex]; [adjustedAdIndexPaths insertObject:insertionPosition atIndex:insertionIndex]; [adDataObjects insertObject:data atIndex:insertionIndex]; - + [desiredOriginalPositions removeObjectAtIndex:indexInDesiredArrays]; [desiredInsertionPositions removeObjectAtIndex:indexInDesiredArrays]; - + for (NSUInteger i = insertionIndex + 1; i < [adjustedAdIndexPaths count]; i++) { NSIndexPath *newIndexPath = adjustedAdIndexPaths[i]; adjustedAdIndexPaths[i] = [NSIndexPath indexPathForRow:newIndexPath.row + 1 inSection:newIndexPath.section]; } - + for (NSUInteger j = indexInDesiredArrays; j < [desiredInsertionPositions count]; j++) { NSIndexPath *newInsertionPosition = desiredInsertionPositions[j]; desiredInsertionPositions[j] = [NSIndexPath indexPathForRow:newInsertionPosition.row + 1 inSection:newInsertionPosition.section]; @@ -199,11 +199,11 @@ static const NSUInteger kMaximumNumberOfAdsPerStream = 255; - (NSArray *)adjustedAdIndexPathsInAdjustedRange:(NSRange)range inSection:(NSInteger)section { NSMutableArray *adjustedIndexPaths = [self positioningArrayForSection:section inDictionary:self.adjustedAdIndexPaths]; - + NSIndexSet *indexesOfObjectsInRange = [adjustedIndexPaths indexesOfObjectsPassingTest:^BOOL(NSIndexPath *adjustedIndexPath, NSUInteger idx, BOOL *stop) { return NSLocationInRange(adjustedIndexPath.row, range); }]; - + return [adjustedIndexPaths objectsAtIndexes:indexesOfObjectsInRange]; } @@ -214,11 +214,11 @@ static const NSUInteger kMaximumNumberOfAdsPerStream = 255; NSMutableArray *adDataObjects = [self positioningArrayForSection:section inDictionary:self.adDataObjects]; NSMutableArray *desiredInsertionPositions = [self positioningArrayForSection:section inDictionary:self.desiredInsertionPositions]; NSMutableArray *desiredOriginalPositions = [self positioningArrayForSection:section inDictionary:self.desiredOriginalPositions]; - + NSIndexSet *indexesOfObjectsToRemove = [adjustedAdIndexPaths indexesOfObjectsPassingTest:^BOOL(NSIndexPath *adjustedIndexPath, NSUInteger idx, BOOL *stop) { return NSLocationInRange(adjustedIndexPath.row, range); }]; - + if ([indexesOfObjectsToRemove count]) { [indexesOfObjectsToRemove enumerateIndexesWithOptions:NSEnumerationReverse usingBlock:^(NSUInteger idx, BOOL *stop) { NSIndexPath *adjustedIndexPathToRemove = adjustedAdIndexPaths[idx]; @@ -232,7 +232,7 @@ static const NSUInteger kMaximumNumberOfAdsPerStream = 255; [desiredInsertionPositions insertObject:adjustedIndexPathToRemove atIndex:insertionIndex]; }]; - + [adjustedAdIndexPaths removeObjectsAtIndexes:indexesOfObjectsToRemove]; [originalAdIndexPaths removeObjectsAtIndexes:indexesOfObjectsToRemove]; [adDataObjects removeObjectsAtIndexes:indexesOfObjectsToRemove]; @@ -256,9 +256,9 @@ static const NSUInteger kMaximumNumberOfAdsPerStream = 255; { NSMutableArray *adjustedAdIndexPaths = [self positioningArrayForSection:adjustedIndexPath.section inDictionary:self.adjustedAdIndexPaths]; NSMutableArray *adDataObjects = [self positioningArrayForSection:adjustedIndexPath.section inDictionary:self.adDataObjects]; - + NSUInteger indexOfIndexPath = [self indexOfIndexPath:adjustedIndexPath inSortedArray:adjustedAdIndexPaths options:NSBinarySearchingFirstEqual]; - + if (indexOfIndexPath != NSNotFound) { return adDataObjects[indexOfIndexPath]; } else { @@ -326,7 +326,7 @@ static const NSUInteger kMaximumNumberOfAdsPerStream = 255; - (void)insertItemsAtIndexPaths:(NSArray *)originalIndexPaths { originalIndexPaths = [originalIndexPaths sortedArrayUsingSelector:@selector(compare:)]; - + [originalIndexPaths enumerateObjectsUsingBlock:^(NSIndexPath *originalIndexPath, NSUInteger idx, BOOL *stop) { NSMutableArray *desiredOriginalPositions = [self positioningArrayForSection:originalIndexPath.section inDictionary:self.desiredOriginalPositions]; NSMutableArray *originalAdIndexPaths = [self positioningArrayForSection:originalIndexPath.section inDictionary:self.originalAdIndexPaths]; @@ -335,7 +335,7 @@ static const NSUInteger kMaximumNumberOfAdsPerStream = 255; for (NSUInteger i = insertionIndex; i < [desiredOriginalPositions count]; i++) { [self incrementDesiredIndexPathsAtIndex:i inSection:originalIndexPath.section]; } - + NSUInteger originalInsertionIndex = [self indexOfIndexPath:originalIndexPath inSortedArray:originalAdIndexPaths options:NSBinarySearchingInsertionIndex | NSBinarySearchingFirstEqual]; for (NSUInteger i = originalInsertionIndex; i < [originalAdIndexPaths count]; i++) { [self incrementPlacedIndexPathsAtIndex:i inSection:originalIndexPath.section]; @@ -346,10 +346,10 @@ static const NSUInteger kMaximumNumberOfAdsPerStream = 255; - (void)deleteItemsAtIndexPaths:(NSArray *)originalIndexPaths { originalIndexPaths = [originalIndexPaths sortedArrayUsingSelector:@selector(compare:)]; - + __block NSUInteger currentNumberOfAdsInSection = 0; __block NSInteger lastSection = [[originalIndexPaths firstObject] section]; - + [originalIndexPaths enumerateObjectsUsingBlock:^(NSIndexPath *originalIndexPath, NSUInteger idx, BOOL *stop) { // Batch deletions are actually performed one at a time. This requires us to shift up the // deletion index paths each time a deletion is performed. @@ -361,22 +361,22 @@ static const NSUInteger kMaximumNumberOfAdsPerStream = 255; lastSection = originalIndexPath.section; currentNumberOfAdsInSection = 0; } - + NSMutableArray *desiredOriginalPositions = [self positioningArrayForSection:originalIndexPath.section inDictionary:self.desiredOriginalPositions]; NSMutableArray *originalAdIndexPaths = [self positioningArrayForSection:originalIndexPath.section inDictionary:self.originalAdIndexPaths]; NSIndexPath *indexPathOfItemToDelete = [NSIndexPath indexPathForRow:originalIndexPath.row - currentNumberOfAdsInSection inSection:originalIndexPath.section]; - + NSUInteger searchIndexInDesired = [self indexOfIndexPath:indexPathOfItemToDelete inSortedArray:desiredOriginalPositions options:NSBinarySearchingInsertionIndex | NSBinarySearchingLastEqual]; for (NSUInteger i = searchIndexInDesired; i < [desiredOriginalPositions count]; i++) { [self decrementDesiredIndexPathsAtIndex:i inSection:originalIndexPath.section]; } - + NSUInteger searchIndexInPlaced = [self indexOfIndexPath:indexPathOfItemToDelete inSortedArray:originalAdIndexPaths options:NSBinarySearchingInsertionIndex | NSBinarySearchingLastEqual]; for (NSUInteger i = searchIndexInPlaced; i < [originalAdIndexPaths count]; i++) { [self decrementPlacedIndexPathsAtIndex:i inSection:originalIndexPath.section]; } - + currentNumberOfAdsInSection++; }]; } @@ -407,7 +407,7 @@ static const NSUInteger kMaximumNumberOfAdsPerStream = 255; NSIndexPath *currentDesiredOriginalPosition = desiredOriginalPositions[index]; NSIndexPath *newDesiredOriginalPosition = [NSIndexPath indexPathForRow:currentDesiredOriginalPosition.row + 1 inSection:currentDesiredOriginalPosition.section]; desiredOriginalPositions[index] = newDesiredOriginalPosition; - + NSIndexPath *currentDesiredInsertionPosition = desiredInsertionPositions[index]; NSIndexPath *newDesiredInsertionPosition = [NSIndexPath indexPathForRow:currentDesiredInsertionPosition.row + 1 inSection:currentDesiredInsertionPosition.section]; desiredInsertionPositions[index] = newDesiredInsertionPosition; @@ -421,7 +421,7 @@ static const NSUInteger kMaximumNumberOfAdsPerStream = 255; NSIndexPath *currentOriginalIndexPath = originalAdIndexPaths[index]; NSIndexPath *newOriginalIndexPath = [NSIndexPath indexPathForRow:currentOriginalIndexPath.row + 1 inSection:currentOriginalIndexPath.section]; originalAdIndexPaths[index] = newOriginalIndexPath; - + NSIndexPath *currentAdjustedIndexPath = adjustedAdIndexPaths[index]; NSIndexPath *newAdjustedIndexPath = [NSIndexPath indexPathForRow:currentAdjustedIndexPath.row + 1 inSection:currentAdjustedIndexPath.section]; adjustedAdIndexPaths[index] = newAdjustedIndexPath; @@ -435,7 +435,7 @@ static const NSUInteger kMaximumNumberOfAdsPerStream = 255; NSIndexPath *currentDesiredOriginalPosition = desiredOriginalPositions[index]; NSIndexPath *newDesiredOriginalPosition = [NSIndexPath indexPathForRow:currentDesiredOriginalPosition.row - 1 inSection:currentDesiredOriginalPosition.section]; desiredOriginalPositions[index] = newDesiredOriginalPosition; - + NSIndexPath *currentDesiredInsertionPosition = desiredInsertionPositions[index]; NSIndexPath *newDesiredInsertionPosition = [NSIndexPath indexPathForRow:currentDesiredInsertionPosition.row - 1 inSection:currentDesiredInsertionPosition.section]; desiredInsertionPositions[index] = newDesiredInsertionPosition; @@ -449,7 +449,7 @@ static const NSUInteger kMaximumNumberOfAdsPerStream = 255; NSIndexPath *currentOriginalIndexPath = originalAdIndexPaths[index]; NSIndexPath *newOriginalIndexPath = [NSIndexPath indexPathForRow:currentOriginalIndexPath.row - 1 inSection:currentOriginalIndexPath.section]; originalAdIndexPaths[index] = newOriginalIndexPath; - + NSIndexPath *currentAdjustedIndexPath = adjustedAdIndexPaths[index]; NSIndexPath *newAdjustedIndexPath = [NSIndexPath indexPathForRow:currentAdjustedIndexPath.row - 1 inSection:currentAdjustedIndexPath.section]; adjustedAdIndexPaths[index] = newAdjustedIndexPath; diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPStreamAdPlacer.h b/iphone/Maps/3party/MoPubSDK/NativeAds/MPStreamAdPlacer.h similarity index 99% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPStreamAdPlacer.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPStreamAdPlacer.h index e5f0ce823d..d97345cfdd 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/MPStreamAdPlacer.h +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/MPStreamAdPlacer.h @@ -24,7 +24,7 @@ * should first consider whether the `UITableViewAdPlacer` or `UICollectionViewAdPlacer` classes are * sufficient for your use case before choosing to use this class. * - * @discussion Your app's first responsibility when creating a stream ad placer is to communicate + * @discussion Your app's first responsibility when creating a stream ad placer is to communicate * the state of your stream. Specifically, you must provide it with the count of the * original content items in your stream using -setItemCount:forSection:, so that it can determine * where and how many ads should appear. Additionally, you must also make sure to notify the ad @@ -149,7 +149,7 @@ * If the specified index path does not identify a content item, but rather an ad, this method * will return nil. * - * @param indexPath An index path object identifying an item in the stream, after ads have been + * @param indexPath An index path object identifying an item in the stream, after ads have been * inserted. */ - (NSIndexPath *)originalIndexPathForAdjustedIndexPath:(NSIndexPath *)indexPath; @@ -170,7 +170,7 @@ * If a specified index path does not identify a content item, but rather an ad, it will not be * included in the result. * - * @param indexPaths An array of index path objects each identifying an item in the stream, after + * @param indexPaths An array of index path objects each identifying an item in the stream, after * ads have been inserted. */ - (NSArray *)originalIndexPathsForAdjustedIndexPaths:(NSArray *)indexPaths; diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPStreamAdPlacer.m b/iphone/Maps/3party/MoPubSDK/NativeAds/MPStreamAdPlacer.m similarity index 99% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPStreamAdPlacer.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPStreamAdPlacer.m index d68786fbb4..b01e5ed14b 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/MPStreamAdPlacer.m +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/MPStreamAdPlacer.m @@ -156,17 +156,17 @@ static const NSUInteger kIndexPathItemIndex = 1; } else if ([self.adPositioning isKindOfClass:[MPServerAdPositioning class]]) { // Reset to a placement data that has no "desired" ads at all. self.adPlacementData = [[MPInstanceProvider sharedProvider] buildStreamAdPlacementDataWithPositioning:nil]; - + // Get positioning information from the server. self.positioningSource = [[MPInstanceProvider sharedProvider] buildNativePositioningSource]; - __typeof__(self) __weak weakSelf = self; + __weak __typeof__(self) weakSelf = self; [self.positioningSource loadPositionsWithAdUnitIdentifier:self.adUnitID completionHandler:^(MPAdPositioning *positioning, NSError *error) { __typeof__(self) strongSelf = weakSelf; - + if (!strongSelf) { return; } - + if (error) { if ([error code] == MPNativePositionSourceEmptyResponse) { MPLogError(@"ERROR: Ad placer cannot show any ads because ad positions have " @@ -191,7 +191,7 @@ static const NSUInteger kIndexPathItemIndex = 1; MPLogError(@"Ad placer cannot load ads with a nil ad unit ID."); return; } - + [self.adSource loadAdsWithAdUnitIdentifier:adUnitID rendererConfigurations:self.rendererConfigurations andTargeting:targeting]; } @@ -252,24 +252,24 @@ static const NSUInteger kIndexPathItemIndex = 1; [originalIndexPaths enumerateObjectsUsingBlock:^(NSIndexPath *indexPath, NSUInteger idx, BOOL *stop) { [activeSections addObject:[NSNumber numberWithInteger:indexPath.section]]; }]; - + NSMutableArray *removedIndexPaths = [NSMutableArray array]; [activeSections enumerateObjectsUsingBlock:^(NSNumber *section, BOOL *stop) { NSArray *originalIndexPathsInSection = [originalIndexPaths filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"section = %@", section]]; NSRange deleteRange = [self rangeToDeleteInSection:section forOriginalContentIndexPaths:originalIndexPathsInSection]; - + NSArray *indexPathsToDelete = [self.adPlacementData adjustedAdIndexPathsInAdjustedRange:deleteRange inSection:[section integerValue]]; [removedIndexPaths addObjectsFromArray:indexPathsToDelete]; [self.adPlacementData clearAdsInAdjustedRange:deleteRange inSection:[section integerValue]]; }]; - + [self.adPlacementData deleteItemsAtIndexPaths:originalIndexPaths]; - + [originalIndexPaths enumerateObjectsUsingBlock:^(NSIndexPath *originalIndexPath, NSUInteger idx, BOOL *stop) { NSInteger section = originalIndexPath.section; [self setItemCount:[[self.sectionCounts objectForKey:@(section)] integerValue] - 1 forSection:section]; }]; - + if ([removedIndexPaths count]) { [self.delegate adPlacer:self didRemoveAdsAtIndexPaths:removedIndexPaths]; } @@ -453,7 +453,7 @@ static const NSUInteger kIndexPathItemIndex = 1; } } } - + NSUInteger indices[] = {section, itemIndex}; return [NSIndexPath indexPathWithIndexes:indices length:2]; } @@ -482,15 +482,15 @@ static const NSUInteger kIndexPathItemIndex = 1; - (MPNativeAdData *)retrieveAdDataForInsertionPath:(NSIndexPath *)insertionPath { MPNativeAd *adObject = [self.adSource dequeueAdForAdUnitIdentifier:self.adUnitID]; - + if (!adObject) { return nil; } - + MPNativeAdData *adData = [[MPNativeAdData alloc] init]; adData.adUnitID = self.adUnitID; adData.ad = adObject; - + return adData; } @@ -502,18 +502,18 @@ static const NSUInteger kIndexPathItemIndex = 1; NSIndexPath *topAdjustedIndexPath = [self adjustedIndexPathForOriginalIndexPath:self.topConsideredIndexPath]; NSIndexPath *insertionPath = [self.adPlacementData nextAdInsertionIndexPathForAdjustedIndexPath:topAdjustedIndexPath]; - + while ([self shouldPlaceAdAtIndexPath:insertionPath]) { MPNativeAdData *adData = [self retrieveAdDataForInsertionPath:insertionPath]; adData.ad.delegate = self; - + if (!adData) { break; } - + [self.adPlacementData insertAdData:adData atIndexPath:insertionPath]; [self.delegate adPlacer:self didLoadAdAtIndexPath:insertionPath]; - + insertionPath = [self.adPlacementData nextAdInsertionIndexPathForAdjustedIndexPath:insertionPath]; } } diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPTableViewAdPlacer.h b/iphone/Maps/3party/MoPubSDK/NativeAds/MPTableViewAdPlacer.h similarity index 100% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPTableViewAdPlacer.h rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPTableViewAdPlacer.h diff --git a/iphone/Maps/3party/MoPubSDK/Native Ads/MPTableViewAdPlacer.m b/iphone/Maps/3party/MoPubSDK/NativeAds/MPTableViewAdPlacer.m similarity index 99% rename from iphone/Maps/3party/MoPubSDK/Native Ads/MPTableViewAdPlacer.m rename to iphone/Maps/3party/MoPubSDK/NativeAds/MPTableViewAdPlacer.m index e75183921c..97f36c9584 100644 --- a/iphone/Maps/3party/MoPubSDK/Native Ads/MPTableViewAdPlacer.m +++ b/iphone/Maps/3party/MoPubSDK/NativeAds/MPTableViewAdPlacer.m @@ -593,7 +593,10 @@ static char kAdPlacerKey; NSArray *indexPaths = [self mp_indexPathsForVisibleRows]; NSMutableArray *visibleCells = [NSMutableArray array]; for (NSIndexPath *indexPath in indexPaths) { - [visibleCells addObject:[self mp_cellForRowAtIndexPath:indexPath]]; + UITableViewCell * cell = [self mp_cellForRowAtIndexPath:indexPath]; + if (cell != nil) { + [visibleCells addObject:cell]; + } } return visibleCells; } else { @@ -808,13 +811,11 @@ static char kAdPlacerKey; } if (!indexPath || adjustedIndexPath) { -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= MP_IOS_6_0 if ([self respondsToSelector:@selector(dequeueReusableCellWithIdentifier:forIndexPath:)]) { return [self dequeueReusableCellWithIdentifier:identifier forIndexPath:adjustedIndexPath]; } else { return [self dequeueReusableCellWithIdentifier:identifier]; } -#endif } else { return nil; } diff --git a/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBFullscreenPlayerViewController.m b/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBFullscreenPlayerViewController.m index 500c111f25..40cfafd858 100644 --- a/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBFullscreenPlayerViewController.m +++ b/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBFullscreenPlayerViewController.m @@ -71,7 +71,7 @@ static CGFloat const kStallSpinnerSize = 35.0f; _playerView = self.playerController.playerView; _playerController.delegate = self; _dismissBlock = [dismissBlock copy]; - _displayAgent = [[MPCoreInstanceProvider sharedProvider] buildMPAdDestinationDisplayAgentWithDelegate:self]; + _displayAgent = [MPAdDestinationDisplayAgent agentWithDelegate:self]; } return self; } diff --git a/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBNativeVideoAdAdapter.m b/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBNativeVideoAdAdapter.m index 65f38f0fa9..82d614f3d1 100644 --- a/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBNativeVideoAdAdapter.m +++ b/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBNativeVideoAdAdapter.m @@ -9,12 +9,12 @@ #import "MPCoreInstanceProvider.h" #import "MPNativeAdConstants.h" #import "MPLogging.h" -#import "MPStaticNativeAdImpressionTimer.h" #import "MOPUBNativeVideoAdConfigValues.h" +#import "MPAdImpressionTimer.h" -@interface MOPUBNativeVideoAdAdapter() +@interface MOPUBNativeVideoAdAdapter() -@property (nonatomic) MPStaticNativeAdImpressionTimer *staticImpressionTimer; +@property (nonatomic) MPAdImpressionTimer *impressionTimer; @property (nonatomic, readonly) MPAdDestinationDisplayAgent *destinationDisplayAgent; @end @@ -75,9 +75,9 @@ // Add the DAA icon settings to our properties dictionary. [properties setObject:MPResourcePathForResource(kDAAIconImageName) forKey:kAdDAAIconImageKey]; - _destinationDisplayAgent = [[MPCoreInstanceProvider sharedProvider] buildMPAdDestinationDisplayAgentWithDelegate:self]; + _destinationDisplayAgent = [MPAdDestinationDisplayAgent agentWithDelegate:self]; - _staticImpressionTimer = nil; + _impressionTimer = nil; } return self; @@ -95,8 +95,8 @@ - (void)removeStaticImpressionTimer { - _staticImpressionTimer.delegate = nil; - _staticImpressionTimer = nil; + _impressionTimer.delegate = nil; + _impressionTimer = nil; } #pragma mark - @@ -105,14 +105,21 @@ { [self removeStaticImpressionTimer]; - // Set up a static impression timer that will fire the mopub impression if the video fails to play prior to meeting the video impression tracking requirements. - MOPUBNativeVideoAdConfigValues *nativeVideoAdConfig = [self.properties objectForKey:kNativeVideoAdConfigKey]; + // Set up an impression timer that will fire the mopub impression if the video fails to play prior to meeting the video impression tracking requirements. + MOPUBNativeVideoAdConfigValues *nativeVideoAdConfig = [self.properties objectForKey:kNativeAdConfigKey]; - // impressionMinVisiblePercent is an integer (a value of 50 means 50%) while the impression timer takes in a float (.50 means 50%) so we have to multiply it by .01f. - self.staticImpressionTimer = [[MPStaticNativeAdImpressionTimer alloc] initWithRequiredSecondsForImpression:nativeVideoAdConfig.impressionVisible requiredViewVisibilityPercentage:nativeVideoAdConfig.impressionMinVisiblePercent*0.01f]; - self.staticImpressionTimer.delegate = self; + // If we have a valid pixel value, use it to track the impression. If not, use percentage instead. + if (nativeVideoAdConfig.isImpressionMinVisiblePixelsValid) { + self.impressionTimer = [[MPAdImpressionTimer alloc] initWithRequiredSecondsForImpression:nativeVideoAdConfig.impressionMinVisibleSeconds + requiredViewVisibilityPixels:nativeVideoAdConfig.impressionMinVisiblePixels]; + } else { + // impressionMinVisiblePercent is an integer (a value of 50 means 50%) while the impression timer takes in a float (.50 means 50%) so we have to multiply it by .01f. + self.impressionTimer = [[MPAdImpressionTimer alloc] initWithRequiredSecondsForImpression:nativeVideoAdConfig.impressionMinVisibleSeconds + requiredViewVisibilityPercentage:nativeVideoAdConfig.impressionMinVisiblePercent * 0.01f]; + } + self.impressionTimer.delegate = self; - [self.staticImpressionTimer startTrackingView:view]; + [self.impressionTimer startTrackingView:view]; } - (void)displayContentForURL:(NSURL *)URL rootViewController:(UIViewController *)controller @@ -150,13 +157,13 @@ - (void)handleVideoHasProgressedToTime:(NSTimeInterval)playbackTime { // If the video makes progress, don't allow static impression tracking. - self.staticImpressionTimer.delegate = nil; - self.staticImpressionTimer = nil; + self.impressionTimer.delegate = nil; + self.impressionTimer = nil; } -#pragma mark - +#pragma mark - -- (void)trackImpression +- (void)adViewWillLogImpression:(UIView *)adView { // We'll fire a static impression if the video hasn't started playing by the time the static impression timer has met its requirements. [self.delegate nativeAdWillLogImpression:self]; diff --git a/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBNativeVideoAdConfigValues.h b/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBNativeVideoAdConfigValues.h index b50d6427a2..988615969f 100644 --- a/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBNativeVideoAdConfigValues.h +++ b/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBNativeVideoAdConfigValues.h @@ -5,22 +5,27 @@ // Copyright (c) 2015 MoPub. All rights reserved. // -#import +#import "MPNativeAdConfigValues.h" -@interface MOPUBNativeVideoAdConfigValues : NSObject +@interface MOPUBNativeVideoAdConfigValues : MPNativeAdConfigValues @property (nonatomic, readonly) NSInteger playVisiblePercent; @property (nonatomic, readonly) NSInteger pauseVisiblePercent; -@property (nonatomic, readonly) NSInteger impressionMinVisiblePercent; -@property (nonatomic, readonly) NSTimeInterval impressionVisible; @property (nonatomic, readonly) NSTimeInterval maxBufferingTime; @property (nonatomic, readonly) NSDictionary *trackers; - (instancetype)initWithPlayVisiblePercent:(NSInteger)playVisiblePercent pauseVisiblePercent:(NSInteger)pauseVisiblePercent + impressionMinVisiblePixels:(CGFloat)impressionMinVisiblePixels impressionMinVisiblePercent:(NSInteger)impressionMinVisiblePercent - impressionVisible:(NSTimeInterval)impressionVisible - maxBufferingTime:(NSTimeInterval)maxBufferingTime trackers:(NSDictionary *)trackers; -- (BOOL)isValid; + impressionMinVisibleSeconds:(NSTimeInterval)impressionMinVisibleSeconds + maxBufferingTime:(NSTimeInterval)maxBufferingTime + trackers:(NSDictionary *)trackers NS_DESIGNATED_INITIALIZER; + +@property (nonatomic, readonly) BOOL isValid; + +- (instancetype)initWithImpressionMinVisiblePixels:(CGFloat)impressionMinVisiblePixels + impressionMinVisiblePercent:(NSInteger)impressionMinVisiblePercent + impressionMinVisibleSeconds:(NSTimeInterval)impressionMinVisibleSeconds __attribute__((unavailable("initWithImpressionMinVisiblePixels:impressionMinVisiblePercent:impressionMinVisibleSeconds: not available"))); @end diff --git a/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBNativeVideoAdConfigValues.m b/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBNativeVideoAdConfigValues.m index 8b471f2510..68604c58c0 100644 --- a/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBNativeVideoAdConfigValues.m +++ b/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBNativeVideoAdConfigValues.m @@ -6,21 +6,24 @@ // #import "MOPUBNativeVideoAdConfigValues.h" +#import "MPNativeAdConfigValues+Internal.h" @implementation MOPUBNativeVideoAdConfigValues - (instancetype)initWithPlayVisiblePercent:(NSInteger)playVisiblePercent pauseVisiblePercent:(NSInteger)pauseVisiblePercent + impressionMinVisiblePixels:(CGFloat)impressionMinVisiblePixels impressionMinVisiblePercent:(NSInteger)impressionMinVisiblePercent - impressionVisible:(NSTimeInterval)impressionVisible - maxBufferingTime:(NSTimeInterval)maxBufferingTime trackers:(NSDictionary *)trackers + impressionMinVisibleSeconds:(NSTimeInterval)impressionMinVisibleSeconds + maxBufferingTime:(NSTimeInterval)maxBufferingTime + trackers:(NSDictionary *)trackers { - self = [super init]; + self = [super initWithImpressionMinVisiblePixels:impressionMinVisiblePixels + impressionMinVisiblePercent:impressionMinVisiblePercent + impressionMinVisibleSeconds:impressionMinVisibleSeconds]; if (self) { _playVisiblePercent = playVisiblePercent; _pauseVisiblePercent = pauseVisiblePercent; - _impressionMinVisiblePercent = impressionMinVisiblePercent; - _impressionVisible = impressionVisible; _maxBufferingTime = maxBufferingTime; _trackers = trackers; } @@ -29,21 +32,11 @@ - (BOOL)isValid { - return ([self isValidPercentage:self.playVisiblePercent] && + return ((self.isImpressionMinVisiblePixelsValid || self.isImpressionMinVisiblePercentValid) && // OR because we only need pixels or percent, not both + self.isImpressionMinVisibleSecondsValid && + [self isValidPercentage:self.playVisiblePercent] && [self isValidPercentage:self.pauseVisiblePercent] && - [self isValidPercentage:self.impressionMinVisiblePercent] && - [self isValidTimeInterval:self.impressionVisible] && [self isValidTimeInterval:self.maxBufferingTime]); } -- (BOOL)isValidPercentage:(NSInteger)percentage -{ - return (percentage >= 0 && percentage <= 100); -} - -- (BOOL)isValidTimeInterval:(NSTimeInterval)timeInterval -{ - return timeInterval > 0; -} - @end diff --git a/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBNativeVideoCustomEvent.m b/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBNativeVideoCustomEvent.m index 3d30aa8643..9537d8eeb8 100644 --- a/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBNativeVideoCustomEvent.m +++ b/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBNativeVideoCustomEvent.m @@ -22,7 +22,7 @@ - (void)handleSuccessfulVastParsing:(MPVASTResponse *)mpVastResponse info:(NSDictionary *)info { NSMutableDictionary *infoMutableCopy = [info mutableCopy]; - [infoMutableCopy setObject:[[MPVideoConfig alloc] initWithVASTResponse:mpVastResponse additionalTrackers:((MOPUBNativeVideoAdConfigValues *)info[kNativeVideoAdConfigKey]).trackers] forKey:kVideoConfigKey]; + [infoMutableCopy setObject:[[MPVideoConfig alloc] initWithVASTResponse:mpVastResponse additionalTrackers:((MOPUBNativeVideoAdConfigValues *)info[kNativeAdConfigKey]).trackers] forKey:kVideoConfigKey]; MOPUBNativeVideoAdAdapter *adAdapter = [[MOPUBNativeVideoAdAdapter alloc] initWithAdProperties:infoMutableCopy]; if (adAdapter.properties) { MPNativeAd *interfaceAd = [[MPNativeAd alloc] initWithAdAdapter:adAdapter]; @@ -53,7 +53,7 @@ - (void)requestAdWithCustomEventInfo:(NSDictionary *)info { - MOPUBNativeVideoAdConfigValues *nativeVideoAdConfigValues = [info objectForKey:kNativeVideoAdConfigKey]; + MOPUBNativeVideoAdConfigValues *nativeVideoAdConfigValues = [info objectForKey:kNativeAdConfigKey]; if (nativeVideoAdConfigValues && [nativeVideoAdConfigValues isValid]) { NSString *vastString = [info objectForKey:kVASTVideoKey]; if (vastString) { diff --git a/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBPlayerManager.h b/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBPlayerManager.h index ffb5122005..11b2e73e46 100644 --- a/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBPlayerManager.h +++ b/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBPlayerManager.h @@ -8,13 +8,12 @@ @class MOPUBPlayerViewController; @class MOPUBNativeVideoAdConfigValues; @class MPVideoConfig; -@class MPAdConfigurationLogEventProperties; @interface MOPUBPlayerManager : NSObject + (MOPUBPlayerManager *)sharedInstance; - (void)disposePlayerViewController; -- (MOPUBPlayerViewController *)playerViewControllerWithVideoConfig:(MPVideoConfig *)videoConfig nativeVideoAdConfig:(MOPUBNativeVideoAdConfigValues *)nativeVideoAdConfig logEventProperties:(MPAdConfigurationLogEventProperties *)logEventProperties; +- (MOPUBPlayerViewController *)playerViewControllerWithVideoConfig:(MPVideoConfig *)videoConfig nativeVideoAdConfig:(MOPUBNativeVideoAdConfigValues *)nativeVideoAdConfig; @end diff --git a/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBPlayerManager.m b/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBPlayerManager.m index 195a790075..28952118d5 100644 --- a/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBPlayerManager.m +++ b/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBPlayerManager.m @@ -33,14 +33,14 @@ self.currentPlayerViewController = nil; } -- (MOPUBPlayerViewController *)playerViewControllerWithVideoConfig:(MPVideoConfig *)videoConfig nativeVideoAdConfig:(MOPUBNativeVideoAdConfigValues *)nativeVideoAdConfig logEventProperties:(MPAdConfigurationLogEventProperties *)logEventProperties +- (MOPUBPlayerViewController *)playerViewControllerWithVideoConfig:(MPVideoConfig *)videoConfig nativeVideoAdConfig:(MOPUBNativeVideoAdConfigValues *)nativeVideoAdConfig { // make sure only one instance of avPlayer at a time if (self.currentPlayerViewController) { [self disposePlayerViewController]; } - self.currentPlayerViewController = [[MOPUBPlayerViewController alloc] initWithVideoConfig:videoConfig nativeVideoAdConfig:nativeVideoAdConfig logEventProperties:logEventProperties]; + self.currentPlayerViewController = [[MOPUBPlayerViewController alloc] initWithVideoConfig:videoConfig nativeVideoAdConfig:nativeVideoAdConfig]; return self.currentPlayerViewController; } diff --git a/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBPlayerView.m b/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBPlayerView.m index 622e69bea9..642d63455d 100644 --- a/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBPlayerView.m +++ b/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBPlayerView.m @@ -130,9 +130,9 @@ static CGFloat const kGradientViewHeight = 25.0f; { if (!self.replayView) { self.replayView = [[MOPUBReplayView alloc] initWithFrame:self.avView.bounds displayMode:self.displayMode]; - __weak typeof(self) weakSelf = self; + __weak __typeof__(self) weakSelf = self; self.replayView.actionBlock = ^(MOPUBReplayView *view) { - __strong typeof(self) strongSelf = weakSelf; + __strong __typeof__(self) strongSelf = weakSelf; if ([strongSelf.delegate respondsToSelector:@selector(playerViewDidTapReplayButton:)]) { [strongSelf.delegate playerViewDidTapReplayButton:strongSelf]; } diff --git a/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBPlayerViewController.h b/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBPlayerViewController.h index 34c7f56496..088baffa63 100644 --- a/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBPlayerViewController.h +++ b/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBPlayerViewController.h @@ -10,7 +10,6 @@ @class MOPUBAVPlayer; @class MOPUBPlayerViewController; @class MOPUBNativeVideoAdConfigValues; -@class MPAdConfigurationLogEventProperties; @class MPVASTTracking; @class MPVideoConfig; @@ -57,7 +56,7 @@ @property (nonatomic, weak) id delegate; #pragma mark - Initializer -- (instancetype)initWithVideoConfig:(MPVideoConfig *)videoConfig nativeVideoAdConfig:(MOPUBNativeVideoAdConfigValues *)nativeVideoAdConfig logEventProperties:(MPAdConfigurationLogEventProperties *)logEventProperties; +- (instancetype)initWithVideoConfig:(MPVideoConfig *)videoConfig nativeVideoAdConfig:(MOPUBNativeVideoAdConfigValues *)nativeVideoAdConfig; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; diff --git a/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBPlayerViewController.m b/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBPlayerViewController.m index 2daea1fb88..35b118f544 100644 --- a/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBPlayerViewController.m +++ b/iphone/Maps/3party/MoPubSDK/NativeVideo/Internal/MOPUBPlayerViewController.m @@ -12,8 +12,6 @@ #import "MPCoreInstanceProvider.h" #import "MPGlobal.h" #import "MPLogging.h" -#import "MPLogEvent+NativeVideo.h" -#import "MPLogEventRecorder.h" #import "MOPUBNativeVideoAdConfigValues.h" #import "MPVastTracking.h" #import "MPVideoConfig.h" @@ -60,7 +58,6 @@ static const double kVideoFinishedBufferingAllowedError = 0.1; // KVO might be triggerd multipe times. This property is used to make sure the view will only be created once. @property (nonatomic) BOOL alreadyInitialized; -@property (nonatomic) MPAdConfigurationLogEventProperties *logEventProperties; @property (nonatomic) BOOL downloadFinishedEventFired; @property (nonatomic) BOOL alreadyCreatedPlayerView; @property (nonatomic) BOOL finishedPlaying; @@ -69,7 +66,7 @@ static const double kVideoFinishedBufferingAllowedError = 0.1; @implementation MOPUBPlayerViewController -- (instancetype)initWithVideoConfig:(MPVideoConfig *)videoConfig nativeVideoAdConfig:(MOPUBNativeVideoAdConfigValues *)nativeVideoAdConfig logEventProperties:(MPAdConfigurationLogEventProperties *)logEventProperties +- (instancetype)initWithVideoConfig:(MPVideoConfig *)videoConfig nativeVideoAdConfig:(MOPUBNativeVideoAdConfigValues *)nativeVideoAdConfig { if (self = [super init]) { _mediaURL = videoConfig.mediaURL; @@ -80,7 +77,6 @@ static const double kVideoFinishedBufferingAllowedError = 0.1; [notificationCenter addObserver:self selector:@selector(applicationDidEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:nil]; [notificationCenter addObserver:self selector:@selector(applicationDidEnterForeground:) name:UIApplicationWillEnterForegroundNotification object:nil]; _nativeVideoAdConfig = nativeVideoAdConfig; - _logEventProperties = logEventProperties; // default aspect ratio is 16:9 _videoAspectRatio = kDefaultVideoAspectRatio; @@ -149,7 +145,6 @@ static const double kVideoFinishedBufferingAllowedError = 0.1; - (void)handleVideoInitError { - MPAddLogEvent([[MPLogEvent alloc] initWithLogEventProperties:self.logEventProperties nativeVideoEventType:MPNativeVideoEventTypeErrorFailedToPlay]); [self.vastTracking handleVideoEvent:MPVideoEventTypeError videoTimeOffset:self.avPlayer.currentPlaybackTime]; [self stopLoadingIndicator]; [self.playerView handleVideoInitFailure]; @@ -168,8 +163,6 @@ static const double kVideoFinishedBufferingAllowedError = 0.1; return; } - MPAddLogEvent([[MPLogEvent alloc ] initWithLogEventProperties:self.logEventProperties nativeVideoEventType:MPNativeVideoEventTypeDownloadStart]); - NSArray *requestedKeys = @[kTracksKey, kPlayableKey]; [asset loadValuesAsynchronouslyForKeys:requestedKeys completionHandler:^{ dispatch_async(dispatch_get_main_queue(), ^{ @@ -226,7 +219,6 @@ static const double kVideoFinishedBufferingAllowedError = 0.1; - (void)initOnVideoReady { [self startPlayer]; - MPAddLogEvent([[MPLogEvent alloc] initWithLogEventProperties:self.logEventProperties nativeVideoEventType:MPNativeVideoEventTypeVideoReady]); } - (void)createView @@ -264,7 +256,7 @@ static const double kVideoFinishedBufferingAllowedError = 0.1; - (MPAdDestinationDisplayAgent *)displayAgent { if (!_displayAgent) { - _displayAgent = [[MPCoreInstanceProvider sharedProvider] buildMPAdDestinationDisplayAgentWithDelegate:self]; + _displayAgent = [MPAdDestinationDisplayAgent agentWithDelegate:self]; } return _displayAgent; } @@ -378,11 +370,6 @@ static const double kVideoFinishedBufferingAllowedError = 0.1; { if (object == self.avPlayer) { if (self.avPlayer.status == AVPlayerItemStatusFailed) { - if (self.isReadyToPlay) { - MPAddLogEvent([[MPLogEvent alloc] initWithLogEventProperties:self.logEventProperties nativeVideoEventType:MPNativeVideoEventTypeErrorDuringPlayback]); - } else { - MPAddLogEvent([[MPLogEvent alloc] initWithLogEventProperties:self.logEventProperties nativeVideoEventType:MPNativeVideoEventTypeErrorFailedToPlay]); - } MPLogError(@"avPlayer status failed"); [self.vastTracking handleVideoEvent:MPVideoEventTypeError videoTimeOffset:self.avPlayer.currentPlaybackTime]; } @@ -396,7 +383,6 @@ static const double kVideoFinishedBufferingAllowedError = 0.1; double videoDuration = CMTimeGetSeconds(self.playerItem.duration); if ((startTime + loadedDuration + kVideoFinishedBufferingAllowedError) >= videoDuration && !self.downloadFinishedEventFired) { self.downloadFinishedEventFired = YES; - MPAddLogEvent([[MPLogEvent alloc ] initWithLogEventProperties:self.logEventProperties nativeVideoEventType:MPNativeVideoEventTypeDownloadFinished]); } } } @@ -518,7 +504,6 @@ static const double kVideoFinishedBufferingAllowedError = 0.1; - (void)avPlayer:(MOPUBAVPlayer *)player didError:(NSError *)error withMessage:(NSString *)message { [self.avPlayer pause]; - MPAddLogEvent([[MPLogEvent alloc] initWithLogEventProperties:self.logEventProperties nativeVideoEventType:MPNativeVideoEventTypeErrorDuringPlayback]); [self.vastTracking handleVideoEvent:MPVideoEventTypeError videoTimeOffset:self.avPlayer.currentPlaybackTime]; } @@ -547,7 +532,6 @@ static const double kVideoFinishedBufferingAllowedError = 0.1; - (void)avPlayerDidStall:(MOPUBAVPlayer *)player { - MPAddLogEvent([[MPLogEvent alloc] initWithLogEventProperties:self.logEventProperties nativeVideoEventType:MPNativeVideoEventTypeBuffering]); if (self.displayMode == MOPUBPlayerDisplayModeInline) { [self startLoadingIndicator]; } else { diff --git a/iphone/Maps/3party/MoPubSDK/NativeVideo/MOPUBNativeVideoAdRenderer.m b/iphone/Maps/3party/MoPubSDK/NativeVideo/MOPUBNativeVideoAdRenderer.m index ac142ba959..cf98e4a111 100644 --- a/iphone/Maps/3party/MoPubSDK/NativeVideo/MOPUBNativeVideoAdRenderer.m +++ b/iphone/Maps/3party/MoPubSDK/NativeVideo/MOPUBNativeVideoAdRenderer.m @@ -318,13 +318,12 @@ static const CGFloat kAutoPlayTimerInterval = 0.25f; if ([self.adView respondsToSelector:(@selector(nativeVideoView))]) { BOOL createdNewVideoController = NO; self.videoConfig = [self.adapter.properties objectForKey:kVideoConfigKey]; - self.nativeVideoAdConfig = [self.adapter.properties objectForKey:kNativeVideoAdConfigKey]; + self.nativeVideoAdConfig = [self.adapter.properties objectForKey:kNativeAdConfigKey]; if (!self.videoController || self.videoController.disposed) { createdNewVideoController = YES; self.videoController = [[MOPUBPlayerManager sharedInstance] playerViewControllerWithVideoConfig:self.videoConfig - nativeVideoAdConfig:self.nativeVideoAdConfig - logEventProperties:[self.adapter.properties valueForKey:kLogEventRequestPropertiesKey]]; + nativeVideoAdConfig:self.nativeVideoAdConfig]; self.videoController.defaultActionURL = self.adapter.defaultActionURL; self.videoController.displayMode = MOPUBPlayerDisplayModeInline; self.videoController.delegate = self; @@ -338,7 +337,9 @@ static const CGFloat kAutoPlayTimerInterval = 0.25f; [self.autoPlayTimer scheduleNow]; } - self.trackingAgent = [[MOPUBNativeVideoImpressionAgent alloc] initWithVideoView:self.videoController.playerView requiredVisibilityPercentage:self.nativeVideoAdConfig.impressionMinVisiblePercent/100.0f requiredPlaybackDuration:self.nativeVideoAdConfig.impressionVisible]; + self.trackingAgent = [[MOPUBNativeVideoImpressionAgent alloc] initWithVideoView:self.videoController.playerView + requiredVisibilityPercentage:self.nativeVideoAdConfig.impressionMinVisiblePercent/100.0f + requiredPlaybackDuration:self.nativeVideoAdConfig.impressionMinVisibleSeconds]; } // Lazy load vast tracking. It must be created after we know the video controller has been initialized. // If we created a new video controller, we must ensure the vast tracking has the new view. diff --git a/iphone/Maps/3party/MoPubSDK/RewardedVideo/Internal/MPMoPubRewardedPlayableCustomEvent.m b/iphone/Maps/3party/MoPubSDK/RewardedVideo/Internal/MPMoPubRewardedPlayableCustomEvent.m index 365ce24ec8..108799acbe 100644 --- a/iphone/Maps/3party/MoPubSDK/RewardedVideo/Internal/MPMoPubRewardedPlayableCustomEvent.m +++ b/iphone/Maps/3party/MoPubSDK/RewardedVideo/Internal/MPMoPubRewardedPlayableCustomEvent.m @@ -98,7 +98,7 @@ const NSTimeInterval kDefaultCountdownTimerIntervalInSeconds = 30; self.timerView = [[MPCountdownTimerView alloc] initWithFrame:viewController.view.bounds duration:self.countdownDuration]; [self.interstitial.view addSubview:self.timerView]; - typeof(self) __weak weakSelf = self; + __weak __typeof__(self) weakSelf = self; [self.timerView startWithTimerCompletion:^(BOOL hasElapsed) { [weakSelf rewardUserWithConfiguration:self.configuration timerHasElapsed:hasElapsed]; [weakSelf showCloseButton]; diff --git a/iphone/Maps/3party/MoPubSDK/RewardedVideo/Internal/MPRewardedVideoAdManager.h b/iphone/Maps/3party/MoPubSDK/RewardedVideo/Internal/MPRewardedVideoAdManager.h index ee9c2734ad..ea83aa9273 100644 --- a/iphone/Maps/3party/MoPubSDK/RewardedVideo/Internal/MPRewardedVideoAdManager.h +++ b/iphone/Maps/3party/MoPubSDK/RewardedVideo/Internal/MPRewardedVideoAdManager.h @@ -44,7 +44,8 @@ /** * Loads a rewarded video ad with the ad manager's ad unit ID. * - * @param keywords A string representing a set of keywords that should be passed to the MoPub ad server to receive + * @param keywords A string representing a set of non-personally identifiable keywords that should be passed to the MoPub ad server to receive more relevant advertising. + * @param userDataKeywords A string representing a set of personally identifiable keywords that should be passed to the MoPub ad server to receive * more relevant advertising. * * @param location Latitude/Longitude that are passed to the MoPub ad server @@ -54,21 +55,16 @@ * @param customerId The user's id within the app. * * However, if an ad has been played for the last time a load was issued and load is called again, the method will request a new ad. + + * Note: If a user is in General Data Protection Regulation (GDPR) region and MoPub doesn't obtain consent from the user, "keywords" will be sent to the server but "userDataKeywords" will be excluded. */ -- (void)loadRewardedVideoAdWithKeywords:(NSString *)keywords location:(CLLocation *)location customerId:(NSString *)customerId; +- (void)loadRewardedVideoAdWithKeywords:(NSString *)keywords userDataKeywords:(NSString *)userDataKeywords location:(CLLocation *)location customerId:(NSString *)customerId; /** * Tells the caller whether the underlying ad network currently has an ad available for presentation. */ - (BOOL)hasAdAvailable; -/** - * Plays a rewarded video ad, choosing the first reward from `availableRewards` to award the user. - * - * @param viewController Presents the rewarded video ad from viewController. - */ -- (void)presentRewardedVideoAdFromViewController:(UIViewController *)viewController __deprecated_msg("use presentRewardedVideoAdFromViewController:withReward: instead."); - /** * Plays a rewarded video ad. * @@ -76,8 +72,10 @@ * @param reward A reward chosen from `availableRewards` to award the user upon completion. * This value should not be `nil`. If the reward that is passed in did not come from `availableRewards`, * this method will not present the rewarded ad and invoke `rewardedVideoDidFailToPlayForAdManager:error:`. + * @param customData Optional custom data string to include in the server-to-server callback. If a server-to-server callback + * is not used, or if the ad unit is configured for local rewarding, this value will not be persisted. */ -- (void)presentRewardedVideoAdFromViewController:(UIViewController *)viewController withReward:(MPRewardedVideoReward *)reward; +- (void)presentRewardedVideoAdFromViewController:(UIViewController *)viewController withReward:(MPRewardedVideoReward *)reward customData:(NSString *)customData; /** * This method is called when another ad unit has played a rewarded video from the same network this ad manager's custom event diff --git a/iphone/Maps/3party/MoPubSDK/RewardedVideo/Internal/MPRewardedVideoAdManager.m b/iphone/Maps/3party/MoPubSDK/RewardedVideo/Internal/MPRewardedVideoAdManager.m index 8951f8870f..d6646a91dc 100644 --- a/iphone/Maps/3party/MoPubSDK/RewardedVideo/Internal/MPRewardedVideoAdManager.m +++ b/iphone/Maps/3party/MoPubSDK/RewardedVideo/Internal/MPRewardedVideoAdManager.m @@ -33,7 +33,7 @@ { if (self = [super init]) { _adUnitID = [adUnitID copy]; - _communicator = [[MPCoreInstanceProvider sharedProvider] buildMPAdServerCommunicatorWithDelegate:self]; + _communicator = [[MPAdServerCommunicator alloc] initWithDelegate:self]; _delegate = delegate; } @@ -62,6 +62,11 @@ - (BOOL)hasAdAvailable { + //An Ad is not ready or has expired. + if (!self.ready) { + return NO; + } + // If we've already played an ad, return NO since we allow one play per load. if (self.playedAd) { return NO; @@ -69,7 +74,7 @@ return [self.adapter hasAdAvailable]; } -- (void)loadRewardedVideoAdWithKeywords:(NSString *)keywords location:(CLLocation *)location customerId:(NSString *)customerId +- (void)loadRewardedVideoAdWithKeywords:(NSString *)keywords userDataKeywords:(NSString *)userDataKeywords location:(CLLocation *)location customerId:(NSString *)customerId { // We will just tell the delegate that we have loaded an ad if we already have one ready. However, if we have already // played a video for this ad manager, we will go ahead and request another ad from the server so we aren't potentially @@ -84,18 +89,24 @@ self.customerId = customerId; [self loadAdWithURL:[MPAdServerURLBuilder URLWithAdUnitID:self.adUnitID keywords:keywords - location:location - testing:NO]]; + userDataKeywords:userDataKeywords + location:location]]; } } -- (void)presentRewardedVideoAdFromViewController:(UIViewController *)viewController +- (void)presentRewardedVideoAdFromViewController:(UIViewController *)viewController withReward:(MPRewardedVideoReward *)reward customData:(NSString *)customData { - [self presentRewardedVideoAdFromViewController:viewController withReward:nil]; -} + // Don't allow the ad to be shown if it isn't ready. + if (!self.ready) { + NSError *error = [NSError errorWithDomain:MoPubRewardedVideoAdsSDKDomain code:MPRewardedVideoAdErrorNoAdReady userInfo:@{ NSLocalizedDescriptionKey: @"Rewarded video ad view is not ready to be shown"}]; + + // We don't want to remotely log this event -- it's simply for publisher troubleshooting -- so use NSLog + // rather than MPLog. + NSLog(@"%@", error.localizedDescription); + [self.delegate rewardedVideoDidFailToPlayForAdManager:self error:error]; + return; + } -- (void)presentRewardedVideoAdFromViewController:(UIViewController *)viewController withReward:(MPRewardedVideoReward *)reward -{ // If we've already played an ad, don't allow playing of another since we allow one play per load. if (self.playedAd) { NSError *error = [NSError errorWithDomain:MoPubRewardedVideoAdsSDKDomain code:MPRewardedVideoAdErrorAdAlreadyPlayed userInfo:nil]; @@ -131,7 +142,7 @@ } } - [self.adapter presentRewardedVideoFromViewController:viewController]; + [self.adapter presentRewardedVideoFromViewController:viewController customData:customData]; } - (void)handleAdPlayedForCustomEventNetwork @@ -162,9 +173,9 @@ #pragma mark - MPAdServerCommunicatorDelegate -- (void)communicatorDidReceiveAdConfiguration:(MPAdConfiguration *)configuration +- (void)communicatorDidReceiveAdConfigurations:(NSArray *)configurations { - self.configuration = configuration; + self.configuration = configurations.firstObject; MPLogInfo(@"Rewarded video ad is fetching ad network type: %@", self.configuration.networkType); @@ -193,7 +204,7 @@ } self.adapter = adapter; - [self.adapter getAdWithConfiguration:configuration]; + [self.adapter getAdWithConfiguration:self.configuration]; } - (void)communicatorDidFailWithError:(NSError *)error diff --git a/iphone/Maps/3party/MoPubSDK/RewardedVideo/Internal/MPRewardedVideoAdapter.h b/iphone/Maps/3party/MoPubSDK/RewardedVideo/Internal/MPRewardedVideoAdapter.h index 3a81d62be6..76e61e3f9b 100644 --- a/iphone/Maps/3party/MoPubSDK/RewardedVideo/Internal/MPRewardedVideoAdapter.h +++ b/iphone/Maps/3party/MoPubSDK/RewardedVideo/Internal/MPRewardedVideoAdapter.h @@ -43,8 +43,10 @@ * Plays a rewarded video ad. * * @param viewController Presents the rewarded video ad from viewController. + * @param customData Optional custom data string to include in the server-to-server callback. If a server-to-server callback + * is not used, or if the ad unit is configured for local rewarding, this value will not be persisted. */ -- (void)presentRewardedVideoFromViewController:(UIViewController *)viewController; +- (void)presentRewardedVideoFromViewController:(UIViewController *)viewController customData:(NSString *)customData; /** * This method is called when another ad unit has played a rewarded video from the same network this adapter's custom event diff --git a/iphone/Maps/3party/MoPubSDK/RewardedVideo/Internal/MPRewardedVideoAdapter.m b/iphone/Maps/3party/MoPubSDK/RewardedVideo/Internal/MPRewardedVideoAdapter.m index 73410a606e..7fd320d372 100644 --- a/iphone/Maps/3party/MoPubSDK/RewardedVideo/Internal/MPRewardedVideoAdapter.m +++ b/iphone/Maps/3party/MoPubSDK/RewardedVideo/Internal/MPRewardedVideoAdapter.m @@ -17,8 +17,14 @@ #import "MPTimer.h" #import "MPRewardedVideoReward.h" #import "MPRewardedVideo+Internal.h" +#import "MPConstants.h" +#import "MPMoPubRewardedVideoCustomEvent.h" +#import "MPMoPubRewardedPlayableCustomEvent.h" +#import "MPRealTimeTimer.h" +#import "NSString+MPAdditions.h" static const NSString *kRewardedVideoApiVersion = @"1"; +static const NSUInteger kExcessiveCustomDataLength = 8196; @interface MPRewardedVideoAdapter () @@ -31,6 +37,8 @@ static const NSString *kRewardedVideoApiVersion = @"1"; @property (nonatomic, assign) BOOL hasSuccessfullyLoaded; // Since we only notify the application of one success per load, we also only notify the application of one expiration per success. @property (nonatomic, assign) BOOL hasExpired; +@property (nonatomic, strong) MPRealTimeTimer *expirationTimer; +@property (nonatomic, copy) NSString * urlEncodedCustomData; @end @@ -68,7 +76,7 @@ static const NSString *kRewardedVideoApiVersion = @"1"; if (self.rewardedVideoCustomEvent) { [self startTimeoutTimer]; - [self.rewardedVideoCustomEvent requestRewardedVideoWithCustomEventInfo:configuration.customEventClassData]; + [self.rewardedVideoCustomEvent requestRewardedVideoWithCustomEventInfo:configuration.customEventClassData adMarkup:configuration.advancedBidPayload]; } else { NSError *error = [NSError errorWithDomain:MoPubRewardedVideoAdsSDKDomain code:MPRewardedVideoAdErrorInvalidCustomEvent userInfo:nil]; [self.delegate rewardedVideoDidFailToLoadForAdapter:self error:error]; @@ -80,8 +88,20 @@ static const NSString *kRewardedVideoApiVersion = @"1"; return [self.rewardedVideoCustomEvent hasAdAvailable]; } -- (void)presentRewardedVideoFromViewController:(UIViewController *)viewController +- (void)presentRewardedVideoFromViewController:(UIViewController *)viewController customData:(NSString *)customData { + NSUInteger customDataLength = customData.length; + // Only persist the custom data field if it's non-empty and there is a server-to-server + // callback URL. The persisted custom data will be url encoded. + if (customDataLength > 0 && self.configuration.rewardedVideoCompletionUrl != nil) { + // Warn about excessive custom data length, but allow the custom data to be sent anyway + if (customDataLength > kExcessiveCustomDataLength) { + MPLogWarn(@"Custom data length %ld exceeds the receommended maximum length of %ld characters.", customDataLength, kExcessiveCustomDataLength); + } + + self.urlEncodedCustomData = [customData mp_URLEncodedString]; + } + [self.rewardedVideoCustomEvent presentRewardedVideoFromViewController:viewController]; } @@ -128,10 +148,21 @@ static const NSString *kRewardedVideoApiVersion = @"1"; } finalCompletionUrlString = [NSString stringWithFormat:@"%@&nv=%@&v=%@", finalCompletionUrlString, [MP_SDK_VERSION mp_URLEncodedString], kRewardedVideoApiVersion]; - if (self.configuration.selectedReward) { + if (self.configuration.selectedReward && ![self.configuration.selectedReward.currencyType isEqualToString:kMPRewardedVideoRewardCurrencyTypeUnspecified]) { finalCompletionUrlString = [NSString stringWithFormat:@"%@&rcn=%@&rca=%i", finalCompletionUrlString, [self.configuration.selectedReward.currencyType mp_URLEncodedString], [self.configuration.selectedReward.amount intValue]]; } + // Append URL encoded custom event class name + if (self.rewardedVideoCustomEvent != nil) { + NSString * networkClassName = [NSStringFromClass([self.rewardedVideoCustomEvent class]) mp_URLEncodedString]; + finalCompletionUrlString = [NSString stringWithFormat:@"%@&cec=%@", finalCompletionUrlString, networkClassName]; + } + + // Append URL encoded custom data + if (self.urlEncodedCustomData != nil) { + finalCompletionUrlString = [NSString stringWithFormat:@"%@&rcd=%@", finalCompletionUrlString, self.urlEncodedCustomData]; + } + return [NSURL URLWithString:finalCompletionUrlString]; } @@ -140,6 +171,8 @@ static const NSString *kRewardedVideoApiVersion = @"1"; - (void)trackImpression { [[[MPCoreInstanceProvider sharedProvider] sharedMPAnalyticsTracker] trackImpressionForConfiguration:self.configuration]; + self.hasTrackedImpression = YES; + [self.expirationTimer invalidate]; } - (void)trackClick @@ -165,6 +198,21 @@ static const NSString *kRewardedVideoApiVersion = @"1"; self.hasSuccessfullyLoaded = YES; [self didStopLoading]; [self.delegate rewardedVideoDidLoadForAdapter:self]; + + // Check for MoPub-specific custom events before setting the timer + if ([customEvent isKindOfClass:[MPMoPubRewardedVideoCustomEvent class]] + || [customEvent isKindOfClass:[MPMoPubRewardedPlayableCustomEvent class]]) { + // Set up timer for expiration + __weak __typeof__(self) weakSelf = self; + self.expirationTimer = [[MPRealTimeTimer alloc] initWithInterval:[MPConstants adsExpirationInterval] block:^(MPRealTimeTimer *timer){ + __strong __typeof__(weakSelf) strongSelf = weakSelf; + if (strongSelf && !strongSelf.hasTrackedImpression) { + [strongSelf rewardedVideoDidExpireForCustomEvent:strongSelf.rewardedVideoCustomEvent]; + } + [strongSelf.expirationTimer invalidate]; + }]; + [self.expirationTimer scheduleNow]; + } } - (void)rewardedVideoDidFailToLoadAdForCustomEvent:(MPRewardedVideoCustomEvent *)customEvent error:(NSError *)error @@ -203,7 +251,6 @@ static const NSString *kRewardedVideoApiVersion = @"1"; - (void)rewardedVideoDidAppearForCustomEvent:(MPRewardedVideoCustomEvent *)customEvent { if ([self.rewardedVideoCustomEvent enableAutomaticImpressionAndClickTracking] && !self.hasTrackedImpression) { - self.hasTrackedImpression = YES; [self trackImpression]; } @@ -237,24 +284,25 @@ static const NSString *kRewardedVideoApiVersion = @"1"; - (void)rewardedVideoShouldRewardUserForCustomEvent:(MPRewardedVideoCustomEvent *)customEvent reward:(MPRewardedVideoReward *)reward { - if (self.configuration && self.configuration.rewardedVideoCompletionUrl) { - // server to server callback - [[MPRewardedVideo sharedInstance] startRewardedVideoConnectionWithUrl:[self rewardedVideoCompletionUrlByAppendingClientParams]]; - } else { - // server to server not enabled. It uses client side rewarding. - if (self.configuration) { - MPRewardedVideoReward *mopubConfiguredReward = self.configuration.selectedReward; - // If reward is set in adConfig, use reward that's set in adConfig. - // Currency type has to be defined in mopubConfiguredReward in order to use mopubConfiguredReward. - if (mopubConfiguredReward && mopubConfiguredReward.currencyType != kMPRewardedVideoRewardCurrencyTypeUnspecified){ - reward = mopubConfiguredReward; - } + if (self.configuration) { + // Send server to server callback if available + if (self.configuration.rewardedVideoCompletionUrl) { + [[MPRewardedVideo sharedInstance] startRewardedVideoConnectionWithUrl:[self rewardedVideoCompletionUrlByAppendingClientParams]]; } - if (reward) { - [self.delegate rewardedVideoShouldRewardUserForAdapter:self reward:reward]; + MPRewardedVideoReward *mopubConfiguredReward = self.configuration.selectedReward; + + // If reward is set in adConfig, use reward that's set in adConfig. + // Currency type has to be defined in mopubConfiguredReward in order to use mopubConfiguredReward. + if (mopubConfiguredReward && ![mopubConfiguredReward.currencyType isEqualToString:kMPRewardedVideoRewardCurrencyTypeUnspecified]) { + reward = mopubConfiguredReward; } } + + // Notify client with the reward if present. + if (reward) { + [self.delegate rewardedVideoShouldRewardUserForAdapter:self reward:reward]; + } } - (NSString *)customerIdForRewardedVideoCustomEvent:(MPRewardedVideoCustomEvent *)customEvent diff --git a/iphone/Maps/3party/MoPubSDK/RewardedVideo/Internal/MPRewardedVideoConnection.m b/iphone/Maps/3party/MoPubSDK/RewardedVideo/Internal/MPRewardedVideoConnection.m index 28db576398..0101236c53 100644 --- a/iphone/Maps/3party/MoPubSDK/RewardedVideo/Internal/MPRewardedVideoConnection.m +++ b/iphone/Maps/3party/MoPubSDK/RewardedVideo/Internal/MPRewardedVideoConnection.m @@ -7,6 +7,8 @@ #import #import "MPRewardedVideoConnection.h" +#import "MPHTTPNetworkSession.h" +#import "MPURLRequest.h" static const NSTimeInterval kMaximumRequestRetryInterval = 900.0; // 15 mins static const NSTimeInterval kMinimumRequestRetryInterval = 5.0; @@ -15,7 +17,7 @@ static const CGFloat kRetryIntervalBackoffMultiplier = 2.0; @interface MPRewardedVideoConnection() -@property (nonatomic) NSURLConnection *connection; +@property (nonatomic, strong) NSURLSessionTask *task; @property (nonatomic) NSURL *url; @property (nonatomic) NSUInteger retryCount; @property (nonatomic) NSTimeInterval accumulatedRetryInterval; @@ -36,9 +38,32 @@ static const CGFloat kRetryIntervalBackoffMultiplier = 2.0; - (void)sendRewardedVideoCompletionRequest { - NSURLRequest *request = [NSURLRequest requestWithURL:self.url]; - [self.connection cancel]; - self.connection = [NSURLConnection connectionWithRequest:request delegate:self]; + MPURLRequest *request = [MPURLRequest requestWithURL:self.url]; + [self.task cancel]; + + __weak __typeof__(self) weakSelf = self; + self.task = [MPHTTPNetworkSession startTaskWithHttpRequest:request responseHandler:^(NSData * _Nonnull data, NSHTTPURLResponse * _Nonnull response) { + __typeof__(self) strongSelf = weakSelf; + + NSInteger statusCode = response.statusCode; + + // only retry on 5xx + if (statusCode >= 500 && statusCode <= 599) { + [strongSelf retryRewardedVideoCompletionRequest]; + } else { + [strongSelf.delegate rewardedVideoConnectionCompleted:strongSelf url:strongSelf.url]; + } + } errorHandler:^(NSError * _Nonnull error) { + __typeof__(self) strongSelf = weakSelf; + + if (error.code == NSURLErrorTimedOut || + error.code == NSURLErrorNetworkConnectionLost || + error.code == NSURLErrorNotConnectedToInternet) { + [strongSelf retryRewardedVideoCompletionRequest]; + } else { + [strongSelf.delegate rewardedVideoConnectionCompleted:strongSelf url:strongSelf.url]; + } + }]; } - (void)retryRewardedVideoCompletionRequest @@ -51,7 +76,7 @@ static const CGFloat kRetryIntervalBackoffMultiplier = 2.0; [self performSelector:@selector(sendRewardedVideoCompletionRequest) withObject:nil afterDelay:retryInterval]; } else { [self.delegate rewardedVideoConnectionCompleted:self url:self.url]; - [self.connection cancel]; + [self.task cancel]; } self.retryCount++; } @@ -68,28 +93,4 @@ static const CGFloat kRetryIntervalBackoffMultiplier = 2.0; return interval; } -#pragma mark - - -- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error -{ - if (error.code == NSURLErrorTimedOut || - error.code == NSURLErrorNetworkConnectionLost || - error.code == NSURLErrorNotConnectedToInternet) { - [self retryRewardedVideoCompletionRequest]; - } else { - [self.delegate rewardedVideoConnectionCompleted:self url:self.url]; - } -} - -- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response -{ - NSInteger statusCode = [(NSHTTPURLResponse *)response statusCode]; - // only retry on 5xx - if (statusCode >= 500 && statusCode <= 599) { - [self retryRewardedVideoCompletionRequest]; - } else { - [self.delegate rewardedVideoConnectionCompleted:self url:self.url]; - } -} - @end diff --git a/iphone/Maps/3party/MoPubSDK/RewardedVideo/MPRewardedVideo.h b/iphone/Maps/3party/MoPubSDK/RewardedVideo/MPRewardedVideo.h index 289a638d4b..8f45d8486a 100644 --- a/iphone/Maps/3party/MoPubSDK/RewardedVideo/MPRewardedVideo.h +++ b/iphone/Maps/3party/MoPubSDK/RewardedVideo/MPRewardedVideo.h @@ -22,6 +22,27 @@ */ @interface MPRewardedVideo : NSObject +/** + * Sets the delegate that will be the receiver of rewarded video events for the given + * ad unit ID. + * @remark A weak reference to the delegate will be held. + * @param delegate Delegate that will recieve rewarded video events for the ad unit ID. + * @param adUnitId Ad unit ID + */ ++ (void)setDelegate:(id)delegate forAdUnitId:(NSString *)adUnitId; + +/** + * Removes the delegate as a receiver of rewarded video events for all available ad unit IDs. + * @param delegate Reference to the delegate to remove as a listener. + */ ++ (void)removeDelegate:(id)delegate; + +/** + * Removes the rewarded video delegate that is associated with the ad unit ID. + * @param adUnitId Ad unit ID of the delegate to remove. + */ ++ (void)removeDelegateForAdUnitId:(NSString *)adUnitId; + /** * Loads a rewarded video ad for the given ad unit ID. * @@ -45,13 +66,16 @@ * not pass in an mediation settings object for that network. * * @param adUnitID The ad unit ID that ads should be loaded from. - * @param keywords A string representing a set of keywords that should be passed to the MoPub ad server to receive + * @param keywords A string representing a set of non-personally identifiable keywords that should be passed to the MoPub ad server to receive more relevant advertising. + * @param userDataKeywords A string representing a set of personally identifiable keywords that should be passed to the MoPub ad server to receive * more relevant advertising. * @param location Latitude/Longitude that are passed to the MoPub ad server * @param mediationSettings An array of mediation settings objects that map to networks that may show ads for the ad unit ID. This array * should only contain objects for networks you wish to configure. This can be nil. + + * Note: If a user is in General Data Protection Regulation (GDPR) region and MoPub doesn't obtain consent from the user, "keywords" will be sent to the server but "userDataKeywords" will be excluded. */ -+ (void)loadRewardedVideoAdWithAdUnitID:(NSString *)adUnitID keywords:(NSString *)keywords location:(CLLocation *)location mediationSettings:(NSArray *)mediationSettings; ++ (void)loadRewardedVideoAdWithAdUnitID:(NSString *)adUnitID keywords:(NSString *)keywords userDataKeywords:(NSString *)userDataKeywords location:(CLLocation *)location mediationSettings:(NSArray *)mediationSettings; /** * Loads a rewarded video ad for the given ad unit ID. @@ -62,14 +86,17 @@ * not pass in an mediation settings object for that network. * * @param adUnitID The ad unit ID that ads should be loaded from. - * @param keywords A string representing a set of keywords that should be passed to the MoPub ad server to receive + * @param keywords A string representing a set of non-personally identifiable keywords that should be passed to the MoPub ad server to receive more relevant advertising. + * @param userDataKeywords A string representing a set of personally identifiable keywords that should be passed to the MoPub ad server to receive * more relevant advertising. * @param location Latitude/Longitude that are passed to the MoPub ad server * @param customerId This is the ID given to the user by the publisher to identify them in their app * @param mediationSettings An array of mediation settings objects that map to networks that may show ads for the ad unit ID. This array * should only contain objects for networks you wish to configure. This can be nil. + + * Note: If a user is in General Data Protection Regulation (GDPR) region and MoPub doesn't obtain consent from the user, "keywords" will be sent to the server but "userDataKeywords" will be excluded. */ -+ (void)loadRewardedVideoAdWithAdUnitID:(NSString *)adUnitID keywords:(NSString *)keywords location:(CLLocation *)location customerId:(NSString *)customerId mediationSettings:(NSArray *)mediationSettings; ++ (void)loadRewardedVideoAdWithAdUnitID:(NSString *)adUnitID keywords:(NSString *)keywords userDataKeywords:(NSString *)userDataKeywords location:(CLLocation *)location customerId:(NSString *)customerId mediationSettings:(NSArray *)mediationSettings; /** * Returns whether or not an ad is available for the given ad unit ID. @@ -104,16 +131,20 @@ + (void)presentRewardedVideoAdForAdUnitID:(NSString *)adUnitID fromViewController:(UIViewController *)viewController withReward:(MPRewardedVideoReward *)reward; /** - * Plays a rewarded video ad, automatically selecting the first available reward in `availableRewardsForAdUnitID:`. + * Plays a rewarded video ad. * * @param adUnitID The ad unit ID associated with the video ad you wish to play. * @param viewController The view controller that will present the rewarded video ad. + * @param reward A reward selected from `availableRewardsForAdUnitID:` to award the user upon successful completion of the ad. + * This value should not be `nil`. + * @param customData Optional custom data string to include in the server-to-server callback. If a server-to-server callback + * is not used, or if the ad unit is configured for local rewarding, this value will not be persisted. * * @warning **Important**: You should not attempt to play the rewarded video unless `+hasAdAvailableForAdUnitID:` indicates that an * ad is available for playing or you have received the `[-rewardedVideoAdDidLoadForAdUnitID:]([MPRewardedVideoDelegate rewardedVideoAdDidLoadForAdUnitID:])` * message. */ -+ (void)presentRewardedVideoAdForAdUnitID:(NSString *)adUnitID fromViewController:(UIViewController *)viewController __deprecated_msg("use presentRewardedVideoAdForAdUnitID:fromViewController:withReward: instead."); ++ (void)presentRewardedVideoAdForAdUnitID:(NSString *)adUnitID fromViewController:(UIViewController *)viewController withReward:(MPRewardedVideoReward *)reward customData:(NSString *)customData; @end diff --git a/iphone/Maps/3party/MoPubSDK/RewardedVideo/MPRewardedVideo.m b/iphone/Maps/3party/MoPubSDK/RewardedVideo/MPRewardedVideo.m index d922fa8c38..2328453c0e 100644 --- a/iphone/Maps/3party/MoPubSDK/RewardedVideo/MPRewardedVideo.m +++ b/iphone/Maps/3party/MoPubSDK/RewardedVideo/MPRewardedVideo.m @@ -11,15 +11,16 @@ #import "MPInstanceProvider.h" #import "MPRewardedVideoError.h" #import "MPRewardedVideoConnection.h" -#import "MPRewardedVideo+Internal.h" +#import "MPRewardedVideoCustomEvent.h" +#import "MPRewardedVideoCustomEvent+Caching.h" static MPRewardedVideo *gSharedInstance = nil; @interface MPRewardedVideo () @property (nonatomic, strong) NSMutableDictionary *rewardedVideoAdManagers; -@property (nonatomic, weak) id delegate; @property (nonatomic) NSMutableArray *rewardedVideoConnections; +@property (nonatomic, strong) NSMapTable> * delegateTable; + (MPRewardedVideo *)sharedInstance; @@ -32,28 +33,72 @@ static MPRewardedVideo *gSharedInstance = nil; if (self = [super init]) { _rewardedVideoAdManagers = [[NSMutableDictionary alloc] init]; _rewardedVideoConnections = [NSMutableArray new]; + + // Keys (ad unit ID) are strong, values (delegates) are weak. + _delegateTable = [NSMapTable strongToWeakObjectsMapTable]; } return self; } ++ (void)setDelegate:(id)delegate forAdUnitId:(NSString *)adUnitId +{ + if (adUnitId == nil) { + return; + } + + [[[self class] sharedInstance].delegateTable setObject:delegate forKey:adUnitId]; +} + ++ (void)removeDelegate:(id)delegate +{ + if (delegate == nil) { + return; + } + + NSMapTable * mapTable = [[self class] sharedInstance].delegateTable; + + // Find all keys that contain the delegate + NSMutableArray * keys = [NSMutableArray array]; + for (NSString * key in mapTable) { + if ([mapTable objectForKey:key] == delegate) { + [keys addObject:key]; + } + } + + // Remove all of the found keys + for (NSString * key in keys) { + [mapTable removeObjectForKey:key]; + } +} + ++ (void)removeDelegateForAdUnitId:(NSString *)adUnitId +{ + if (adUnitId == nil) { + return; + } + + [[[self class] sharedInstance].delegateTable removeObjectForKey:adUnitId]; +} + + (void)loadRewardedVideoAdWithAdUnitID:(NSString *)adUnitID withMediationSettings:(NSArray *)mediationSettings { - [MPRewardedVideo loadRewardedVideoAdWithAdUnitID:adUnitID keywords:nil location:nil mediationSettings:mediationSettings]; + [MPRewardedVideo loadRewardedVideoAdWithAdUnitID:adUnitID keywords:nil userDataKeywords:nil location:nil mediationSettings:mediationSettings]; } -+ (void)loadRewardedVideoAdWithAdUnitID:(NSString *)adUnitID keywords:(NSString *)keywords location:(CLLocation *)location mediationSettings:(NSArray *)mediationSettings ++ (void)loadRewardedVideoAdWithAdUnitID:(NSString *)adUnitID keywords:(NSString *)keywords userDataKeywords:(NSString *)userDataKeywords location:(CLLocation *)location mediationSettings:(NSArray *)mediationSettings { - [self loadRewardedVideoAdWithAdUnitID:adUnitID keywords:keywords location:location customerId:nil mediationSettings:mediationSettings]; + [self loadRewardedVideoAdWithAdUnitID:adUnitID keywords:keywords userDataKeywords:userDataKeywords location:location customerId:nil mediationSettings:mediationSettings]; } -+ (void)loadRewardedVideoAdWithAdUnitID:(NSString *)adUnitID keywords:(NSString *)keywords location:(CLLocation *)location customerId:(NSString *)customerId mediationSettings:(NSArray *)mediationSettings ++ (void)loadRewardedVideoAdWithAdUnitID:(NSString *)adUnitID keywords:(NSString *)keywords userDataKeywords:(NSString *)userDataKeywords location:(CLLocation *)location customerId:(NSString *)customerId mediationSettings:(NSArray *)mediationSettings { MPRewardedVideo *sharedInstance = [[self class] sharedInstance]; if (![adUnitID length]) { NSError *error = [NSError errorWithDomain:MoPubRewardedVideoAdsSDKDomain code:MPRewardedVideoAdErrorInvalidAdUnitID userInfo:nil]; - [sharedInstance.delegate rewardedVideoAdDidFailToLoadForAdUnitID:adUnitID error:error]; + id delegate = [sharedInstance.delegateTable objectForKey:adUnitID]; + [delegate rewardedVideoAdDidFailToLoadForAdUnitID:adUnitID error:error]; return; } @@ -66,7 +111,7 @@ static MPRewardedVideo *gSharedInstance = nil; adManager.mediationSettings = mediationSettings; - [adManager loadRewardedVideoAdWithKeywords:keywords location:location customerId:customerId]; + [adManager loadRewardedVideoAdWithKeywords:keywords userDataKeywords:userDataKeywords location:location customerId:customerId]; } + (BOOL)hasAdAvailableForAdUnitID:(NSString *)adUnitID @@ -93,7 +138,7 @@ static MPRewardedVideo *gSharedInstance = nil; return adManager.selectedReward; } -+ (void)presentRewardedVideoAdForAdUnitID:(NSString *)adUnitID fromViewController:(UIViewController *)viewController withReward:(MPRewardedVideoReward *)reward ++ (void)presentRewardedVideoAdForAdUnitID:(NSString *)adUnitID fromViewController:(UIViewController *)viewController withReward:(MPRewardedVideoReward *)reward customData:(NSString *)customData { MPRewardedVideo *sharedInstance = [[self class] sharedInstance]; MPRewardedVideoAdManager *adManager = sharedInstance.rewardedVideoAdManagers[adUnitID]; @@ -116,12 +161,12 @@ static MPRewardedVideo *gSharedInstance = nil; MPLogWarn(@"Attempting to present a rewarded video ad in non-key window. The ad may not render properly."); } - [adManager presentRewardedVideoAdFromViewController:viewController withReward:reward]; + [adManager presentRewardedVideoAdFromViewController:viewController withReward:reward customData:customData]; } -+ (void)presentRewardedVideoAdForAdUnitID:(NSString *)adUnitID fromViewController:(UIViewController *)viewController ++ (void)presentRewardedVideoAdForAdUnitID:(NSString *)adUnitID fromViewController:(UIViewController *)viewController withReward:(MPRewardedVideoReward *)reward { - [MPRewardedVideo presentRewardedVideoAdForAdUnitID:adUnitID fromViewController:viewController withReward:nil]; + [MPRewardedVideo presentRewardedVideoAdForAdUnitID:adUnitID fromViewController:viewController withReward:reward customData:nil]; } #pragma mark - Private @@ -137,74 +182,69 @@ static MPRewardedVideo *gSharedInstance = nil; return gSharedInstance; } -// This is private as we require the developer to initialize rewarded video through the MoPub object. -+ (void)initializeWithDelegate:(id)delegate -{ - MPRewardedVideo *sharedInstance = [[self class] sharedInstance]; - - // Do not allow calls to initialize twice. - if (sharedInstance.delegate) { - MPLogWarn(@"Attempting to initialize MPRewardedVideo when it has already been initialized."); - } else { - sharedInstance.delegate = delegate; - } -} - #pragma mark - MPRewardedVideoAdManagerDelegate - (void)rewardedVideoDidLoadForAdManager:(MPRewardedVideoAdManager *)manager { - if ([self.delegate respondsToSelector:@selector(rewardedVideoAdDidLoadForAdUnitID:)]) { - [self.delegate rewardedVideoAdDidLoadForAdUnitID:manager.adUnitID]; + id delegate = [self.delegateTable objectForKey:manager.adUnitID]; + if ([delegate respondsToSelector:@selector(rewardedVideoAdDidLoadForAdUnitID:)]) { + [delegate rewardedVideoAdDidLoadForAdUnitID:manager.adUnitID]; } } - (void)rewardedVideoDidFailToLoadForAdManager:(MPRewardedVideoAdManager *)manager error:(NSError *)error { - if ([self.delegate respondsToSelector:@selector(rewardedVideoAdDidFailToLoadForAdUnitID:error:)]) { - [self.delegate rewardedVideoAdDidFailToLoadForAdUnitID:manager.adUnitID error:error]; + id delegate = [self.delegateTable objectForKey:manager.adUnitID]; + if ([delegate respondsToSelector:@selector(rewardedVideoAdDidFailToLoadForAdUnitID:error:)]) { + [delegate rewardedVideoAdDidFailToLoadForAdUnitID:manager.adUnitID error:error]; } } - (void)rewardedVideoDidExpireForAdManager:(MPRewardedVideoAdManager *)manager { - if ([self.delegate respondsToSelector:@selector(rewardedVideoAdDidExpireForAdUnitID:)]) { - [self.delegate rewardedVideoAdDidExpireForAdUnitID:manager.adUnitID]; + id delegate = [self.delegateTable objectForKey:manager.adUnitID]; + if ([delegate respondsToSelector:@selector(rewardedVideoAdDidExpireForAdUnitID:)]) { + [delegate rewardedVideoAdDidExpireForAdUnitID:manager.adUnitID]; } } - (void)rewardedVideoDidFailToPlayForAdManager:(MPRewardedVideoAdManager *)manager error:(NSError *)error { - if ([self.delegate respondsToSelector:@selector(rewardedVideoAdDidFailToPlayForAdUnitID:error:)]) { - [self.delegate rewardedVideoAdDidFailToPlayForAdUnitID:manager.adUnitID error:error]; + id delegate = [self.delegateTable objectForKey:manager.adUnitID]; + if ([delegate respondsToSelector:@selector(rewardedVideoAdDidFailToPlayForAdUnitID:error:)]) { + [delegate rewardedVideoAdDidFailToPlayForAdUnitID:manager.adUnitID error:error]; } } - (void)rewardedVideoWillAppearForAdManager:(MPRewardedVideoAdManager *)manager { - if ([self.delegate respondsToSelector:@selector(rewardedVideoAdWillAppearForAdUnitID:)]) { - [self.delegate rewardedVideoAdWillAppearForAdUnitID:manager.adUnitID]; + id delegate = [self.delegateTable objectForKey:manager.adUnitID]; + if ([delegate respondsToSelector:@selector(rewardedVideoAdWillAppearForAdUnitID:)]) { + [delegate rewardedVideoAdWillAppearForAdUnitID:manager.adUnitID]; } } - (void)rewardedVideoDidAppearForAdManager:(MPRewardedVideoAdManager *)manager { - if ([self.delegate respondsToSelector:@selector(rewardedVideoAdDidAppearForAdUnitID:)]) { - [self.delegate rewardedVideoAdDidAppearForAdUnitID:manager.adUnitID]; + id delegate = [self.delegateTable objectForKey:manager.adUnitID]; + if ([delegate respondsToSelector:@selector(rewardedVideoAdDidAppearForAdUnitID:)]) { + [delegate rewardedVideoAdDidAppearForAdUnitID:manager.adUnitID]; } } - (void)rewardedVideoWillDisappearForAdManager:(MPRewardedVideoAdManager *)manager { - if ([self.delegate respondsToSelector:@selector(rewardedVideoAdWillDisappearForAdUnitID:)]) { - [self.delegate rewardedVideoAdWillDisappearForAdUnitID:manager.adUnitID]; + id delegate = [self.delegateTable objectForKey:manager.adUnitID]; + if ([delegate respondsToSelector:@selector(rewardedVideoAdWillDisappearForAdUnitID:)]) { + [delegate rewardedVideoAdWillDisappearForAdUnitID:manager.adUnitID]; } } - (void)rewardedVideoDidDisappearForAdManager:(MPRewardedVideoAdManager *)manager { - if ([self.delegate respondsToSelector:@selector(rewardedVideoAdDidDisappearForAdUnitID:)]) { - [self.delegate rewardedVideoAdDidDisappearForAdUnitID:manager.adUnitID]; + id delegate = [self.delegateTable objectForKey:manager.adUnitID]; + if ([delegate respondsToSelector:@selector(rewardedVideoAdDidDisappearForAdUnitID:)]) { + [delegate rewardedVideoAdDidDisappearForAdUnitID:manager.adUnitID]; } // Since multiple ad units may be attached to the same network, we should notify the custom events (which should then notify the application) @@ -223,22 +263,25 @@ static MPRewardedVideo *gSharedInstance = nil; - (void)rewardedVideoDidReceiveTapEventForAdManager:(MPRewardedVideoAdManager *)manager { - if ([self.delegate respondsToSelector:@selector(rewardedVideoAdDidReceiveTapEventForAdUnitID:)]) { - [self.delegate rewardedVideoAdDidReceiveTapEventForAdUnitID:manager.adUnitID]; + id delegate = [self.delegateTable objectForKey:manager.adUnitID]; + if ([delegate respondsToSelector:@selector(rewardedVideoAdDidReceiveTapEventForAdUnitID:)]) { + [delegate rewardedVideoAdDidReceiveTapEventForAdUnitID:manager.adUnitID]; } } - (void)rewardedVideoWillLeaveApplicationForAdManager:(MPRewardedVideoAdManager *)manager { - if ([self.delegate respondsToSelector:@selector(rewardedVideoAdWillLeaveApplicationForAdUnitID:)]) { - [self.delegate rewardedVideoAdWillLeaveApplicationForAdUnitID:manager.adUnitID]; + id delegate = [self.delegateTable objectForKey:manager.adUnitID]; + if ([delegate respondsToSelector:@selector(rewardedVideoAdWillLeaveApplicationForAdUnitID:)]) { + [delegate rewardedVideoAdWillLeaveApplicationForAdUnitID:manager.adUnitID]; } } - (void)rewardedVideoShouldRewardUserForAdManager:(MPRewardedVideoAdManager *)manager reward:(MPRewardedVideoReward *)reward { - if ([self.delegate respondsToSelector:@selector(rewardedVideoAdShouldRewardForAdUnitID:reward:)]) { - [self.delegate rewardedVideoAdShouldRewardForAdUnitID:manager.adUnitID reward:reward]; + id delegate = [self.delegateTable objectForKey:manager.adUnitID]; + if ([delegate respondsToSelector:@selector(rewardedVideoAdShouldRewardForAdUnitID:reward:)]) { + [delegate rewardedVideoAdShouldRewardForAdUnitID:manager.adUnitID reward:reward]; } } diff --git a/iphone/Maps/3party/MoPubSDK/RewardedVideo/MPRewardedVideoCustomEvent+Caching.h b/iphone/Maps/3party/MoPubSDK/RewardedVideo/MPRewardedVideoCustomEvent+Caching.h new file mode 100644 index 0000000000..cb3a0577fc --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/RewardedVideo/MPRewardedVideoCustomEvent+Caching.h @@ -0,0 +1,27 @@ +// +// MPRewardedVideoCustomEvent+Caching.h +// MoPubSDK +// +// Copyright © 2017 MoPub. All rights reserved. +// + +#import "MPRewardedVideoCustomEvent.h" + +/** + * Provides caching support for network SDK initialization parameters. + */ +@interface MPRewardedVideoCustomEvent (Caching) + +/** + * Updates the initialization parameters for the current network. + * @param params New set of initialization parameters. Nothing will be done if `nil` is passed in. + */ +- (void)setCachedInitializationParameters:(NSDictionary * _Nullable)params; + +/** + * Retrieves the initialization parameters for the current network (if any). + * @return The cached initialization parameters for the network. This may be `nil` if not parameters were found. + */ +- (NSDictionary * _Nullable)cachedInitializationParameters; + +@end diff --git a/iphone/Maps/3party/MoPubSDK/RewardedVideo/MPRewardedVideoCustomEvent+Caching.m b/iphone/Maps/3party/MoPubSDK/RewardedVideo/MPRewardedVideoCustomEvent+Caching.m new file mode 100644 index 0000000000..678c99d2b9 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/RewardedVideo/MPRewardedVideoCustomEvent+Caching.m @@ -0,0 +1,22 @@ +// +// MPRewardedVideoCustomEvent+Caching.m +// MoPubSDK +// +// Copyright © 2017 MoPub. All rights reserved. +// + +#import "MPRewardedVideoCustomEvent+Caching.h" +#import "MPLogging.h" +#import "MPMediationManager.h" + +@implementation MPRewardedVideoCustomEvent (Caching) + +- (void)setCachedInitializationParameters:(NSDictionary * _Nullable)params { + [MPMediationManager.sharedManager setCachedInitializationParameters:params forNetwork:[self class]]; +} + +- (NSDictionary * _Nullable)cachedInitializationParameters { + return [MPMediationManager.sharedManager cachedInitializationParametersForNetwork:[self class]]; +} + +@end diff --git a/iphone/Maps/3party/MoPubSDK/RewardedVideo/MPRewardedVideoCustomEvent.h b/iphone/Maps/3party/MoPubSDK/RewardedVideo/MPRewardedVideoCustomEvent.h index a0fc2b3ddf..7faf0c6a56 100644 --- a/iphone/Maps/3party/MoPubSDK/RewardedVideo/MPRewardedVideoCustomEvent.h +++ b/iphone/Maps/3party/MoPubSDK/RewardedVideo/MPRewardedVideoCustomEvent.h @@ -7,6 +7,7 @@ #import #import +#import "MPMediationSdkInitializable.h" @protocol MPRewardedVideoCustomEventDelegate; @protocol MPMediationSettingsProtocol; @@ -23,15 +24,33 @@ * natively support a wide variety of third-party ad networks. * * At runtime, the MoPub SDK will find and instantiate an `MPRewardedVideoCustomEvent` subclass as needed and - * invoke its `-requestRewardedVideoWithCustomEventInfo:` method. + * invoke its `-requestRewardedVideoWithCustomEventInfo:` method and `+initializeSdkWithParameters:` method. */ -@interface MPRewardedVideoCustomEvent : NSObject +@interface MPRewardedVideoCustomEvent : NSObject @property (nonatomic, weak) id delegate; /** @name Requesting and Displaying a Rewarded Video Ad */ +/** + * Called when the MoPub SDK requires the underlying network SDK to be initialized. + * + * This method may be invoked either at SDK initialization time or on-demand when + * `requestRewardedVideoWithCustomEventInfo:` is invoked. + * + * The default implementation of this method does nothing. Subclasses must override this method and implement + * code to initialize the underlying SDK here. + * + * This method may be called multiple times during the lifetime of the app. As such + * it is recommended that the implementation is encapsulated by a `dispatch_once` + * block. + * + * @param parameters A dictionary containing any SDK-specific information needed for initialization, + * such as app IDs. + */ +- (void)initializeSdkWithParameters:(NSDictionary *)parameters; + /** * Called when the MoPub SDK requires a new rewarded video ad. * @@ -52,6 +71,27 @@ */ - (void)requestRewardedVideoWithCustomEventInfo:(NSDictionary *)info; +/** + * Called when the MoPub SDK requires a new rewarded video ad. + * + * When the MoPub SDK receives a response indicating it should load a custom event, it will send + * this message to your custom event class. Your implementation of this method should load an + * rewarded video ad from a third-party ad network. It must also notify the + * `MPRewardedVideoCustomEventDelegate` of certain lifecycle events. + * + * The default implementation of this method does nothing. Subclasses must override this method and implement code to load a rewarded video here. + * + * **Important**: The application may provide a mediation settings object containing properties that you should use to configure how you use + * the ad network's APIs. Call `[-mediationSettingsForClass:]([MPRewardedVideoCustomEventDelegate mediationSettingsForClass:])` + * specifying a specific class that your custom event uses to retrieve the mediation settings object if it exists. You define + * the mediation settings class and the properties it supports for your custom event. + * + * @param info A dictionary containing additional custom data associated with a given custom event + * request. This data is configurable on the MoPub website, and may be used to pass dynamic information, such as publisher IDs. + * @param adMarkup An optional ad markup to use. + */ +- (void)requestRewardedVideoWithCustomEventInfo:(NSDictionary *)info adMarkup:(NSString *)adMarkup; + /** * Called when the MoPubSDK wants to know if an ad is currently available for the ad network. * diff --git a/iphone/Maps/3party/MoPubSDK/RewardedVideo/MPRewardedVideoCustomEvent.m b/iphone/Maps/3party/MoPubSDK/RewardedVideo/MPRewardedVideoCustomEvent.m index 2ed84596e0..a9034fc8f7 100644 --- a/iphone/Maps/3party/MoPubSDK/RewardedVideo/MPRewardedVideoCustomEvent.m +++ b/iphone/Maps/3party/MoPubSDK/RewardedVideo/MPRewardedVideoCustomEvent.m @@ -10,12 +10,25 @@ @implementation MPRewardedVideoCustomEvent +- (void)initializeSdkWithParameters:(NSDictionary *)parameters +{ + // The default implementation of this method does nothing. Subclasses must override this method + // and implement code to initialize the underlying SDK here. +} + - (void)requestRewardedVideoWithCustomEventInfo:(NSDictionary *)info { // The default implementation of this method does nothing. Subclasses must override this method // and implement code to load a rewarded video here. } +- (void)requestRewardedVideoWithCustomEventInfo:(NSDictionary *)info adMarkup:(NSString *)adMarkup +{ + // By default, the original requestRewardedVideoWithCustomEventInfo: method will be called. + // Otherwise subclasses must override this method and implement code to load a banner here. + [self requestRewardedVideoWithCustomEventInfo:info]; +} + - (BOOL)hasAdAvailable { // Subclasses must override this method and implement coheck whether or not a rewarded vidoe ad diff --git a/iphone/Maps/3party/MoPubSDK/RewardedVideo/MPRewardedVideoError.h b/iphone/Maps/3party/MoPubSDK/RewardedVideo/MPRewardedVideoError.h index 9d9e8e9cc1..f2d0383682 100644 --- a/iphone/Maps/3party/MoPubSDK/RewardedVideo/MPRewardedVideoError.h +++ b/iphone/Maps/3party/MoPubSDK/RewardedVideo/MPRewardedVideoError.h @@ -16,6 +16,7 @@ typedef enum { MPRewardedVideoAdErrorInvalidCustomEvent = -1200, MPRewardedVideoAdErrorMismatchingAdTypes = -1300, MPRewardedVideoAdErrorAdAlreadyPlayed = -1400, + MPRewardedVideoAdErrorNoAdReady = -1401, MPRewardedVideoAdErrorInvalidAdUnitID = -1500, MPRewardedVideoAdErrorInvalidReward = -1600, MPRewardedVideoAdErrorNoRewardSelected = -1601, diff --git a/iphone/Maps/3party/MoPubSDK/Viewability/MPViewabilityAdapter.h b/iphone/Maps/3party/MoPubSDK/Viewability/MPViewabilityAdapter.h new file mode 100644 index 0000000000..8a990256ab --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Viewability/MPViewabilityAdapter.h @@ -0,0 +1,18 @@ +// +// MPViewabilityAdapter.h +// MoPubSDK +// +// Copyright © 2017 MoPub. All rights reserved. +// + +#import + +@protocol MPViewabilityAdapter +@property (nonatomic, readonly) BOOL isTracking; + +- (instancetype)initWithAdView:(UIView *)webView isVideo:(BOOL)isVideo startTrackingImmediately:(BOOL)startTracking; +- (void)startTracking; +- (void)stopTracking; +- (void)registerFriendlyObstructionView:(UIView *)view; + +@end diff --git a/iphone/Maps/3party/MoPubSDK/Viewability/MPViewabilityOption.h b/iphone/Maps/3party/MoPubSDK/Viewability/MPViewabilityOption.h new file mode 100644 index 0000000000..bfe11b7303 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Viewability/MPViewabilityOption.h @@ -0,0 +1,18 @@ +// +// MPViewabilityOption.h +// MoPubSDK +// +// Copyright © 2018 MoPub. All rights reserved. +// + +/** + * Available viewability options + * @remark Any changes made to this bitmask should also be reflected in `MPViewabilityTracker` + * `+ (void)initialize` method. + */ +typedef NS_OPTIONS(NSInteger, MPViewabilityOption) { + MPViewabilityOptionNone = 0, + MPViewabilityOptionIAS = 1 << 0, + MPViewabilityOptionMoat = 1 << 1, + MPViewabilityOptionAll = ((MPViewabilityOptionMoat << 1) - 1) +}; diff --git a/iphone/Maps/3party/MoPubSDK/Viewability/MPViewabilityTracker.h b/iphone/Maps/3party/MoPubSDK/Viewability/MPViewabilityTracker.h new file mode 100644 index 0000000000..b685758716 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Viewability/MPViewabilityTracker.h @@ -0,0 +1,76 @@ +// +// MPViewabilityTracker.h +// MoPubSDK +// +// Copyright © 2016 MoPub. All rights reserved. +// + +#import +#import "MPViewabilityOption.h" + +@class MPWebView; + +/** + * Notification that is fired when at least one viewability vendor is disabled. + */ +extern NSString *const kDisableViewabilityTrackerNotification; + +/** + * Key for accessing the disabled viewability vendors bitmask in the `userInfo` of + * `kDisableViewabilityTrackerNotification`. + */ +extern NSString *const kDisabledViewabilityTrackers; + +/** + * Provides viewability tracking of an ad view. + * Tracking will automatically be stopped upon deallocation. + */ +@interface MPViewabilityTracker : NSObject + +/** + * Returns a bit mask indicating which viewability libraries are included and enabled. A value + * of `MPViewabilityOptionNone` represents that no viewability vendors are enabled or included. + */ ++ (MPViewabilityOption)enabledViewabilityVendors; + +/** + * Disables viewability tracking for the specified vendors for the duration of the session. + * @remark Viewability cannot be re-enabled for a vendor once it has been disabled. + * @param vendors Vendors to stop viewability tracking + */ ++ (void)disableViewability:(MPViewabilityOption)vendors; + +/** + * Initializes a viewability tracker that tracks ads rendered by a web view. + * @param webView The ad web view that should be tracked. + * @param isVideo Flag indicating that the ad being tracked is a video. + * @param startTracking Flag indicating that viewability tracking should start immediately. + * @return A viewability tracker instance. + */ +- (instancetype)initWithAdView:(MPWebView *)webView + isVideo:(BOOL)isVideo + startTrackingImmediately:(BOOL)startTracking NS_DESIGNATED_INITIALIZER; + +/** + * Starts viewability tracking. This will do nothing if it is currently tracking. + */ +- (void)startTracking; + +/** + * Stops viewability tracking. This will do nothing if it is not currently tracking. + */ +- (void)stopTracking; + +/** + * Use this method to register views that appear over the web view but that are supposed to be present (e.g., + * interstitial close buttons) + * @param view The view obstructing the ad view + */ +- (void)registerFriendlyObstructionView:(UIView *)view; + +/** + * `init` is not available. + */ +- (instancetype)init __attribute__((unavailable("init not available"))); + +@end diff --git a/iphone/Maps/3party/MoPubSDK/Viewability/MPViewabilityTracker.m b/iphone/Maps/3party/MoPubSDK/Viewability/MPViewabilityTracker.m new file mode 100644 index 0000000000..b9129c3642 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Viewability/MPViewabilityTracker.m @@ -0,0 +1,184 @@ +// +// MPViewabilityTracker.m +// MoPubSDK +// +// Copyright © 2016 MoPub. All rights reserved. +// + +#import "MoPub.h" +#import "MPLogging.h" +#import "MPViewabilityAdapter.h" +#import "MPViewabilityTracker.h" +#import "MPWebView+Viewability.h" + +/** + * Macro that queries if a bitmask value is currently in the given bitmask + * Examples: + * bitmask = 0x0110 + * value_1 = 0x0001 + * value_2 = 0x0100 + * value_3 = 0x0111 + * + * OptionsHasValue(bitmask, value_1) // returns NO + * OptionsHasValue(bitmask, value_2) // returns YES + * OptionsHasValue(bitmask, value_3) // returns NO + */ +#define OptionsHasValue(options, value) (((options) & (value)) == (value)) + +static MPViewabilityOption sEnabledViewabilityVendors = 0; +static NSDictionary * sSupportedAdapters = nil; +NSString *const kDisableViewabilityTrackerNotification = @"com.mopub.mopub-ios-sdk.viewability.disabletracking"; +NSString *const kDisabledViewabilityTrackers = @"disableViewabilityTrackers"; + +@interface MPViewabilityTracker() +// Map of `MPViewabilityOption`: `id` +@property (nonatomic, strong) NSDictionary> * trackers; +@end + +@implementation MPViewabilityTracker + ++ (void)initialize { + if (self == [MPViewabilityTracker class]) { + // Initialize the current mapping of viewability vendors to their + // associated adapter class names. + // This map should be updated when there are changes to `MPViewabilityOption`. + sSupportedAdapters = @{ @(MPViewabilityOptionMoat): @"MPViewabilityAdapterMoat", + @(MPViewabilityOptionIAS): @"MPViewabilityAdapterAvid", + }; + + // Initial population of the enabled viewability vendors. + for (NSInteger index = 1; index < MPViewabilityOptionAll; index = index << 1) { + NSString * adapterClassName = sSupportedAdapters[@(index)]; + if (NSClassFromString(adapterClassName)) { + sEnabledViewabilityVendors |= index; + MPLogInfo(@"[Viewability] %@ was found.", adapterClassName); + } + } + } +} + +- (instancetype)initWithAdView:(MPWebView *)webView + isVideo:(BOOL)isVideo + startTrackingImmediately:(BOOL)startTracking { + if (self = [super init]) { + // While the viewability SDKs have features that allow the developer to pass in a container view, WKWebView is + // not always in MPWebView's view hierarchy. Pass in the contained web view to be safe, as we don't know for + // sure *how* or *when* MPWebView is traversed. + UIView *view = webView.containedWebView; + + // Invalid ad view + if (view == nil) { + MPLogError(@"nil ad view passed into %s", __PRETTY_FUNCTION__); + return nil; + } + + // Register handler for disabling of viewability tracking. + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onDisableViewabilityTrackingForNotification:) name:kDisableViewabilityTrackerNotification object:nil]; + + // Initialize all known and enabled viewability trackers. + NSMutableDictionary> * trackers = [NSMutableDictionary dictionary]; + for (NSInteger index = 1; index < MPViewabilityOptionAll; index = index << 1) { + NSString * className = sSupportedAdapters[@(index)]; + id tracker = [self initializeTrackerWithClassName:className forViewabilityOption:index withAdView:view isVideo:isVideo startTrackingImmediately:startTracking]; + if (tracker != nil) { + trackers[@(index)] = tracker; + } + } + + _trackers = trackers; + } + + return self; +} + +- (id)initializeTrackerWithClassName:(NSString *)className + forViewabilityOption:(MPViewabilityOption)option + withAdView:(UIView *)webView + isVideo:(BOOL)isVideo + startTrackingImmediately:(BOOL)startTracking { + // Ignore invalid options and empty class name + if (option == MPViewabilityOptionNone || option == MPViewabilityOptionAll || className.length == 0) { + return nil; + } + + // Check if the tracker class exists in the runtime and if it is enabled before + // attempting to initialize it. + Class adapterClass = NSClassFromString(className); + if (adapterClass && OptionsHasValue(sEnabledViewabilityVendors, option)) { + id tracker = [[adapterClass alloc] initWithAdView:webView isVideo:isVideo startTrackingImmediately:startTracking]; + return tracker; + } + + return nil; +} + +- (void)dealloc { + [[NSNotificationCenter defaultCenter] removeObserver:self]; + [self stopTracking]; +} + +- (void)startTracking { + [self.trackers.allValues makeObjectsPerformSelector:@selector(startTracking)]; +} + +- (void)stopTracking:(MPViewabilityOption)vendors { + for (NSInteger index = 1; index < MPViewabilityOptionAll; index = index << 1) { + if (OptionsHasValue(vendors, index) && self.trackers[@(index)] != nil) { + id tracker = self.trackers[@(index)]; + [tracker stopTracking]; + } + } +} + +- (void)stopTracking { + [self stopTracking:MPViewabilityOptionAll]; +} + +- (void)registerFriendlyObstructionView:(UIView *)view { + [self.trackers.allValues makeObjectsPerformSelector:@selector(registerFriendlyObstructionView:) withObject:view]; +} + ++ (MPViewabilityOption)enabledViewabilityVendors { + return sEnabledViewabilityVendors; +} + ++ (void)disableViewability:(MPViewabilityOption)vendors { + // Keep around the old viewability bitmask for comparing if the + // state has changed. + MPViewabilityOption oldEnabledVendors = sEnabledViewabilityVendors; + + // Disable specified vendors + for (NSInteger index = 1; index < MPViewabilityOptionAll; index = index << 1) { + if (OptionsHasValue(vendors, index)) { + sEnabledViewabilityVendors &= ~index; + } + } + + // Broadcast that some viewability tracking has been disabled. + if (vendors != MPViewabilityOptionNone && oldEnabledVendors != sEnabledViewabilityVendors) { + [[NSNotificationCenter defaultCenter] postNotificationName:kDisableViewabilityTrackerNotification object:nil userInfo:@{kDisabledViewabilityTrackers: @(vendors)}]; + } +} + +#pragma mark - Notification Handlers + +- (void)onDisableViewabilityTrackingForNotification:(NSNotification *)notification { + MPViewabilityOption disabledTrackers = MPViewabilityOptionNone; + if (notification.userInfo != nil && [notification.userInfo objectForKey:kDisabledViewabilityTrackers] != nil) { + disabledTrackers = (MPViewabilityOption)[[notification.userInfo objectForKey:kDisabledViewabilityTrackers] integerValue]; + } + + // Immediately stop all tracking for the disabled viewability vendors. + [self stopTracking:disabledTrackers]; + + // Remove the disabled trackers + NSMutableDictionary> * updatedTrackers = [self.trackers mutableCopy]; + for (NSInteger index = 1; index < MPViewabilityOptionAll; index = index << 1) { + if (OptionsHasValue(disabledTrackers, index) && self.trackers[@(index)] != nil) { + [updatedTrackers removeObjectForKey:@(index)]; + } + } + self.trackers = updatedTrackers; +} + +@end diff --git a/iphone/Maps/3party/MoPubSDK/Viewability/MPWebView+Viewability.h b/iphone/Maps/3party/MoPubSDK/Viewability/MPWebView+Viewability.h new file mode 100644 index 0000000000..59be501d71 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Viewability/MPWebView+Viewability.h @@ -0,0 +1,20 @@ +// +// MPWebView+Viewability.h +// MoPubSDK +// +// Copyright © 2016 MoPub. All rights reserved. +// + +#import "MPWebView.h" + +@interface MPWebView (Viewability) + +// Returns the UIWebView or WKWebView instance attached to this MPWebView. If using WKWebView, this property will return +// the WKWebView instance regardless of if it's currently in the view hierarchy of this MPWebView. Exposed for the +// purpose of having a reliable way to attach viewability SDKs to a web view. +// +// Note: Please do not alter the hierarchy of this view (i.e., don't ever call it with `addSubview` or +// `removeFromSuperview`). Call those methods on the MPWebView instance instead. +@property (nonatomic, readonly) UIView *containedWebView; + +@end diff --git a/iphone/Maps/3party/MoPubSDK/Viewability/MPWebView+Viewability.m b/iphone/Maps/3party/MoPubSDK/Viewability/MPWebView+Viewability.m new file mode 100644 index 0000000000..e7324c76d2 --- /dev/null +++ b/iphone/Maps/3party/MoPubSDK/Viewability/MPWebView+Viewability.m @@ -0,0 +1,24 @@ +// +// MPWebView+Viewability.m +// MoPubSDK +// +// Copyright © 2016 MoPub. All rights reserved. +// + +#import "MPWebView+Viewability.h" +#import + +@interface MPWebView () + +- (UIWebView *)uiWebView; +- (WKWebView *)wkWebView; + +@end + +@implementation MPWebView (Viewability) + +- (UIView *)containedWebView { + return self.uiWebView ? self.uiWebView : self.wkWebView; +} + +@end diff --git a/iphone/Maps/Core/Ads/Mopub/MPNativeAd+MWM.mm b/iphone/Maps/Core/Ads/Mopub/MPNativeAd+MWM.mm index 69076c90db..254cec4d5b 100644 --- a/iphone/Maps/Core/Ads/Mopub/MPNativeAd+MWM.mm +++ b/iphone/Maps/Core/Ads/Mopub/MPNativeAd+MWM.mm @@ -8,7 +8,7 @@ @property(nonatomic) BOOL hasAttachedToView; @property(nonatomic, readonly) id adAdapter; -- (void)willAttachToView:(UIView *)view; +- (void)willAttachToView:(UIView *)view withAdContentViews:(NSArray *)adContentViews; - (void)adViewTapped; - (void)nativeViewWillMoveToSuperview:(UIView *)superview; - (UIViewController *)viewControllerForPresentingModalView; @@ -38,7 +38,7 @@ } else { - [self willAttachToView:self.associatedView]; + [self willAttachToView:self.associatedView withAdContentViews:self.associatedView.subviews]; for (UIButton * button in buttons) { [button addTarget:self diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj index 96d1ddd61b..53d5f9e98c 100644 --- a/iphone/Maps/Maps.xcodeproj/project.pbxproj +++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj @@ -183,7 +183,6 @@ 349A13851DEC138C00C7DB60 /* MWMMobileInternetAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = 349A13811DEC138C00C7DB60 /* MWMMobileInternetAlert.xib */; }; 349B926D1DF0518E007779DD /* MWMToast.mm in Sources */ = {isa = PBXBuildFile; fileRef = 349B926B1DF0518E007779DD /* MWMToast.mm */; }; 349B92711DF0526D007779DD /* MWMToast.xib in Resources */ = {isa = PBXBuildFile; fileRef = 349B926F1DF0526D007779DD /* MWMToast.xib */; }; - 349CFD0720456FEB00569949 /* GoogleMobileAds.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 349CFD0620456FEB00569949 /* GoogleMobileAds.framework */; }; 349D1ABC1E2D05EF004A2006 /* SearchBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 349D1ABA1E2D05EF004A2006 /* SearchBar.swift */; }; 349D1ACF1E2E325B004A2006 /* MWMBottomMenuCollectionViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 349D1AC41E2E325B004A2006 /* MWMBottomMenuCollectionViewCell.mm */; }; 349D1AD21E2E325B004A2006 /* MWMBottomMenuCollectionViewLandscapeCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 349D1AC51E2E325B004A2006 /* MWMBottomMenuCollectionViewLandscapeCell.xib */; }; @@ -329,7 +328,6 @@ 34F4073E1E9E1AFF00E57AC0 /* MPNativeAd+MWM.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34F407261E9E1AFF00E57AC0 /* MPNativeAd+MWM.mm */; }; 34F407411E9E1AFF00E57AC0 /* RBBanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34F4072A1E9E1AFF00E57AC0 /* RBBanner.swift */; }; 34F409891E9E1DD200E57AC0 /* libMopub.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 34F4075D1E9E1D7A00E57AC0 /* libMopub.a */; }; - 34F4098C1E9E221700E57AC0 /* FBAudienceNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34F4098A1E9E221700E57AC0 /* FBAudienceNetwork.framework */; }; 34F5E0D41E3F254800B1C415 /* UIView+Hierarchy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34F5E0D21E3F254800B1C415 /* UIView+Hierarchy.swift */; }; 34F73F9C1E082FF800AC1FD6 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 34F73F5F1E082FF700AC1FD6 /* InfoPlist.strings */; }; 34F73F9F1E082FF800AC1FD6 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 34F73F611E082FF800AC1FD6 /* Localizable.strings */; }; @@ -343,6 +341,7 @@ 4554B6EE1E55F0F30084017F /* drules_proto_vehicle_dark.bin in Resources */ = {isa = PBXBuildFile; fileRef = 4554B6E91E55F02B0084017F /* drules_proto_vehicle_dark.bin */; }; 4586D0C41F48121A00DF9CE5 /* libbsdiff.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4586D0C31F48121A00DF9CE5 /* libbsdiff.a */; }; 4586D0E71F4813AB00DF9CE5 /* libmwm_diff.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4586D0E61F4813AB00DF9CE5 /* libmwm_diff.a */; }; + 45A37B9E20B33F5E005FBDBB /* FBAudienceNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 45A37B9D20B33F5D005FBDBB /* FBAudienceNetwork.framework */; }; 45CBCCBA20590AAB006B55C2 /* libkml.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 45CBCCBB20590AAB006B55C2 /* libkml.a */; }; 45FFD65D1E965EBE00DB854E /* liblocal_ads.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 45FFD65C1E965EBE00DB854E /* liblocal_ads.a */; }; 4767CD9F20AAD48A00BD8166 /* Checkmark.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4767CD9E20AAD48A00BD8166 /* Checkmark.swift */; }; @@ -465,6 +464,7 @@ A630D1EA207CA95900976DEA /* Localizable.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = A630D1E8207CA95900976DEA /* Localizable.stringsdict */; }; BB25B1A71FB32767007276FA /* transit_colors.txt in Resources */ = {isa = PBXBuildFile; fileRef = BB25B1A51FB32767007276FA /* transit_colors.txt */; }; BB7626B61E85599C0031D71C /* icudt57l.dat in Resources */ = {isa = PBXBuildFile; fileRef = BB7626B41E8559980031D71C /* icudt57l.dat */; }; + EBDA7B7820B370B40054165B /* GoogleMobileAds.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EBDA7B7320B3576D0054165B /* GoogleMobileAds.framework */; }; F5BD255A0838E70EC012748E /* DiscoverySearchCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5BD2ED6E94925472A9901B4 /* DiscoverySearchCell.swift */; }; F5BD29FF26AD58255766C51A /* DiscoverySpinnerCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5BD246A7E6BE8CD8600EDD9 /* DiscoverySpinnerCell.swift */; }; F5BD2CA4DBEFACBC48195F39 /* DiscoveryCollectionHolderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5BD2A86D9DA2F9769D30B54 /* DiscoveryCollectionHolderCell.swift */; }; @@ -989,7 +989,6 @@ 349B926A1DF0518E007779DD /* MWMToast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMToast.h; sourceTree = ""; }; 349B926B1DF0518E007779DD /* MWMToast.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMToast.mm; sourceTree = ""; }; 349B926F1DF0526D007779DD /* MWMToast.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMToast.xib; sourceTree = ""; }; - 349CFD0620456FEB00569949 /* GoogleMobileAds.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GoogleMobileAds.framework; path = 3party/MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework; sourceTree = ""; }; 349D1ABA1E2D05EF004A2006 /* SearchBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchBar.swift; sourceTree = ""; }; 349D1AC31E2E325B004A2006 /* MWMBottomMenuCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMBottomMenuCollectionViewCell.h; sourceTree = ""; }; 349D1AC41E2E325B004A2006 /* MWMBottomMenuCollectionViewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMBottomMenuCollectionViewCell.mm; sourceTree = ""; }; @@ -1189,7 +1188,6 @@ 34F407281E9E1AFF00E57AC0 /* MWMBannerHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMBannerHelpers.h; sourceTree = ""; }; 34F4072A1E9E1AFF00E57AC0 /* RBBanner.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RBBanner.swift; sourceTree = ""; }; 34F407581E9E1D7A00E57AC0 /* Mopub.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Mopub.xcodeproj; path = MoPubSDK/Mopub.xcodeproj; sourceTree = ""; }; - 34F4098A1E9E221700E57AC0 /* FBAudienceNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FBAudienceNetwork.framework; path = MoPubSDK/AdNetworkSupport/Facebook/SDK/FBAudienceNetwork.framework; sourceTree = ""; }; 34F5E0D21E3F254800B1C415 /* UIView+Hierarchy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+Hierarchy.swift"; sourceTree = ""; }; 34F5E0DA1E3F3ED300B1C415 /* MWMRoutePoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMRoutePoint.h; sourceTree = ""; }; 34F5E0DC1E3F51AF00B1C415 /* MWMCoreRouterType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMCoreRouterType.h; sourceTree = ""; }; @@ -1270,6 +1268,7 @@ 458287C21AD3BE2000BA8940 /* DownloadIndicatorProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DownloadIndicatorProtocol.h; sourceTree = ""; }; 4586D0C31F48121A00DF9CE5 /* libbsdiff.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libbsdiff.a; path = ../../xcode/bsdiff/build/Debug/libbsdiff.a; sourceTree = ""; }; 4586D0E61F4813AB00DF9CE5 /* libmwm_diff.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmwm_diff.a; path = ../../xcode/mwm_diff/build/Debug/libmwm_diff.a; sourceTree = ""; }; + 45A37B9D20B33F5D005FBDBB /* FBAudienceNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FBAudienceNetwork.framework; path = MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK/FBAudienceNetwork.framework; sourceTree = ""; }; 45CBCCBB20590AAB006B55C2 /* libkml.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libkml.a; sourceTree = BUILT_PRODUCTS_DIR; }; 45FFD65C1E965EBE00DB854E /* liblocal_ads.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = liblocal_ads.a; path = "/Users/r.kuznetsov/Dev/Projects/omim/xcode/local_ads/../../../omim-build/xcode/Debug/liblocal_ads.a"; sourceTree = ""; }; 46F26CD610F623BA00ECCA39 /* EAGLView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = EAGLView.h; sourceTree = ""; }; @@ -1366,6 +1365,7 @@ A630D206207CAA5800976DEA /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.stringsdict"; sourceTree = ""; }; BB25B1A51FB32767007276FA /* transit_colors.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = transit_colors.txt; path = ../../data/transit_colors.txt; sourceTree = ""; }; BB7626B41E8559980031D71C /* icudt57l.dat */ = {isa = PBXFileReference; lastKnownFileType = file; name = icudt57l.dat; path = ../../data/icudt57l.dat; sourceTree = ""; }; + EBDA7B7320B3576D0054165B /* GoogleMobileAds.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GoogleMobileAds.framework; path = MoPubSDK/AdNetworkSupport/AdMob/SDK/GoogleMobileAds.framework; sourceTree = ""; }; ED48BBB317C267F5003E7E92 /* ColorPickerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ColorPickerView.h; sourceTree = ""; }; ED48BBB417C267F5003E7E92 /* ColorPickerView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ColorPickerView.mm; sourceTree = ""; }; ED48BBB817C2B1E2003E7E92 /* CircleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CircleView.h; sourceTree = ""; }; @@ -1774,10 +1774,10 @@ files = ( 1DA7908820762CEB008BDD6B /* libopen_location_code.a in Frameworks */, 45CBCCBA20590AAB006B55C2 /* libkml.a in Frameworks */, - 349CFD0720456FEB00569949 /* GoogleMobileAds.framework in Frameworks */, 56EE14D11FE804550036F20C /* libtransit.a in Frameworks */, 345E8F4E1F83984500A826CC /* GoogleSignIn.framework in Frameworks */, 345E8F4F1F83984500A826CC /* GoogleSignInDependencies.framework in Frameworks */, + EBDA7B7820B370B40054165B /* GoogleMobileAds.framework in Frameworks */, 4586D0E71F4813AB00DF9CE5 /* libmwm_diff.a in Frameworks */, 4586D0C41F48121A00DF9CE5 /* libbsdiff.a in Frameworks */, 34E6F2DB1F459C05008E14F9 /* GLKit.framework in Frameworks */, @@ -1790,7 +1790,6 @@ 671E78D31E6A423300B2859B /* librouting_common.a in Frameworks */, 34D808861E793F91002F0584 /* Pushwoosh.framework in Frameworks */, 34D8087B1E793606002F0584 /* Alamofire.framework in Frameworks */, - 34F4098C1E9E221700E57AC0 /* FBAudienceNetwork.framework in Frameworks */, 34D8087D1E79360D002F0584 /* AlamofireImage.framework in Frameworks */, 67B78B551E42333C0018E590 /* AdSupport.framework in Frameworks */, 3466A2DA1FB1C83C005494D3 /* FacebookCore.framework in Frameworks */, @@ -1801,6 +1800,7 @@ 67B78B3F1E422C110018E590 /* SafariServices.framework in Frameworks */, 67B78B3D1E422BF60018E590 /* CoreData.framework in Frameworks */, 344D63181E795A3C006F17CB /* SystemConfiguration.framework in Frameworks */, + 45A37B9E20B33F5E005FBDBB /* FBAudienceNetwork.framework in Frameworks */, 3446C6771DDCA9A200146687 /* libtraffic.a in Frameworks */, 34201E0C1DC0E33100D24118 /* libtracking.a in Frameworks */, 3466A2CB1FB1C83B005494D3 /* FBSDKCoreKit.framework in Frameworks */, @@ -1940,7 +1940,6 @@ 1DA7908920762CEB008BDD6B /* libopen_location_code.a */, 1DA7908720762B6F008BDD6B /* libopen_location_code.a */, 45CBCCBB20590AAB006B55C2 /* libkml.a */, - 349CFD0620456FEB00569949 /* GoogleMobileAds.framework */, 56EE14D21FE804550036F20C /* libtransit.a */, 4586D0E61F4813AB00DF9CE5 /* libmwm_diff.a */, 4586D0C31F48121A00DF9CE5 /* libbsdiff.a */, @@ -2000,6 +1999,8 @@ 340474DB1E08199D00C92850 /* 3party */ = { isa = PBXGroup; children = ( + EBDA7B7320B3576D0054165B /* GoogleMobileAds.framework */, + 45A37B9D20B33F5D005FBDBB /* FBAudienceNetwork.framework */, 34D8087A1E793606002F0584 /* Alamofire.framework */, 34D8087C1E79360D002F0584 /* AlamofireImage.framework */, 3466A2BF1FB1C733005494D3 /* AppsFlyerTracker.framework */, @@ -2010,7 +2011,6 @@ 3466A2C81FB1C83B005494D3 /* FacebookCore.framework */, 3466A2C91FB1C83B005494D3 /* FacebookLogin.framework */, 3466A2C61FB1C83A005494D3 /* FacebookShare.framework */, - 34F4098A1E9E221700E57AC0 /* FBAudienceNetwork.framework */, 3466A2C31FB1C83A005494D3 /* FBSDKCoreKit.framework */, 3466A2C41FB1C83A005494D3 /* FBSDKLoginKit.framework */, 3466A2C51FB1C83A005494D3 /* FBSDKShareKit.framework */, @@ -4899,9 +4899,9 @@ DEVELOPMENT_TEAM = 3T6FSDE8C7; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK", "$(PROJECT_DIR)/3party/GoogleSignIn", "$(PROJECT_DIR)/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK", + "$(PROJECT_DIR)/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK", ); LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; }; @@ -4914,9 +4914,9 @@ DEVELOPMENT_TEAM = 3T6FSDE8C7; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK", "$(PROJECT_DIR)/3party/GoogleSignIn", "$(PROJECT_DIR)/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK", + "$(PROJECT_DIR)/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK", ); LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; }; @@ -4929,9 +4929,9 @@ DEVELOPMENT_TEAM = 3T6FSDE8C7; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/3party/MoPubSDK/AdNetworkSupport/Facebook/SDK", "$(PROJECT_DIR)/3party/GoogleSignIn", "$(PROJECT_DIR)/3party/MoPubSDK/AdNetworkSupport/AdMob/SDK", + "$(PROJECT_DIR)/3party/MoPubSDK/AdNetworkSupport/FacebookAudienceNetwork/SDK", ); LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; };